From a6d1a1e4a7341b85554f0aab6268edf86554ba9b Mon Sep 17 00:00:00 2001 From: Jason Rothstein Date: Fri, 8 May 2026 22:19:26 -0400 Subject: [PATCH] Add ttl to the DNS records Signed-off-by: Jason Rothstein --- data.digitalocean_domain.this.tf | 1 + data.digitalocean_project.this.tf | 1 + data.digitalocean_vpc.this.tf | 1 + output.droplet.tf | 1 + resource.digitalocean_droplet.this.tf | 1 + resource.digitalocean_project_resources.this.tf | 1 + resource.digitalocean_record.A.tf | 2 ++ resource.digitalocean_record.AAAA.tf | 2 ++ resource.digitalocean_volume.this.tf | 1 + resource.digitalocean_volume_attachment.this.tf | 1 + variable.backup_policy_hour.tf | 1 + variable.backup_policy_plan.tf | 1 + variable.backup_policy_weekday.tf | 1 + variable.domain_name.tf | 1 + variable.host_name.tf | 1 + variable.image_name.tf | 1 + variable.project.tf | 1 + variable.region.tf | 1 + variable.size.tf | 1 + variable.ssh_keys.tf | 1 + variable.tags.tf | 1 + variable.use_project.tf | 1 + variable.use_volume.tf | 1 + variable.use_vpc.tf | 1 + variable.volume_size.tf | 1 + variable.vpc_name.tf | 1 + 26 files changed, 28 insertions(+) diff --git a/data.digitalocean_domain.this.tf b/data.digitalocean_domain.this.tf index 4506f03..55ce7de 100644 --- a/data.digitalocean_domain.this.tf +++ b/data.digitalocean_domain.this.tf @@ -1,3 +1,4 @@ data "digitalocean_domain" "this" { name = var.domain_name } + diff --git a/data.digitalocean_project.this.tf b/data.digitalocean_project.this.tf index 41b297f..5fef1e1 100644 --- a/data.digitalocean_project.this.tf +++ b/data.digitalocean_project.this.tf @@ -2,3 +2,4 @@ data "digitalocean_project" "this" { count = var.use_project > 0 ? 1 : 0 name = var.project } + diff --git a/data.digitalocean_vpc.this.tf b/data.digitalocean_vpc.this.tf index 2c9ff44..12f256b 100644 --- a/data.digitalocean_vpc.this.tf +++ b/data.digitalocean_vpc.this.tf @@ -2,3 +2,4 @@ data "digitalocean_vpc" "this" { count = var.use_vpc > 0 ? 1 : 0 name = var.vpc_name } + diff --git a/output.droplet.tf b/output.droplet.tf index e143810..c7e3425 100644 --- a/output.droplet.tf +++ b/output.droplet.tf @@ -1,3 +1,4 @@ output "droplet" { value = digitalocean_droplet.this } + diff --git a/resource.digitalocean_droplet.this.tf b/resource.digitalocean_droplet.this.tf index c0afa9b..fc0ad3d 100644 --- a/resource.digitalocean_droplet.this.tf +++ b/resource.digitalocean_droplet.this.tf @@ -20,3 +20,4 @@ resource "digitalocean_droplet" "this" { tags = var.tags vpc_uuid = var.use_vpc > 0 ? data.digitalocean_vpc.this[0].id : null } + diff --git a/resource.digitalocean_project_resources.this.tf b/resource.digitalocean_project_resources.this.tf index 2fc9ced..988073a 100644 --- a/resource.digitalocean_project_resources.this.tf +++ b/resource.digitalocean_project_resources.this.tf @@ -5,3 +5,4 @@ resource "digitalocean_project_resources" "this" { digitalocean_droplet.this.urn ] } + diff --git a/resource.digitalocean_record.A.tf b/resource.digitalocean_record.A.tf index b010729..a9a3d96 100644 --- a/resource.digitalocean_record.A.tf +++ b/resource.digitalocean_record.A.tf @@ -1,6 +1,8 @@ resource "digitalocean_record" "A" { domain = data.digitalocean_domain.this.name name = var.host_name + ttl = "300" type = "A" value = digitalocean_droplet.this.ipv4_address } + diff --git a/resource.digitalocean_record.AAAA.tf b/resource.digitalocean_record.AAAA.tf index 089700a..960a582 100644 --- a/resource.digitalocean_record.AAAA.tf +++ b/resource.digitalocean_record.AAAA.tf @@ -1,6 +1,8 @@ resource "digitalocean_record" "AAAA" { domain = data.digitalocean_domain.this.name name = var.host_name + ttl = "300" type = "AAAA" value = digitalocean_droplet.this.ipv6_address } + diff --git a/resource.digitalocean_volume.this.tf b/resource.digitalocean_volume.this.tf index 911e91d..dbd1bf4 100644 --- a/resource.digitalocean_volume.this.tf +++ b/resource.digitalocean_volume.this.tf @@ -5,3 +5,4 @@ resource "digitalocean_volume" "this" { region = var.region size = var.volume_size } + diff --git a/resource.digitalocean_volume_attachment.this.tf b/resource.digitalocean_volume_attachment.this.tf index 735c979..f03037d 100644 --- a/resource.digitalocean_volume_attachment.this.tf +++ b/resource.digitalocean_volume_attachment.this.tf @@ -3,3 +3,4 @@ resource "digitalocean_volume_attachment" "this" { droplet_id = digitalocean_droplet.this.id volume_id = digitalocean_volume.this[0].id } + diff --git a/variable.backup_policy_hour.tf b/variable.backup_policy_hour.tf index bd04c19..c9d59f0 100644 --- a/variable.backup_policy_hour.tf +++ b/variable.backup_policy_hour.tf @@ -3,3 +3,4 @@ variable "backup_policy_hour" { default = "0" type = string } + diff --git a/variable.backup_policy_plan.tf b/variable.backup_policy_plan.tf index 0605a3b..5d88f3d 100644 --- a/variable.backup_policy_plan.tf +++ b/variable.backup_policy_plan.tf @@ -3,3 +3,4 @@ variable "backup_policy_plan" { default = "weekly" type = string } + diff --git a/variable.backup_policy_weekday.tf b/variable.backup_policy_weekday.tf index 377422a..afd04ce 100644 --- a/variable.backup_policy_weekday.tf +++ b/variable.backup_policy_weekday.tf @@ -3,3 +3,4 @@ variable "backup_policy_weekday" { default = "SUN" type = string } + diff --git a/variable.domain_name.tf b/variable.domain_name.tf index 274cfb8..a81f65e 100644 --- a/variable.domain_name.tf +++ b/variable.domain_name.tf @@ -2,3 +2,4 @@ variable "domain_name" { default = "example.com" type = string } + diff --git a/variable.host_name.tf b/variable.host_name.tf index 6a2e1cc..dfb11f2 100644 --- a/variable.host_name.tf +++ b/variable.host_name.tf @@ -2,3 +2,4 @@ variable "host_name" { default = "hello-world" type = string } + diff --git a/variable.image_name.tf b/variable.image_name.tf index 7be3d31..e37e997 100644 --- a/variable.image_name.tf +++ b/variable.image_name.tf @@ -2,3 +2,4 @@ variable "image_name" { default = "fedora-42-x64" type = string } + diff --git a/variable.project.tf b/variable.project.tf index f555048..9261018 100644 --- a/variable.project.tf +++ b/variable.project.tf @@ -2,3 +2,4 @@ variable "project" { default = "default" type = string } + diff --git a/variable.region.tf b/variable.region.tf index b044369..8f292b2 100644 --- a/variable.region.tf +++ b/variable.region.tf @@ -2,3 +2,4 @@ variable "region" { default = "nyc3" type = string } + diff --git a/variable.size.tf b/variable.size.tf index cf0a1e8..99df51d 100644 --- a/variable.size.tf +++ b/variable.size.tf @@ -2,3 +2,4 @@ variable "size" { default = "s-1vcpu-1gb" type = string } + diff --git a/variable.ssh_keys.tf b/variable.ssh_keys.tf index 42b77bc..885c071 100644 --- a/variable.ssh_keys.tf +++ b/variable.ssh_keys.tf @@ -1,3 +1,4 @@ variable "ssh_keys" { type = list(any) } + diff --git a/variable.tags.tf b/variable.tags.tf index a14b03c..6e55167 100644 --- a/variable.tags.tf +++ b/variable.tags.tf @@ -2,3 +2,4 @@ variable "tags" { default = [] type = list(string) } + diff --git a/variable.use_project.tf b/variable.use_project.tf index cbee056..18355d7 100644 --- a/variable.use_project.tf +++ b/variable.use_project.tf @@ -2,3 +2,4 @@ variable "use_project" { default = 0 type = number } + diff --git a/variable.use_volume.tf b/variable.use_volume.tf index 00db937..8bb177a 100644 --- a/variable.use_volume.tf +++ b/variable.use_volume.tf @@ -2,3 +2,4 @@ variable "use_volume" { default = 0 type = number } + diff --git a/variable.use_vpc.tf b/variable.use_vpc.tf index c086744..8746414 100644 --- a/variable.use_vpc.tf +++ b/variable.use_vpc.tf @@ -2,3 +2,4 @@ variable "use_vpc" { default = 0 type = number } + diff --git a/variable.volume_size.tf b/variable.volume_size.tf index b18b844..533f809 100644 --- a/variable.volume_size.tf +++ b/variable.volume_size.tf @@ -2,3 +2,4 @@ variable "volume_size" { default = 0 type = number } + diff --git a/variable.vpc_name.tf b/variable.vpc_name.tf index af90cd6..3cc57a0 100644 --- a/variable.vpc_name.tf +++ b/variable.vpc_name.tf @@ -2,3 +2,4 @@ variable "vpc_name" { default = "nyc3" type = string } +