locals {
dns_data = <<-CSV
RecordType,RecordName,RecordZone,RecordZoneId,RecordValue
A,something.example.com,something,zoneid,"x.x.x.x \n x.x.x.x"
CSV
dns_records = csvdecode(local.dns_data)
}
resource "aws_route53_record" "route53_entry" {
for_each = {for record in local.dns_records : record.RecordName => record}
name = each.value.RecordName
type = each.value.RecordType
zone_id = each.value.RecordZoneId
ttl = 60
records = [each.value.RecordValue]
}
I'm trying to create the r53 entries inside a zone using a CSV. How to handle the line breaks inside a cell? My A record cord can have multiple values, tried multiple ways with no luck. Thanks for any help.