Supporting adjust volume size & pre-update backups.
This commit is contained in:
8
main.tf
8
main.tf
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user