terraform-modules/network/variables.tf

139 lines
3 KiB
HCL

variable "project_id" {
description = "STACKIT project ID"
type = string
}
variable "name" {
description = "Network name"
type = string
}
# -----------------------------
# IPv4
# -----------------------------
variable "ipv4_gateway" {
description = "IPv4 gateway address"
type = string
default = null
}
variable "ipv4_nameservers" {
description = "IPv4 nameserver list"
type = list(string)
default = []
}
variable "ipv4_prefix" {
description = "IPv4 prefix CIDR"
type = string
default = null
}
variable "ipv4_prefix_length" {
description = "IPv4 prefix length"
type = number
default = null
}
# -----------------------------
# IPv6
# -----------------------------
variable "ipv6_gateway" {
description = "IPv6 gateway address"
type = string
default = null
}
variable "ipv6_nameservers" {
description = "IPv6 nameserver list"
type = list(string)
default = []
}
variable "ipv6_prefix" {
description = "IPv6 prefix CIDR"
type = string
default = null
}
variable "ipv6_prefix_length" {
description = "IPv6 prefix length"
type = number
default = null
}
# -----------------------------
# Deprecated legacy nameservers (provider still exposes)
# -----------------------------
variable "nameservers" {
description = "Deprecated nameserver list (legacy field)"
type = list(string)
default = []
}
# -----------------------------
# Labels & flags
# -----------------------------
variable "labels" {
description = "Labels map"
type = map(string)
default = {}
}
variable "no_ipv4_gateway" {
description = "Disable IPv4 gateway"
type = bool
default = false
}
variable "no_ipv6_gateway" {
description = "Disable IPv6 gateway"
type = bool
default = false
}
variable "routed" {
description = "Mark network routed"
type = bool
default = null
}
# -----------------------------
# Region override & routing
# -----------------------------
variable "region" {
description = "Resource region override (defaults to provider region)"
type = string
default = null
}
variable "routing_table_id" {
description = "Routing table ID"
type = string
default = null
}
# -----------------------------
# NIC map (zero or many)
# -----------------------------
variable "nics" {
description = "Map of NIC configs"
type = map(object({
nic_ipv4 = optional(string)
nic_name = optional(string)
nic_allowed_addresses = optional(list(string))
nic_labels = optional(map(string))
nic_security = optional(bool)
nic_security_group_ids = optional(list(string))
nic_security_group_names = optional(list(string))
}))
default = {}
}
# -----------------------------
# Security group lookup map
# -----------------------------
variable "security_group_ids_by_name" {
description = "Security group name→ID map"
type = map(string)
}