Skip to content

Commit

Permalink
fix validation on propagate_all_route_table_names
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Feb 18, 2025
1 parent 418a111 commit 9d7e783
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions vpc-transit-gateway-association/peer/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ variable "propagate_all_route_table_names" {
default = ["services", "inter-region"]

validation {
condition = contains(["services", "inter-region", "inspection", "cross-boundary"], var.propagate_all_route_table_names)
error_message = "propagate_all_route_table_names must be one of: services, inter-region, inspection, cross-boundary."
condition = alltrue([for rt in var.propagate_all_route_table_names : contains(["services", "inter-region", "inspection", "cross-boundary"], rt)])
error_message = "propagate_all_route_table_names permitted are: services, inter-region, inspection, cross-boundary."
}
}
2 changes: 1 addition & 1 deletion vpc-transit-gateway-association/self/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ variable "propagate_all_route_table_names" {
default = ["services", "inter-region"]

validation {
condition = contains(["services", "inter-region", "inspection", "cross-boundary"], var.propagate_all_route_table_names)
condition = alltrue([for rt in var.propagate_all_route_table_names : contains(["services", "inter-region", "inspection", "cross-boundary"], rt)])
error_message = "propagate_all_route_table_names must be one of: services, inter-region, inspection, cross-boundary."
}
}

0 comments on commit 9d7e783

Please sign in to comment.