Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modules/ha-hot-hot/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ variable "private_subnet_ids" {
variable "allowed_cidrs" {
description = "CIDR blocks permitted to reach the ALB on port 443."
type = list(string)
validation {
condition = alltrue([for c in var.allowed_cidrs : can(cidrhost(c, 0))])
error_message = "Each entry in allowed_cidrs must be a valid CIDR block (e.g. 10.0.0.0/8)."
}
}

variable "acm_certificate_arn" {
Expand Down
7 changes: 6 additions & 1 deletion modules/ha-hot-hot/azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ variable "lb_subnet_id" {
}

variable "allowed_cidrs" {
type = list(string)
description = "CIDR blocks permitted to reach the load balancer on port 443."
type = list(string)
validation {
condition = alltrue([for c in var.allowed_cidrs : can(cidrhost(c, 0))])
error_message = "Each entry in allowed_cidrs must be a valid CIDR block (e.g. 10.0.0.0/8)."
}
}

variable "admin_username" {
Expand Down
4 changes: 4 additions & 0 deletions modules/single-vm/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ variable "subnet_id" {
variable "allowed_cidrs" {
description = "CIDR blocks permitted to reach the VM on port 443. Use private CIDRs unless you also set allow_internet_ingress = true."
type = list(string)
validation {
condition = alltrue([for c in var.allowed_cidrs : can(cidrhost(c, 0))])
error_message = "Each entry in allowed_cidrs must be a valid CIDR block (e.g. 10.0.0.0/8)."
}
}

# ----- Optional -----
Expand Down
4 changes: 4 additions & 0 deletions modules/single-vm/azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ variable "subnet_id" {
variable "allowed_cidrs" {
description = "CIDR blocks permitted to reach the VM on port 443."
type = list(string)
validation {
condition = alltrue([for c in var.allowed_cidrs : can(cidrhost(c, 0))])
error_message = "Each entry in allowed_cidrs must be a valid CIDR block (e.g. 10.0.0.0/8)."
}
}

variable "admin_username" {
Expand Down
7 changes: 6 additions & 1 deletion modules/unlimited-scale/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ variable "private_subnet_ids" {
}

variable "allowed_cidrs" {
type = list(string)
description = "CIDR blocks permitted to reach the ALB on port 443."
type = list(string)
validation {
condition = alltrue([for c in var.allowed_cidrs : can(cidrhost(c, 0))])
error_message = "Each entry in allowed_cidrs must be a valid CIDR block (e.g. 10.0.0.0/8)."
}
}

variable "acm_certificate_arn" {
Expand Down
9 changes: 8 additions & 1 deletion modules/unlimited-scale/azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ variable "location" { type = string }
variable "vm_subnet_id" { type = string }
variable "db_delegated_subnet_id" { type = string }
variable "private_dns_zone_id" { type = string }
variable "allowed_cidrs" { type = list(string) }
variable "allowed_cidrs" {
description = "CIDR blocks permitted to reach the load balancer on port 443."
type = list(string)
validation {
condition = alltrue([for c in var.allowed_cidrs : can(cidrhost(c, 0))])
error_message = "Each entry in allowed_cidrs must be a valid CIDR block (e.g. 10.0.0.0/8)."
}
}
variable "admin_username" { type = string }
variable "ssh_public_key" { type = string }

Expand Down
Loading