Resource recreation needed for aws_instance with root_block_device even though no attributes changed #418
Labels
bug
Addresses a defect in current functionality.
service/ec2
Issues and PRs that pertain to the ec2 service.
Milestone
This issue was originally opened by @alex-aver as hashicorp/terraform#10625. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
0.7.13
Affected Resource(s)
Terraform Configuration Files
I originally created an instance using the above configuration, although the
volume_size
attribute was hard coded.I did some refactoring to the module and as a result I removed this instance from Terraform management, then re-imported it.
Now if I do a terraform plan, Terraform reports that the root block device will have a new resource forced, even though the only attribute that's specified is the
volume_size
, which is not set to be different:You can see from the terraform plan output that even though everything is the same, a new resource is forced.
If I remove the root_block_device block entirely, this problem doesn't occur, but if I want to reuse this module I'm going to need to specify volume_size
Expected Behavior
Terraform should recognize that the root block device exists and already meets my configuration specifications.
Actual Behavior
The plan forces a new resource even though nothing appears to have changed.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform state rm
that instanceterraform import
that instance back interraform plan
References
I'd say this is kinda-sorta similar to this:
The text was updated successfully, but these errors were encountered: