Closed CpBulletSponge closed 4 years ago
Thanks for the response. I followed the instructions in the develop branch but get a different error on the apply step
Step #4 - "tf apply": Error: Error running command 'PATH=/workspace/envs/shared/.terraform/modules/scc_notification/terraform-google-gcloud-1.1.1/cache/b8e0331b/google-cloud-sdk/bin:$PATH Step #4 - "tf apply": gcloud alpha scc notifications create --organization 121012289018 \ Step #4 - "tf apply": --description "SCC Notification for all active findings" \ Step #4 - "tf apply": --pubsub-topic projects/prj-p-org-scc-08af/topics/top-scc-notification \ Step #4 - "tf apply": --filter "state=\"ACTIVE\"" \ Step #4 - "tf apply": --impersonate-service-account=org-terraform@cft-seed-7cdc.iam.gserviceaccount.com Step #4 - "tf apply": Step #4 - "tf apply": ': exit status 2. Output: ERROR: (gcloud.alpha.scc.notifications.create) argument NOTIFICATION_CONFIG_ID: Must be specified. Step #4 - "tf apply": Usage: gcloud alpha scc notifications create NOTIFICATION_CONFIG_ID --pubsub-topic=PUBSUB_TOPIC [optional flags] Step #4 - "tf apply": optional flags may be --description | --filter | --help | --organization Step #4 - "tf apply": Step #4 - "tf apply": For detailed information on this command and its flags, run: Step #4 - "tf apply": gcloud alpha scc notifications create --help Step #4 - "tf apply": Step #4 - "tf apply": Step #4 - "tf apply": Finished Step #4 - "tf apply" ERROR ERROR: build step 4 "gcr.io/cft-cloudbuild-5f1b/terraform" failed: step exited with non-zero status: 1
Hi @CpBulletSponge - can you please share the tfvars you are using for that step? I think this might be related to the scc_notification_name
being unset
FYI @amandakarina
@CpBulletSponge Yup @rjerrems is correct. I would check the value that was provided via the tfvars. It should not be ""
.
https://github.com/terraform-google-modules/terraform-example-foundation/blob/e27de9f1ede09e6f4be4e48d2fb4835e7b636a5a/1-org/envs/shared/terraform.example.tfvars#L31
Thanks, that seemed to be the issue.
Hi,
I have successfully followed the steps in 0-Bootstrap and am following the instructions for the 1-Org Step.
The 'gcp-org--terrafrom-plan' trigger completes successfully but when the 'gcp-org---terraform-apply' is run (either by merging to master or manually triggering), It always fails with the floowing error: (this also happens if I try and run terraform locally).
Can anyone suggest what is wrong? Thanks