Skip to content

Instantly share code, notes, and snippets.

@davidvpe
Last active February 5, 2022 17:42
Show Gist options
  • Save davidvpe/0588d3a6c35958da808a35e4ab0166c9 to your computer and use it in GitHub Desktop.
Save davidvpe/0588d3a6c35958da808a35e4ab0166c9 to your computer and use it in GitHub Desktop.
AWS Medium 3
data "cloudflare_zone" "zone" {
name = "example.com"
}
resource "cloudflare_record" "records" {
for_each = {
for dvo in aws_acm_certificate.certificate.domain_validation_options : dvo.domain_name => {
name = dvo.resource_record_name
record = dvo.resource_record_value
type = dvo.resource_record_type
}
}
zone_id = data.cloudflare_zone.zone.id
name = each.value.name
value = each.value.record
type = each.value.type
ttl = 1
allow_overwrite = true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment