Commit f5a193d4 authored by Mike Horwath's avatar Mike Horwath
Browse files

adding CAA records

parent 024139fa
Loading
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
# requires further investigation
# resource "cloudflare_record" "caa_record" {
#   count  = "${length(keys(var.caa_records))}"
#   domain = "${var.domain}"
#   name   = "${element(keys(var.caa_records), count.index)}"
#   value  = "${element(values(var.caa_records), count.index)}"
#   type   = "SPF"
# }
resource "cloudflare_record" "caa" {
  count  = "${length(var.caa_records)}"
  domain = "${var.domain}"
  name   = "${element(var.caa_records[count.index], 0)}"
  type   = "CAA"

  data = {
    flags = "${element(var.caa_records[count.index], 1)}"
    tag   = "${element(var.caa_records[count.index], 2)}"
    value = "${element(var.caa_records[count.index], 3)}"
  }
}
+5 −6
Original line number Diff line number Diff line
@@ -14,9 +14,8 @@ variable "srv_records" {
  default = []
}

# requires further investigation
# variable "caa_records" {
#   type    = "map"
#   default = {}
# }
# name, flags, tag, value
variable "caa_records" {
  type    = "list"
  default = []
}