terraform-aws-ec2-instance icon indicating copy to clipboard operation
terraform-aws-ec2-instance copied to clipboard

ISSUE - Adding EBS Volume forces EC2 Replacement

Open cfsb-jrose opened this issue 6 months ago β€’ 1 comments

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:

  1. Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
  2. Re-initialize the project root to pull down modules: terraform init
  3. 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.

cfsb-jrose avatar May 07 '25 15:05 cfsb-jrose

upstream issue https://github.com/hashicorp/terraform-provider-aws/issues/21806

bryantbiggs avatar Jun 04 '25 22:06 bryantbiggs

This issue has been resolved in version 6.0.0 :tada:

antonbabenko avatar Jun 24 '25 19:06 antonbabenko

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.

github-actions[bot] avatar Jul 25 '25 02:07 github-actions[bot]