terraform-google-modules / terraform-google-vpc-service-controls

Handles opinionated VPC Service Controls and Access Context Manager configuration and deployments
https://registry.terraform.io/modules/terraform-google-modules/vpc-service-controls/google
Apache License 2.0
59 stars 67 forks source link

fix(variables): fail gracefully if `sources` index does not exist #146

Closed eeaton closed 1 month ago

eeaton commented 1 month ago

add logic to fail gracefully if the map reference egress_policies.value["from"]["sources"] or ingress_policies.value["from"]["sources"] fails because the "sources" index does not exist. Both the from and sources blocks are optional in provider docs.

Issue identified in: https://github.com/terraform-google-modules/terraform-example-foundation/pull/1251#issuecomment-2128298785

daniel-cit commented 1 month ago

/gcbrun