mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
Fixes #5826 The `prevent_destroy` lifecycle configuration was not being checked when the count was decreased for a resource with a count. It was only checking when attributes changed on pre-existing resources. This fixes that.
9 lines
123 B
HCL
9 lines
123 B
HCL
resource "aws_instance" "foo" {
|
|
count = "1"
|
|
current = "${count.index}"
|
|
|
|
lifecycle {
|
|
prevent_destroy = true
|
|
}
|
|
}
|