terraform-google-modules / terraform-google-project-factory

Creates an opinionated Google Cloud project by using Shared VPC, IAM, and Google Cloud APIs
https://registry.terraform.io/modules/terraform-google-modules/project-factory/google
Apache License 2.0
826 stars 535 forks source link

fix: activate_api_identities throwing error that email can't be null #840

Closed abhikaddy closed 11 months ago

abhikaddy commented 11 months ago

Attempting to fix #751

abhikaddy commented 11 months ago

HI @bharathkkb @morgante @apeabody - Good Day! Can I get a review?

apeabody commented 11 months ago

/gcbrun

apeabody commented 11 months ago

/gcbrun

apeabody commented 11 months ago

Hi @abhikaddy - From the INT test

Error: Invalid for_each argument

  on ../../../modules/project_services/main.tf line 80, in resource "google_project_iam_member" "project_service_identity_roles":
  80:   for_each = {
  81:     for k, v in local.add_service_roles : k => v if v.email != null
  82:   }
    ├────────────────
    │ local.add_service_roles is object with 2 attributes

The "for_each" map includes keys derived from resource attributes that cannot
be determined until apply, and so Terraform cannot determine the full set of
keys that will identify the instances of this resource.
abhikaddy commented 11 months ago

Looks like this scenario was already taken care by some other commit. Closing the pull request.