germanbrew/terraform-provider-hetznerdns

Convert list of values to multiple records

Closed this issue · 1 comments

Add the abillity to use lists to generate (multiple) records like so for example:

resource "hetznerdns_record" "domain_com-NS" {
  zone_id = hetznerdns_zone.domain_com.id
  name = "@"
  type = "NS"
  value = [ "helium.ns.hetzner.de.", "hydrogen.ns.hetzner.com.", "oxygen.ns.hetzner.com." ]

Related to timohirt/terraform-provider-hetznerdns#51

resource "hetznerdns_record" "domain_com-NS" {
  for_each = toset([ "helium.ns.hetzner.de.", "hydrogen.ns.hetzner.com.", "oxygen.ns.hetzner.com." ])

  zone_id = hetznerdns_zone.domain_com.id
  name = "@"
  type = "NS"
  value = each.value
}