-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_volume_attachment force new resource when instance_id is computed #1297
Comments
Terraform version Found the same behaviour. Example code and output below.
Terraform plan output:
Additionally, when I've changed instance_id from variable (computed) to static instance ID on volume_attachment resource, forcing of a new aws_instance remained:
Hope that helps. |
Following workaround worked for me: add to
|
Hi @gstlt, I'm gonna check on that, but I'm afraid that will introduce a new issue. If my EBS is detached/attached because of this bug, it may result in I/O errors as I use those volumes to store data for my stateful stack. Regards, |
Thanks @notuscloud |
Any change in the ebs block device currently triggers re-creation of this resource which I assume is not intended. Workaround by ignoring these changes as suggested in: hashicorp/terraform-provider-aws#1297 (comment)
Any change in the ebs block device currently triggers re-creation of this resource which I assume is not intended. Workaround by ignoring these changes as suggested in: hashicorp/terraform-provider-aws#1297 (comment)
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @notuscloud as hashicorp/terraform#15659. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
v0.9.11
Terraform Configuration Files
Debug Output
Expected Behavior
aws_volume_attachment
should not be forced into a new resource, thus the drive letter should not change for the instance. As nothing changes for the attachment and aws_instance, nothing should happen.Actual Behavior
aws_volume_attachment
and force a new resourceaws_instance
I suspect that the
aws_volume_attachment
being forced anew, it provokes a device_name change to theaws_instance
.device_name
forces a new resource with the attachedaws_instance
To resume, I do no changes and both
aws_volume_attachment
andaws_instance
are being deleted then re-created.Steps to Reproduce
terraform apply
terraform plan
to see what's gonna happen orterraform apply
Thanks for your help,
Thomas
The text was updated successfully, but these errors were encountered: