Skip to content

Commit

Permalink
Allow zero private subnets
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-svensson committed Sep 22, 2021
1 parent 1b561c3 commit 9679896
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ variable "private_subnet_ids" {
default = {}
description = "A map of private subnet ids to use in the form <zone> => <id>"
validation {
condition = length(var.private_subnet_ids) % 2 == 1
error_message = "The number of subnets must be odd (1,3)."
condition = length(var.private_subnet_ids) == 0 || length(var.private_subnet_ids) % 2 == 1
error_message = "The number of private subnets must be odd (1,3) or zero."
}
}

Expand Down

0 comments on commit 9679896

Please sign in to comment.