From c50547c2fbd28de426bbf282d3722765c88ae4e2 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 19 Feb 2022 20:23:54 +0100 Subject: [PATCH] set create before destory --- infrastructure/create-resources/hcloud.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/infrastructure/create-resources/hcloud.tf b/infrastructure/create-resources/hcloud.tf index fbea7e5..7332faf 100644 --- a/infrastructure/create-resources/hcloud.tf +++ b/infrastructure/create-resources/hcloud.tf @@ -17,6 +17,11 @@ resource "hcloud_server" "serverctl_master" { ] placement_group_id = hcloud_placement_group.serverctl_master.id + + lifecycle { + create_before_destroy = true + } + provisioner "remote-exec" { inline = ["sudo apt update", "sudo apt install python3 -y", "echo Done!"]