Last active
February 5, 2022 17:42
-
-
Save davidvpe/0588d3a6c35958da808a35e4ab0166c9 to your computer and use it in GitHub Desktop.
AWS Medium 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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