Skip to content

Commit

Permalink
feat: add the ability to set the TTL for the DNS records
Browse files Browse the repository at this point in the history
  • Loading branch information
dsueltenfuss committed Mar 2, 2022
1 parent 1367412 commit b0d88f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit b0d88f2

Please sign in to comment.