From 02a6ea627bf5330061fe3c887e13af0fd6025b77 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 4 Feb 2024 13:13:16 +0100 Subject: digitalocean/server: refactoring --- digitalocean/server/main.tf | 21 +++++++++++---------- 1 file 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 -- cgit v1.2.3