Skip to content

Commit

Permalink
Set DNS TTL of 60 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
pysysops committed Feb 26, 2019
1 parent c6d1988 commit 1bb74c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ resource "digitalocean_record" "public_a" {

domain = "${var.public_domain}"
type = "A"
ttl = "60"
name = "${element(digitalocean_droplet.droplet.*.name, count.index)}"
value = "${element(digitalocean_droplet.droplet.*.ipv4_address, count.index)}"
}
Expand All @@ -120,6 +121,7 @@ resource "digitalocean_record" "public_aaaa" {

domain = "${var.public_domain}"
type = "AAAA"
ttl = "60"
name = "${element(digitalocean_droplet.droplet.*.name, count.index)}"
value = "${element(digitalocean_droplet.droplet.*.ipv6_address, count.index)}"
}
Expand All @@ -130,6 +132,7 @@ resource "digitalocean_record" "private_a" {

domain = "${var.private_domain}"
type = "A"
ttl = "60"
name = "${element(digitalocean_droplet.droplet.*.name, count.index)}"
value = "${element(digitalocean_droplet.droplet.*.ipv4_address_private, count.index)}"
}

0 comments on commit 1bb74c8

Please sign in to comment.