terraform-pr-commenter icon indicating copy to clipboard operation
terraform-pr-commenter copied to clipboard

Why is it showing this error? It doesn't print the message in the PR

Open jgarc58 opened this issue 2 years ago • 2 comments

Terraform will perform the following actions:
  # module.backend.google_project.this[\"example-tf\"] will be created
  + resource \"google_project\" \"this\" {
      + auto_create_network = false
      + billing_account     = \"foobar\"
      + id                  = (known after apply)
      + labels              = {
          + \"terraform\" = \"example\"
        }
      + name                = \"Example TF\"
      + number              = (known after apply)
      + org_id              = \"foobar[52](https://github.com/bancodebogota/bbog-ca-gcp-organizations-iac/runs/6833095425?check_suite_focus=true#step:15:53)29649\"
      + project_id          = \"example-tf\"
      + skip_delete         = (known after apply)
    }
Plan: 1 to add, 0 to change, 0 to destroy.
" "0"
INFO: Looking for an existing plan PR comment.
jq: error (at <stdin>:4): Cannot index string with string "body"
INFO: No existing plan PR comment found.
INFO: Adding plan comment to PR.

jgarc58 avatar Jun 10 '22 14:06 jgarc58

Also experiencing this issue, not sure what's going on.

fermezz avatar Jul 28 '22 13:07 fermezz

I had this issue after i started using the aws-actions/configure-aws-credentials@v1 and added a few permissions to my action as documented here https://github.com/aws-actions/configure-aws-credentials#usage

    permissions:
      id-token: write
      contents: read

Turns out that then you are missing the pull-requests: write permission!

so doing the following fixed it for me

    permissions:
      id-token: write
      contents: read
      pull-requests: write

dudadornelles avatar Aug 17 '22 18:08 dudadornelles