Open thrixton opened 5 years ago
Where the linked issue #8099 is about wanting an update to trigger depends_on
, this appears to be about a resource cycle that destroys a resource, and that destroy does not cause depends_on
to resource cycle the dependent resource. Since depends_on
is supposed to trigger these ordering operations, this one seems more like a bug.
Hey @thrixton 👋 Thank you for taking the time to file this issue! Given that there's been a number of AWS provider releases since you initially filed it, can you confirm whether you're still experiencing this behavior?
@justinretzolk can confirm. I just ran into this (found the ticket via search).
Community Note
Terraform Version
Terraform v0.12.10 provider.aws v2.30.0
Affected Resource(s)
aws_key_pair aws_instance
Terraform Configuration Files
Key
Instance
Expected Behavior
When a key is replaced (such as when imported per #1092), the associated instances are not also updated. This is due to Terraform's diffing behaviour, as per Update/replace resource when a dependency is changed, #8099. This issue is just as an example for the issue above.
Actual Behavior
Terraform does not recreate the instance(s).