@@ -19,6 +19,16 @@ resource "aws_route53_record" "private" {
records = [ each.value ]
provider = aws.c2
}
+resource "aws_route53_record" "private_cname" {
+ for_each = var.legacy_private_cname_dns
+
+ name = each.key
+ type = "CNAME"
+ ttl = 300
+ zone_id = var.dns_info["private"]["zone_id"]
+ records = [ each.value ]
+ provider = aws.c2
+}
# Reverse
resource "aws_route53_record" "reverse_dns" {
@@ -3,6 +3,11 @@ variable legacy_private_dns {
type = map
+variable legacy_private_cname_dns {
+ description = "A map of legacy hostnames to lists of dns entries. To disable, just remove an entry."
+ type = map
variable legacy_public_dns {
description = "A map of legacy hostnames to lists of IPs. To disable, just remove an entry."