terraform-aws-ec2-instance
terraform-aws-ec2-instance copied to clipboard
ISSUE - Adding EBS Volume forces EC2 Replacement
Description
Re-raising https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/issues/401 as it is still an issue.
If your request is for a new feature, please use the Feature request template.
- [x] β I have searched the open/closed issues and my issue is not listed.
β οΈ Note
Before you submit an issue, please perform the following first:
- Remove the local
.terraformdirectory (! ONLY if state is stored remotely, which hopefully you are following that best practice!):rm -rf .terraform/ - Re-initialize the project root to pull down modules:
terraform init - Re-attempt your terraform plan or apply and check if the issue still persists
Versions
-
Module version [Required]: v5.8.0
-
Terraform version:
Terraform v1.11.4 on linux_amd64 -
Provider version(s):
Terraform v1.11.4 on linux_amd64 + provider registry.terraform.io/hashicorp/aws v5.97.0
Reproduction Code [Required]
Steps to reproduce the behavior: refer to https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/issues/401
Expected behavior
refer to https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/issues/401
Actual behavior
refer to https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/issues/401
Terminal Output Screenshot(s)
refer to https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/issues/401
Additional context
While the workaround noted in https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/issues/401 does mitigate the risk of replacing EC2 instances, it doesn't solve the issue from a CloudOps/DevOps perspective. A better solution would be to create a sub-module to handle EBS volumes and attachments.
upstream issue https://github.com/hashicorp/terraform-provider-aws/issues/21806
This issue has been resolved in version 6.0.0 :tada:
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.