terraform-example-foundation
terraform-example-foundation copied to clipboard
1-org deploy with cloudbuild plan error: `specify 'build.logs_bucket' (b) use the CLOUD_LOGGING_ONLY`
TL;DR
At 1-org using Cloud Build on step 17 during the build this error happened:
Your build failed to run: generic::invalid_argument: generic::invalid_argument: if 'build.service_account' is specified, the build must either (a) specify 'build.logs_bucket' (b) use the CLOUD_LOGGING_ONLY logging option, or (c) use the NONE logging option

Expected behavior
Build trigger gcp-org---terraform-plan should work.
Observed behavior
Getting this error:
Your build failed to run: generic::invalid_argument: generic::invalid_argument: if 'build.service_account' is specified, the build must either (a) specify 'build.logs_bucket' (b) use the CLOUD_LOGGING_ONLY logging option, or (c) use the NONE logging option
Terraform Configuration
Default 1-org configuration.
Terraform Version
Terraform v1.2.4
on linux_amd64
Additional information
Workaround this issue by updating cloudbuild-tf-apply.yaml and cloudbuild-tf-plan.yaml with the piece of code below after the last step:
options:
logging: CLOUD_LOGGING_ONLY
The cloudbuild has a bug which is missing the logbucket. To resolve it the below must be added at the end of the cloudbuild-tf-plan.yaml
logsBucket: '${_LOGS_BUCKET_NAME}'
options:
logging: GCS_ONL