Refactor DNS-config to make it easier to maintain
This commit is contained in:
@@ -4,11 +4,11 @@ resource "hetznerdns_zone" "this" {
|
||||
}
|
||||
|
||||
locals {
|
||||
records = {
|
||||
records = nonsensitive({
|
||||
for record in var.records : "${record.type}#${record.name}#${md5(record.value)}" => {
|
||||
for key, value in record : key => value
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
resource "hetznerdns_record" "this" {
|
||||
|
||||
@@ -12,7 +12,7 @@ variable "records" {
|
||||
name = string
|
||||
value = string
|
||||
type = string
|
||||
ttl = optional(number, 3600)
|
||||
ttl = optional(number, null)
|
||||
}))
|
||||
default = []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user