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

Change EBS type from gp3 to gp2 #17644

Closed
brunoxd13 opened this issue Feb 16, 2021 · 4 comments · Fixed by #17646 or getamis/vishwakarma#106
Closed

Change EBS type from gp3 to gp2 #17644

brunoxd13 opened this issue Feb 16, 2021 · 4 comments · Fixed by #17646 or getamis/vishwakarma#106
Assignees
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@brunoxd13
Copy link

brunoxd13 commented Feb 16, 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 v0.13.6
provider  hashicorp/aws v3.28.0

Affected Resource(s)

Terraform Configuration Files

resource "aws_ebs_volume" "this" {
  availability_zone = "us-west-2a"
  size = 40
  type = "gp2"
  throughput = null
}

Debug Output

Error: InvalidParameterCombination: The throughput parameter is not supported for gp2 volumes.

Expected Behavior

When changing the EBS disk type from gp3 to gp2, an error related to throughput should not be reported, as it does not "exist" for the gp2 disk type.

The validation on code base is this one

I have seen the code base and on this line its maintained the throughput var, but for gp2 it should not maintain.

Actual Behavior

When I change the disk from gp3 to gp2 the change is not allowed because the disk has no throughput configuration, I cannot even pass as null or 0.

I cannot pass this variable because of the error saying that the type gp3 has saved in the state.

Steps to Reproduce

  1. Create an ebs disc with the gp3 type;
  2. Change the disc type from gp3 to gp2;
@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Feb 16, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 16, 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 Feb 16, 2021
@ewbankkit
Copy link
Contributor

@ewbankkit
Copy link
Contributor

I can reproduce with a new acceptance test case:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSEBSVolume_gp3_to_gp2'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEBSVolume_gp3_to_gp2 -timeout 120m
=== RUN   TestAccAWSEBSVolume_gp3_to_gp2
=== PAUSE TestAccAWSEBSVolume_gp3_to_gp2
=== CONT  TestAccAWSEBSVolume_gp3_to_gp2
    resource_aws_ebs_volume_test.go:603: Step 3/3 error: Error running apply: exit status 1
        2021/02/16 17:50:00 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.13.0
        
        Error: InvalidParameterCombination: The throughput parameter is not supported for gp2 volumes.
        	status code: 400, request id: f42faf20-398b-4948-9706-dbbbffa5d155
        
        
--- FAIL: TestAccAWSEBSVolume_gp3_to_gp2 (31.83s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	31.926s
FAIL
GNUmakefile:27: recipe for target 'testacc' failed
make: *** [testacc] Error 1

@ghost
Copy link

ghost commented Feb 19, 2021

This has been released in version 3.29.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 for triage. Thanks!

soem added a commit to soem/vishwakarma that referenced this issue Mar 9, 2021
Prefer the aws provider version which fixed changing gp3/gp2 volume issue.
hashicorp/terraform-provider-aws#17644
soem added a commit to soem/vishwakarma that referenced this issue Mar 9, 2021
Prefer the aws provider version which fixed changing gp3/gp2 volume issue.
hashicorp/terraform-provider-aws#17644
smalltown pushed a commit to getamis/vishwakarma that referenced this issue Mar 12, 2021
Prefer the aws provider version which fixed changing gp3/gp2 volume issue.
hashicorp/terraform-provider-aws#17644
@ghost
Copy link

ghost commented Mar 21, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators Mar 21, 2021
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
3 participants