Replacing an aws_key_pair does not update related aws_instance(s) #10497
Labels
bug
Addresses a defect in current functionality.
service/ec2
Issues and PRs that pertain to the ec2 service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
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).
The text was updated successfully, but these errors were encountered: