GoogleCloudPlatform / terraform-example-foundation-app

https://registry.terraform.io/modules/GoogleCloudPlatform/terraform-example-foundation-app/google
Apache License 2.0
33 stars 36 forks source link

Step 4 fails with The argument "impersonate_service_account" is required #39

Closed daniel-cit closed 3 years ago

daniel-cit commented 3 years ago

Expected Behavior

Deploy with Cloud Build of step 4 is successful.

Actual Behavior

Deploy with Cloud Build of step 4 fails with error:

Step #1 - "tf plan validate all": *************** TERRAFORM PLAN *******************
Step #1 - "tf plan validate all":       At environment: business_unit_1/shared 
Step #1 - "tf plan validate all": **************************************************
Step #1 - "tf plan validate all": 
Step #1 - "tf plan validate all": Error: Missing required argument
Step #1 - "tf plan validate all": 
Step #1 - "tf plan validate all":   on infra_pipeline.tf line 44, in module "infra_pipelines":
Step #1 - "tf plan validate all":   44: module "infra_pipelines" {
Step #1 - "tf plan validate all": 
Step #1 - "tf plan validate all": The argument "impersonate_service_account" is required, but no definition was
Step #1 - "tf plan validate all": found.
Step #1 - "tf plan validate all": 

Error is caused by change in module

github.com/terraform-google-modules/terraform-example-foundation/4-projects/modules/infra_pipelines

That now requires a service account to impersonate when running the gcloud builds submit command.

Steps to Reproduce the Problem

  1. Follow the step inhttps://github.com/GoogleCloudPlatform/terraform-example-foundation-app/blob/main/foundation-extension/4-projects/README.md

Specifications