48 lines
1.5 KiB
HCL
48 lines
1.5 KiB
HCL
# variables.tf
|
|
|
|
variable "project_id" {
|
|
type = string
|
|
description = "STACKIT project ID to which the DNS resources are associated."
|
|
}
|
|
|
|
variable "zones" {
|
|
type = map(object({
|
|
# If zone_id is provided, the module will use the existing zone.
|
|
# Otherwise, a new zone will be created using the attributes below.
|
|
zone_id = optional(string)
|
|
|
|
# Required attributes for new zones
|
|
name = optional(string)
|
|
dns_name = optional(string)
|
|
|
|
# Optional attributes for new zones
|
|
contact_email = optional(string)
|
|
description = optional(string)
|
|
acl = optional(string)
|
|
active = optional(bool)
|
|
default_ttl = optional(number)
|
|
expire_time = optional(number)
|
|
is_reverse_zone = optional(bool)
|
|
negative_cache = optional(number)
|
|
primaries = optional(list(string))
|
|
refresh_time = optional(number)
|
|
retry_time = optional(number)
|
|
type = optional(string, "primary")
|
|
|
|
# A map of DNS record sets to create within this zone.
|
|
# The key is a logical name for the record set (e.g., "www", "mx_record").
|
|
record_sets = optional(map(object({
|
|
# Required record set attributes
|
|
name = string
|
|
type = string
|
|
records = list(string)
|
|
|
|
# Optional record set attributes
|
|
ttl = optional(number)
|
|
comment = optional(string)
|
|
active = optional(bool, true)
|
|
})), {})
|
|
}))
|
|
description = "A map of DNS zones to manage. The key is a logical name for the zone."
|
|
default = {}
|
|
}
|