Skip to content

Commit 6b4d3ed

Browse files
authored
minor: Adjust lifecycle triggers (#14)
1 parent e481959 commit 6b4d3ed

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

main.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ resource "aws_lightsail_instance" "this" {
2020
tailscale_hostname = "${var.lightsail_region}-${formatdate("YYYYMMDDhhmmss", "${time_static.this.rfc3339}")}"
2121
})
2222
ip_address_type = "dualstack"
23+
24+
lifecycle {
25+
create_before_destroy = true
26+
}
2327
}
2428

2529
resource "aws_lightsail_instance_public_ports" "this" {
@@ -37,6 +41,12 @@ resource "aws_lightsail_instance_public_ports" "this" {
3741
from_port = 41641
3842
to_port = 41641
3943
}
44+
45+
lifecycle {
46+
replace_triggered_by = [
47+
aws_lightsail_instance.this
48+
]
49+
}
4050
}
4151

4252
resource "tailscale_tailnet_key" "this" {

0 commit comments

Comments
 (0)