diff options
author | Egor Tensin <egor@tensin.name> | 2024-02-04 13:13:16 +0100 |
---|---|---|
committer | Egor Tensin <egor@tensin.name> | 2024-02-04 13:13:16 +0100 |
commit | 02a6ea627bf5330061fe3c887e13af0fd6025b77 (patch) | |
tree | 7804a012ac2d420988bdde2acebeb177aaee4e63 /digitalocean/server/main.tf | |
parent | yandex/server: add a link to full list of OSes (diff) | |
download | infra-terraform-02a6ea627bf5330061fe3c887e13af0fd6025b77.tar.gz infra-terraform-02a6ea627bf5330061fe3c887e13af0fd6025b77.zip |
digitalocean/server: refactoring
Diffstat (limited to '')
-rw-r--r-- | digitalocean/server/main.tf | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/digitalocean/server/main.tf b/digitalocean/server/main.tf index 37ed3f1..7588f37 100644 --- a/digitalocean/server/main.tf +++ b/digitalocean/server/main.tf @@ -3,21 +3,22 @@ locals { port = var.ssh_port users = [var.user] }) -} - -resource "digitalocean_droplet" "this" { - image = var.image - name = var.name - region = var.region - size = var.size - monitoring = true - ipv6 = false - vpc_uuid = var.vpc_id user_data = templatefile("${path.module}/../../etc/cloud-init.cfg", { user = var.user ssh_keys = var.ssh_keys sshd_config = local.sshd_config }) +} + +resource "digitalocean_droplet" "this" { + image = var.image + name = var.name + region = var.region + size = var.size + monitoring = true + ipv6 = false + vpc_uuid = var.vpc_id + user_data = local.user_data volume_ids = var.volume_ids droplet_agent = false graceful_shutdown = true |