Compare commits

..

41 Commits

Author SHA1 Message Date
jmrothst c2ff061acc Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-06-26 20:13:52 -05:00
jmrothst 05939cdc47 Format depends on validate
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-06-06 16:49:39 -05:00
jmrothst 93c03e7e86 Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-05-24 10:49:28 -05:00
jmrothst 2338c3c0ea Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-05-14 17:08:03 -05:00
jmrothst a6d1a1e4a7 Add ttl to the DNS records
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-05-08 22:19:26 -04:00
jmrothst 07c52e22a1 Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-05-08 18:55:44 -04:00
jmrothst 59690665db Version bumps
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-05-06 10:13:39 -05:00
jmrothst 88efbe672d Update default to Fedora 42 since 38 isn't an option any longer
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-04-30 17:58:49 -05:00
jmrothst 9be2e48a69 Version updates
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-04-30 09:08:33 -05:00
jmrothst e9f738a46f Version bumps
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-03-08 19:58:53 -05:00
jmrothst 0ad4eeacc4 Version update and tofu validate
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-02-01 00:44:46 -06:00
jmrothst 4d31df68a9 version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2026-01-01 14:08:44 -06:00
jmrothst fa1e064ff8 Version Bump 2025-10-14 23:10:17 -05:00
jmrothst 5acdb31ab5 Version Bump 2025-06-14 18:09:57 -05:00
jmrothst 70835b86af Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2025-05-26 18:07:17 -05:00
jmrothst 46c95c1c6d Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2025-05-11 18:26:07 -05:00
jmrothst 1df1f4595a Add backup policy to be set as daily or weekly
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2025-04-27 20:05:53 -05:00
jmrothst 2c061156e7 Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2025-04-27 12:51:07 -05:00
jmrothst 8e3411f7f1 Version bumps 2025-04-12 12:34:28 -05:00
jmrothst 9226c1ad7a Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2025-03-09 23:21:48 -05:00
jmrothst 0e1347935b Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2025-01-18 20:54:36 -06:00
jmrothst 76233b84ea Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2024-12-26 19:51:36 -06:00
jmrothst 8d66adf74a Version bumps
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2024-11-30 20:04:05 -06:00
jmrothst efbba9cd51 Version bumps
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2024-09-03 20:47:10 -05:00
jmrothst b1f8b7dfbc Version bump 2024-08-10 13:40:41 -05:00
jmrothst 8bf63838c8 Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2024-07-28 22:16:16 -05:00
jmrothst f0cb096503 Prevent unintentional recreation when Image changes
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2024-06-29 20:56:15 -05:00
jmrothst 345ea61288 Version bumps
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2024-05-26 12:18:51 -05:00
jmrothst ad2657ce14 Version Bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2024-04-27 11:22:15 -05:00
jmrothst 037c3fb707 Version bump
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2024-04-21 21:24:25 -05:00
jmrothst 42ad8e5fe8 Version bump 2024-03-15 21:52:51 -05:00
jmrothst 072ee45d97 Version bump 2023-12-25 14:50:11 -06:00
jmrothst 6c1860a9c8 Version bump 2023-12-16 17:48:53 -06:00
jmrothst 4feec6f283 Default to Fedora 38 2023-11-09 22:43:51 -06:00
jmrothst a0a34fa304 Version bump 2023-11-09 22:42:06 -06:00
jmrothst 6e5c110821 Move to OpenTofu 1.6.0 2023-10-07 13:09:11 -05:00
jmrothst 0e8563fc55 Update versions 2023-10-01 13:36:38 -05:00
jmrothst 1052daee73 Block BSL versions of Terraform 2023-09-06 18:51:22 -05:00
jmrothst b5bd33e13a Version bump 2023-07-24 22:47:31 -05:00
jmrothst 2d2ce34446 Version bump 2023-07-02 23:04:55 -05:00
jmrothst b2271ef6fc Version bump 2023-05-07 14:35:12 -05:00
28 changed files with 66 additions and 12 deletions
+6 -6
View File
@@ -3,19 +3,19 @@ all: init fmt validate
.PHONY: init .PHONY: init
init: init:
terraform init -upgrade=false tofu init -upgrade=false
.PHONY: initupgrade .PHONY: initupgrade
initupgrade: initupgrade:
terraform init -upgrade=true tofu init -upgrade=true
.PHONY: fmt .PHONY: fmt
fmt: init fmt: init validate
terraform fmt tofu fmt
.PHONY: validate .PHONY: validate
validate: init fmt validate: init
terraform validate tofu validate
.PHONY: clean .PHONY: clean
clean: clean:
+1
View File
@@ -1,3 +1,4 @@
data "digitalocean_domain" "this" { data "digitalocean_domain" "this" {
name = var.domain_name name = var.domain_name
} }
+1
View File
@@ -2,3 +2,4 @@ data "digitalocean_project" "this" {
count = var.use_project > 0 ? 1 : 0 count = var.use_project > 0 ? 1 : 0
name = var.project name = var.project
} }
+1
View File
@@ -2,3 +2,4 @@ data "digitalocean_vpc" "this" {
count = var.use_vpc > 0 ? 1 : 0 count = var.use_vpc > 0 ? 1 : 0
name = var.vpc_name name = var.vpc_name
} }
+1
View File
@@ -1,3 +1,4 @@
output "droplet" { output "droplet" {
value = digitalocean_droplet.this value = digitalocean_droplet.this
} }
+14 -3
View File
@@ -1,7 +1,17 @@
resource "digitalocean_droplet" "this" { resource "digitalocean_droplet" "this" {
backups = "true" backups = "true"
image = var.image_name backup_policy {
ipv6 = "true" plan = var.backup_policy_plan
weekday = var.backup_policy_weekday
hour = var.backup_policy_hour
}
image = var.image_name
ipv6 = "true"
lifecycle {
ignore_changes = [
image,
]
}
monitoring = "true" monitoring = "true"
name = "${var.host_name}.${var.domain_name}" name = "${var.host_name}.${var.domain_name}"
region = var.region region = var.region
@@ -10,3 +20,4 @@ resource "digitalocean_droplet" "this" {
tags = var.tags tags = var.tags
vpc_uuid = var.use_vpc > 0 ? data.digitalocean_vpc.this[0].id : null vpc_uuid = var.use_vpc > 0 ? data.digitalocean_vpc.this[0].id : null
} }
@@ -5,3 +5,4 @@ resource "digitalocean_project_resources" "this" {
digitalocean_droplet.this.urn digitalocean_droplet.this.urn
] ]
} }
+2
View File
@@ -1,6 +1,8 @@
resource "digitalocean_record" "A" { resource "digitalocean_record" "A" {
domain = data.digitalocean_domain.this.name domain = data.digitalocean_domain.this.name
name = var.host_name name = var.host_name
ttl = "300"
type = "A" type = "A"
value = digitalocean_droplet.this.ipv4_address value = digitalocean_droplet.this.ipv4_address
} }
+2
View File
@@ -1,6 +1,8 @@
resource "digitalocean_record" "AAAA" { resource "digitalocean_record" "AAAA" {
domain = data.digitalocean_domain.this.name domain = data.digitalocean_domain.this.name
name = var.host_name name = var.host_name
ttl = "300"
type = "AAAA" type = "AAAA"
value = digitalocean_droplet.this.ipv6_address value = digitalocean_droplet.this.ipv6_address
} }
+1
View File
@@ -5,3 +5,4 @@ resource "digitalocean_volume" "this" {
region = var.region region = var.region
size = var.volume_size size = var.volume_size
} }
@@ -3,3 +3,4 @@ resource "digitalocean_volume_attachment" "this" {
droplet_id = digitalocean_droplet.this.id droplet_id = digitalocean_droplet.this.id
volume_id = digitalocean_volume.this[0].id volume_id = digitalocean_volume.this[0].id
} }
+3 -2
View File
@@ -2,8 +2,9 @@ terraform {
required_providers { required_providers {
digitalocean = { digitalocean = {
source = "digitalocean/digitalocean" source = "digitalocean/digitalocean"
version = ">= 2.28.0" version = ">= 2.91.0"
} }
} }
required_version = ">= 1.4.5" required_version = ">= 1.11.5"
} }
+6
View File
@@ -0,0 +1,6 @@
variable "backup_policy_hour" {
# UTC Hour : 0, 4, 8, 12, 16, 20
default = "0"
type = string
}
+6
View File
@@ -0,0 +1,6 @@
variable "backup_policy_plan" {
# daily or weekly
default = "weekly"
type = string
}
+6
View File
@@ -0,0 +1,6 @@
variable "backup_policy_weekday" {
# SUN, MON, TUE, WED, THU, FRI, SAT
default = "SUN"
type = string
}
+1
View File
@@ -2,3 +2,4 @@ variable "domain_name" {
default = "example.com" default = "example.com"
type = string type = string
} }
+1
View File
@@ -2,3 +2,4 @@ variable "host_name" {
default = "hello-world" default = "hello-world"
type = string type = string
} }
+2 -1
View File
@@ -1,4 +1,5 @@
variable "image_name" { variable "image_name" {
default = "fedora-36-x64" default = "fedora-42-x64"
type = string type = string
} }
+1
View File
@@ -2,3 +2,4 @@ variable "project" {
default = "default" default = "default"
type = string type = string
} }
+1
View File
@@ -2,3 +2,4 @@ variable "region" {
default = "nyc3" default = "nyc3"
type = string type = string
} }
+1
View File
@@ -2,3 +2,4 @@ variable "size" {
default = "s-1vcpu-1gb" default = "s-1vcpu-1gb"
type = string type = string
} }
+1
View File
@@ -1,3 +1,4 @@
variable "ssh_keys" { variable "ssh_keys" {
type = list(any) type = list(any)
} }
+1
View File
@@ -2,3 +2,4 @@ variable "tags" {
default = [] default = []
type = list(string) type = list(string)
} }
+1
View File
@@ -2,3 +2,4 @@ variable "use_project" {
default = 0 default = 0
type = number type = number
} }
+1
View File
@@ -2,3 +2,4 @@ variable "use_volume" {
default = 0 default = 0
type = number type = number
} }
+1
View File
@@ -2,3 +2,4 @@ variable "use_vpc" {
default = 0 default = 0
type = number type = number
} }
+1
View File
@@ -2,3 +2,4 @@ variable "volume_size" {
default = 0 default = 0
type = number type = number
} }
+1
View File
@@ -2,3 +2,4 @@ variable "vpc_name" {
default = "nyc3" default = "nyc3"
type = string type = string
} }