diff --git a/dns.tf b/dns.tf index c47ebd8..8a05627 100644 --- a/dns.tf +++ b/dns.tf @@ -3,6 +3,6 @@ resource "aws_route53_record" "source_dns" { zone_id = data.aws_route53_zone.validation_zone.zone_id name = var.source_website type = "CNAME" - ttl = "60" + ttl = var.dns_ttl records = [aws_cloudfront_distribution.cloudfront[0].domain_name] } \ No newline at end of file diff --git a/variables.tf b/variables.tf index 293c310..029ff87 100644 --- a/variables.tf +++ b/variables.tf @@ -14,4 +14,9 @@ variable "workspaces" { description = "Used when using multiple workspaces and only creating the resources for specific ones" type = list(any) default = [] +} + +variable "dns_ttl" { + description = "The TTL for the created DNS records. Defaults to 60 seconds" + default = 60 } \ No newline at end of file