mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-24 07:26:26 -06:00
6c93fbb85d
Deposed instances need to be stored as a list for certain pathological cases where destroys fail for some reason (e.g. upstream API failure, Terraform interrupted mid-run). Terraform needs to be able to remember all Deposed nodes so that it can clean them up properly in subsequent runs. Deposed instances will now never touch the Tainted list - they're fully managed from within their own list. Added a "multiDepose" test case that walks through a scenario to exercise this.
9 lines
233 B
HCL
9 lines
233 B
HCL
resource "aws_instance" "web" {
|
|
// require_new is a special attribute recognized by testDiffFn that forces
|
|
// a new resource on every apply
|
|
require_new = "yes"
|
|
lifecycle {
|
|
create_before_destroy = true
|
|
}
|
|
}
|