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 cidr in var.allowed_cidrs : can(cidrhost(cidr, 0))])
error_message = "Every entry in allowed_cidrs must be a valid CIDR notation (e.g. 10.0.0.0/8)."
}
}

variable "acm_certificate_arn" {
Expand Down
4 changes: 4 additions & 0 deletions modules/ha-hot-hot/azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ variable "lb_subnet_id" {

variable "allowed_cidrs" {
type = list(string)
validation {
condition = alltrue([for cidr in var.allowed_cidrs : can(cidrhost(cidr, 0))])
error_message = "Every entry in allowed_cidrs must be a valid CIDR notation (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 cidr in var.allowed_cidrs : can(cidrhost(cidr, 0))])
error_message = "Every entry in allowed_cidrs must be a valid CIDR notation (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 cidr in var.allowed_cidrs : can(cidrhost(cidr, 0))])
error_message = "Every entry in allowed_cidrs must be a valid CIDR notation (e.g. 10.0.0.0/8)."
}
}

variable "admin_username" {
Expand Down
4 changes: 4 additions & 0 deletions modules/unlimited-scale/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ variable "private_subnet_ids" {

variable "allowed_cidrs" {
type = list(string)
validation {
condition = alltrue([for cidr in var.allowed_cidrs : can(cidrhost(cidr, 0))])
error_message = "Every entry in allowed_cidrs must be a valid CIDR notation (e.g. 10.0.0.0/8)."
}
}

variable "acm_certificate_arn" {
Expand Down
8 changes: 7 additions & 1 deletion modules/unlimited-scale/azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ 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" {
type = list(string)
validation {
condition = alltrue([for cidr in var.allowed_cidrs : can(cidrhost(cidr, 0))])
error_message = "Every entry in allowed_cidrs must be a valid CIDR notation (e.g. 10.0.0.0/8)."
}
}
variable "admin_username" { type = string }
variable "ssh_public_key" { type = string }

Expand Down
Loading