diff --git a/_variables.tf b/_variables.tf index 0c975cd..c7487a2 100644 --- a/_variables.tf +++ b/_variables.tf @@ -161,4 +161,10 @@ variable "web_acl_id" { type = string description = "Web ACL ARN for Cloudfront distribution" default = null +} + +variable "record_type" { + type = string + description = "Type of the record to create on Route53" + default = "CNAME" } \ No newline at end of file diff --git a/route53-record.tf b/route53-record.tf index 0f876c3..eef3e23 100644 --- a/route53-record.tf +++ b/route53-record.tf @@ -7,7 +7,7 @@ resource "aws_route53_record" "hostname" { zone_id = data.aws_route53_zone.selected.zone_id name = var.hostnames[count.index] - type = "CNAME" + type = var.record_type ttl = "300" records = [element(aws_cloudfront_distribution.default.*.domain_name, 0)] }