Terraforming Cloudflare DNS LOC Records

After confirming that they do support DNS LOC records, I couldn’t find any documentation about how to successfully create them using terraform, so here goes:

resource cloudflare_record pizza_loc_record {
  zone_id = var.zone_id
  name = "pizza.example.com"
  type = "LOC"
  data {
    lat_degrees = 1
    lat_direction = "N"
    lat_minutes = 2
    lat_seconds = 3
    long_degrees = 1
    long_direction = "E"
    long_minutes = 2
    long_seconds = 3
    precision_horz = 10
    precision_vert = 10
    altitude = 10
    size = 10
  }
  ttl = 69
}

DNS LOC records are defined in RFC1876.



#cloudflare #terraform #DNS #LOC #HOWTO