I have a terraform code like below, I need to map example1 to app1, example2 to app2 and example3 to app3 in the record set creation
variable “records”{
default = example1.com:2181,example2.com:2181,example3.com:2181
}
variable “subdomain_name” {
default = apps1.com,apps2.com,apps3.com
}
resource “aws_route53_record” “database” {
count = var.enable ? 1 : 0
zone_id = var.private_zone_id
name = var.subdomain_name
type = “CNAME”
ttl = “300”
records = [var.records]
}