Skip to content
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

Unable to preserve iops when migrating EBS volume from io1 to gp3 #20536

Closed
jonnydh opened this issue Aug 12, 2021 · 3 comments · Fixed by #23280
Closed

Unable to preserve iops when migrating EBS volume from io1 to gp3 #20536

jonnydh opened this issue Aug 12, 2021 · 3 comments · Fixed by #23280
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@jonnydh
Copy link

jonnydh commented Aug 12, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v1.0.4
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v3.53.0

Affected Resource(s)

  • aws_ebs_volume

Terraform Configuration Files

Pre-migration (legacy code)

resource "aws_ebs_volume" "upgrade_preserved_iops" {
  availability_zone = "eu-west-2a"
  size              = 100
  iops              = 4000
  type              = "io1"

  tags = {
    Name = "upgrade_preserved_iops"
  }
}

resource "aws_ebs_volume" "upgrade_changed_iops" {
  availability_zone = "eu-west-2a"
  size              = 100
  iops              = 4000
  type              = "io1"

  tags = {
    Name = "upgrade_changed_iops"
  }
}

Migration code

resource "aws_ebs_volume" "upgrade_preserved_iops" {
  availability_zone = "eu-west-2a"
  size              = 100
  iops              = 4000
  type              = "gp3"

  tags = {
    Name = "upgrade_preserved_iops"
  }
}

resource "aws_ebs_volume" "upgrade_changed_iops" {
  availability_zone = "eu-west-2a"
  size              = 100
  iops              = 4001
  type              = "gp3"

  tags = {
    Name = "upgrade_changed_iops"
  }
}

Expected Behavior

When migrating an existing EBS io1 volume to gp3, the iops value should be preserved.

Actual Behavior

When migrating to gp3, and attempting to preserve the existing iops value, the iops value is instead set to the gp3 default of 3000.

Further Info:

If we have an existing EBS io1 volume with (for example) 4000 iops set. Attempting to change the volume_type from io1 to gp3 (but preserving desired iops at 4000) in terraform will result in the iops defaulting to 3000 (the gp3 default).

This causes further frustration, as it cannot be quickly resolved with another terraform apply - as there is a modification limit preventing further changes for another 6 hours.

However, if we perform the migration with the desired iops changed to 4001, the terraform apply works as expected.

Impact:

This significantly slowed down our migration from io1 to gp3, and required greater manual effort.

Steps to Reproduce

  1. Create config for io1 EBS volumes with 4000 iops, as per the Terraform Configuration Files -pre migration (legacy code) section above.
  2. Run terraform apply
  3. Checking in AWS console shows two EBS volumes with 4000 iops each.
  4. Modify the config per the Terraform Configuration Files - migration code section above.
  5. Run terraform apply
  6. Checking in AWS console shows the upgrade_preserved_iops volume incorrectly set to 3000 iops. The upgrade_changed_iops volume is correctly set to 4001 iops.
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/ec2 Issues and PRs that pertain to the ec2 service. labels Aug 12, 2021
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 12, 2021
@leonardobiffi
Copy link
Contributor

Hi, I submit a suggestion to fix this problem #23280

@github-actions github-actions bot added this to the v4.17.0 milestone Jun 1, 2022
@github-actions
Copy link

github-actions bot commented Jun 3, 2022

This functionality has been released in v4.17.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jul 4, 2022

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 github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants