Skip to content

Commit

Permalink
subnet restrictions
Browse files Browse the repository at this point in the history
at least 2 public subnet - AWS ALB
odd number of private subnets - master node quorum
  • Loading branch information
peter-svensson committed Sep 20, 2021
1 parent c2a8e5d commit 6a5080a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,20 @@ variable "private_subnet_ids" {
type = map(string)
default = {}
description = "A map of private subnet ids to use in the form <name> => <id>"
validation {
condition = length(var.private_subnet_ids) % 2 == 1
error_message = "The number of subnets must be odd (1,3)."
}
}

variable "utility_subnet_ids" {
type = map(string)
default = {}
description = "A map of public subnet ids to use in the form <name> => <id>"
validation {
condition = length(var.utility_subnet_ids) >= 2
error_message = "At least 2 public subnets must be provided in order for AWS ALB to work."
}
}

variable "dns_zone" {
Expand Down

0 comments on commit 6a5080a

Please sign in to comment.