digitalocean_droplet/resource.digitalocean_droplet.this.tf
Jason Rothstein f0cb096503
Prevent unintentional recreation when Image changes
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
2024-06-29 20:56:15 -05:00

18 lines
427 B
HCL

resource "digitalocean_droplet" "this" {
backups = "true"
image = var.image_name
ipv6 = "true"
lifecycle {
ignore_changes = [
image,
]
}
monitoring = "true"
name = "${var.host_name}.${var.domain_name}"
region = var.region
ssh_keys = var.ssh_keys
size = var.size
tags = var.tags
vpc_uuid = var.use_vpc > 0 ? data.digitalocean_vpc.this[0].id : null
}