Skip to content

Commit

Permalink
Fix identity_type (#1978)
Browse files Browse the repository at this point in the history
* Allow empty string for 'identity_type' supported by Google provider and use correct value name for ingress 'identity_type'

* Sanitizing variables as the logical operators in Terraform do not short-circuit.
  • Loading branch information
viliampucik authored Jan 15, 2024
1 parent eee6aaf commit 19eb247
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/vpc-sc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ variable "egress_policies" {
for k, v in var.egress_policies :
v.from.identity_type == null || contains([
"IDENTITY_TYPE_UNSPECIFIED", "ANY_IDENTITY",
"ANY_USER_ACCOUNT", "ANY_SERVICE_ACCOUNT"
"ANY_USER_ACCOUNT", "ANY_SERVICE_ACCOUNT", ""
], coalesce(v.from.identity_type, "-"))
])
error_message = "Invalid `from.identity_type` value in egress policy."
Expand Down Expand Up @@ -160,7 +160,7 @@ variable "ingress_policies" {
for k, v in var.ingress_policies :
v.from.identity_type == null || contains([
"IDENTITY_TYPE_UNSPECIFIED", "ANY_IDENTITY",
"ANY_USER", "ANY_SERVICE_ACCOUNT"
"ANY_USER_ACCOUNT", "ANY_SERVICE_ACCOUNT", ""
], coalesce(v.from.identity_type, "-"))
])
error_message = "Invalid `from.identity_type` value in ingress policy."
Expand Down

0 comments on commit 19eb247

Please sign in to comment.