Supporting adjust volume size & pre-update backups.

This commit is contained in:
2026-06-17 12:01:35 -07:00
parent d1e8e0b5dc
commit 7df2c07313
16 changed files with 175 additions and 54 deletions

View File

@@ -79,6 +79,11 @@ variable "subdomains" {
description = "Subdomains to setup"
}
variable "digitalocean_volume_size" {
type = number
description = "Size in GB of the app storage digitalocean volume"
}
provider "digitalocean" {
token = var.do_token
}
@@ -124,7 +129,7 @@ resource "cloudflare_dns_record" "subdomains" {
resource "digitalocean_volume" "machine" {
region = var.datacenter
name = "${var.cluster_name}"
size = 60
size = var.digitalocean_volume_size
initial_filesystem_type = "ext4"
initial_filesystem_label = "appstorage"
description = "persistent storage for docker apps"
@@ -137,7 +142,6 @@ resource "digitalocean_droplet" "machine" {
size = var.server_type
ssh_keys = [digitalocean_ssh_key.first.fingerprint]
user_data = file("ignition.json")
graceful_shutdown = true
lifecycle {
create_before_destroy = true
}