diff options
Diffstat (limited to 'vps.tf')
-rw-r--r-- | vps.tf | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -20,6 +20,16 @@ variable "nextcloud_tld_prefix" { description = "DNS prefix used for the Nextcloud installation. Does not contain a dot at the end." } +variable "hostname" { + type = string + description = "Human name of the host. This is a pet name, not cattle name :)" +} + +variable "volume_name" { + type = string + description = "Name of the volume, which will also be the name of it's mount point." +} + # DigitalOcean provider "digitalocean" { @@ -36,7 +46,7 @@ resource "digitalocean_ssh_key" "client" { resource "digitalocean_droplet" "vps" { image = "ubuntu-18-04-x64" - name = "sovereignty" + name = var.hostname region = "nyc3" size = "s-1vcpu-1gb" backups = true @@ -64,7 +74,7 @@ resource "digitalocean_droplet" "vps" { resource "digitalocean_volume" "vps_persistent_volume" { region = "nyc3" - name = "${digitalocean_droplet.vps.name}-volume" + name = var.volume_name size = 10 initial_filesystem_type = "ext4" description = "Persistent disk to store docker volumes contents across droplets being created and destroyed" |