Skip to content

Commit

Permalink
variable validation: || does not short-circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosta Welke committed Jan 3, 2024
1 parent 87ee18d commit eeca156
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/workload-identity/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ variable "gcp_sa_display_name" {
default = null

validation {
condition = length(var.gcp_sa_display_name) <= 100
condition = var.gcp_sa_display_name == null ? true : length(var.gcp_sa_display_name) <= 100
error_message = "The Google service account display name must be at most 100 characters"
}
}
Expand All @@ -133,7 +133,7 @@ variable "gcp_sa_description" {
default = null

validation {
condition = length(var.gcp_sa_description) <= 256
condition = var.gcp_sa_description == null ? true : length(var.gcp_sa_description) <= 256
error_message = "The Google service account display name must be at most 100 characters"
}
}

0 comments on commit eeca156

Please sign in to comment.