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

aws_ebs_volume: gp3 volume scalable throughput #16517

Merged
merged 7 commits into from
Jan 19, 2021

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Dec 1, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request

Relates #16514.

Release note for CHANGELOG:

resource/aws_ebs_volume: Support `type` value of `gp3`. Add `throughput` attribute.
resource/aws_ebs_volume: Add `throughput` attribute.

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEBSVolume_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEBSVolume_ -timeout 120m
=== RUN   TestAccAWSEBSVolume_basic
=== PAUSE TestAccAWSEBSVolume_basic
=== RUN   TestAccAWSEBSVolume_updateAttachedEbsVolume
=== PAUSE TestAccAWSEBSVolume_updateAttachedEbsVolume
=== RUN   TestAccAWSEBSVolume_updateSize
=== PAUSE TestAccAWSEBSVolume_updateSize
=== RUN   TestAccAWSEBSVolume_updateType
=== PAUSE TestAccAWSEBSVolume_updateType
=== RUN   TestAccAWSEBSVolume_updateIops_Io1
=== PAUSE TestAccAWSEBSVolume_updateIops_Io1
=== RUN   TestAccAWSEBSVolume_updateIops_Io2
=== PAUSE TestAccAWSEBSVolume_updateIops_Io2
=== RUN   TestAccAWSEBSVolume_kmsKey
=== PAUSE TestAccAWSEBSVolume_kmsKey
=== RUN   TestAccAWSEBSVolume_NoIops
=== PAUSE TestAccAWSEBSVolume_NoIops
=== RUN   TestAccAWSEBSVolume_InvalidIopsForType
=== PAUSE TestAccAWSEBSVolume_InvalidIopsForType
=== RUN   TestAccAWSEBSVolume_withTags
=== PAUSE TestAccAWSEBSVolume_withTags
=== RUN   TestAccAWSEBSVolume_multiAttach
=== PAUSE TestAccAWSEBSVolume_multiAttach
=== RUN   TestAccAWSEBSVolume_outpost
=== PAUSE TestAccAWSEBSVolume_outpost
=== RUN   TestAccAWSEBSVolume_gp3_basic
=== PAUSE TestAccAWSEBSVolume_gp3_basic
=== RUN   TestAccAWSEBSVolume_gp3_iops
=== PAUSE TestAccAWSEBSVolume_gp3_iops
=== RUN   TestAccAWSEBSVolume_gp3_throughput
=== PAUSE TestAccAWSEBSVolume_gp3_throughput
=== RUN   TestAccAWSEBSVolume_disappears
=== PAUSE TestAccAWSEBSVolume_disappears
=== CONT  TestAccAWSEBSVolume_basic
=== CONT  TestAccAWSEBSVolume_withTags
=== CONT  TestAccAWSEBSVolume_disappears
=== CONT  TestAccAWSEBSVolume_gp3_throughput
=== CONT  TestAccAWSEBSVolume_gp3_iops
=== CONT  TestAccAWSEBSVolume_gp3_basic
=== CONT  TestAccAWSEBSVolume_outpost
=== CONT  TestAccAWSEBSVolume_multiAttach
=== CONT  TestAccAWSEBSVolume_updateIops_Io2
=== CONT  TestAccAWSEBSVolume_InvalidIopsForType
=== CONT  TestAccAWSEBSVolume_NoIops
=== CONT  TestAccAWSEBSVolume_kmsKey
=== CONT  TestAccAWSEBSVolume_updateType
=== CONT  TestAccAWSEBSVolume_updateIops_Io1
=== CONT  TestAccAWSEBSVolume_updateSize
=== CONT  TestAccAWSEBSVolume_updateAttachedEbsVolume
=== CONT  TestAccAWSEBSVolume_outpost
    data_source_aws_outposts_outposts_test.go:66: skipping since no Outposts found
--- SKIP: TestAccAWSEBSVolume_outpost (2.13s)
--- PASS: TestAccAWSEBSVolume_InvalidIopsForType (17.40s)
--- PASS: TestAccAWSEBSVolume_disappears (52.68s)
--- PASS: TestAccAWSEBSVolume_NoIops (55.37s)
--- PASS: TestAccAWSEBSVolume_gp3_basic (64.85s)
--- PASS: TestAccAWSEBSVolume_basic (65.87s)
--- PASS: TestAccAWSEBSVolume_multiAttach (66.08s)
--- PASS: TestAccAWSEBSVolume_withTags (66.99s)
--- PASS: TestAccAWSEBSVolume_kmsKey (67.13s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io1 (95.66s)
--- PASS: TestAccAWSEBSVolume_gp3_iops (96.68s)
--- PASS: TestAccAWSEBSVolume_updateType (98.48s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io2 (98.71s)
--- PASS: TestAccAWSEBSVolume_gp3_throughput (99.21s)
--- PASS: TestAccAWSEBSVolume_updateSize (99.32s)
--- PASS: TestAccAWSEBSVolume_updateAttachedEbsVolume (181.29s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	181.371s
$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEbsVolumeDataSource_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEbsVolumeDataSource_ -timeout 120m
=== RUN   TestAccAWSEbsVolumeDataSource_basic
=== PAUSE TestAccAWSEbsVolumeDataSource_basic
=== RUN   TestAccAWSEbsVolumeDataSource_multipleFilters
=== PAUSE TestAccAWSEbsVolumeDataSource_multipleFilters
=== CONT  TestAccAWSEbsVolumeDataSource_basic
=== CONT  TestAccAWSEbsVolumeDataSource_multipleFilters
--- PASS: TestAccAWSEbsVolumeDataSource_basic (25.19s)
--- PASS: TestAccAWSEbsVolumeDataSource_multipleFilters (26.17s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	26.219s

Acceptance test output:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEBSVolume_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEBSVolume_ -timeout 120m
=== RUN   TestAccAWSEBSVolume_basic
=== PAUSE TestAccAWSEBSVolume_basic
=== RUN   TestAccAWSEBSVolume_updateAttachedEbsVolume
=== PAUSE TestAccAWSEBSVolume_updateAttachedEbsVolume
=== RUN   TestAccAWSEBSVolume_updateSize
=== PAUSE TestAccAWSEBSVolume_updateSize
=== RUN   TestAccAWSEBSVolume_updateType
=== PAUSE TestAccAWSEBSVolume_updateType
=== RUN   TestAccAWSEBSVolume_updateIops_Io1
=== PAUSE TestAccAWSEBSVolume_updateIops_Io1
=== RUN   TestAccAWSEBSVolume_updateIops_Io2
=== PAUSE TestAccAWSEBSVolume_updateIops_Io2
=== RUN   TestAccAWSEBSVolume_kmsKey
=== PAUSE TestAccAWSEBSVolume_kmsKey
=== RUN   TestAccAWSEBSVolume_NoIops
=== PAUSE TestAccAWSEBSVolume_NoIops
=== RUN   TestAccAWSEBSVolume_InvalidIopsForType
=== PAUSE TestAccAWSEBSVolume_InvalidIopsForType
=== RUN   TestAccAWSEBSVolume_withTags
=== PAUSE TestAccAWSEBSVolume_withTags
=== RUN   TestAccAWSEBSVolume_multiAttach
=== PAUSE TestAccAWSEBSVolume_multiAttach
=== RUN   TestAccAWSEBSVolume_outpost
=== PAUSE TestAccAWSEBSVolume_outpost
=== RUN   TestAccAWSEBSVolume_disappears
=== PAUSE TestAccAWSEBSVolume_disappears
=== CONT  TestAccAWSEBSVolume_basic
=== CONT  TestAccAWSEBSVolume_NoIops
=== CONT  TestAccAWSEBSVolume_disappears
=== CONT  TestAccAWSEBSVolume_outpost
=== CONT  TestAccAWSEBSVolume_multiAttach
=== CONT  TestAccAWSEBSVolume_withTags
=== CONT  TestAccAWSEBSVolume_InvalidIopsForType
=== CONT  TestAccAWSEBSVolume_updateIops_Io1
=== CONT  TestAccAWSEBSVolume_kmsKey
=== CONT  TestAccAWSEBSVolume_updateIops_Io2
=== CONT  TestAccAWSEBSVolume_updateSize
=== CONT  TestAccAWSEBSVolume_updateType
=== CONT  TestAccAWSEBSVolume_updateAttachedEbsVolume
=== CONT  TestAccAWSEBSVolume_outpost
    data_source_aws_outposts_outposts_test.go:66: skipping since no Outposts found
--- SKIP: TestAccAWSEBSVolume_outpost (2.30s)
--- PASS: TestAccAWSEBSVolume_InvalidIopsForType (17.21s)
--- PASS: TestAccAWSEBSVolume_disappears (48.51s)
--- PASS: TestAccAWSEBSVolume_multiAttach (54.90s)
--- PASS: TestAccAWSEBSVolume_NoIops (55.61s)
--- PASS: TestAccAWSEBSVolume_withTags (59.70s)
--- PASS: TestAccAWSEBSVolume_basic (59.80s)
--- PASS: TestAccAWSEBSVolume_kmsKey (60.16s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io2 (86.60s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io1 (87.46s)
--- PASS: TestAccAWSEBSVolume_updateSize (87.58s)
--- PASS: TestAccAWSEBSVolume_updateType (88.66s)
--- PASS: TestAccAWSEBSVolume_updateAttachedEbsVolume (187.70s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	187.763s
Acceptance test output:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEBSVolume_gp3'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEBSVolume_gp3 -timeout 120m
=== RUN   TestAccAWSEBSVolume_gp3_basic
=== PAUSE TestAccAWSEBSVolume_gp3_basic
=== RUN   TestAccAWSEBSVolume_gp3_throughput
=== PAUSE TestAccAWSEBSVolume_gp3_throughput
=== CONT  TestAccAWSEBSVolume_gp3_basic
=== CONT  TestAccAWSEBSVolume_gp3_throughput
--- PASS: TestAccAWSEBSVolume_gp3_basic (29.45s)
--- PASS: TestAccAWSEBSVolume_gp3_throughput (52.39s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	52.448s
@ewbankkit ewbankkit requested a review from a team as a code owner December 1, 2020 22:40
@ghost ghost added size/L Managed by automation to categorize the size of a PR. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 1, 2020
Acceptance test output:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEBSVolume_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEBSVolume_ -timeout 120m
=== RUN   TestAccAWSEBSVolume_basic
=== PAUSE TestAccAWSEBSVolume_basic
=== RUN   TestAccAWSEBSVolume_updateAttachedEbsVolume
=== PAUSE TestAccAWSEBSVolume_updateAttachedEbsVolume
=== RUN   TestAccAWSEBSVolume_updateSize
=== PAUSE TestAccAWSEBSVolume_updateSize
=== RUN   TestAccAWSEBSVolume_updateType
=== PAUSE TestAccAWSEBSVolume_updateType
=== RUN   TestAccAWSEBSVolume_updateIops_Io1
=== PAUSE TestAccAWSEBSVolume_updateIops_Io1
=== RUN   TestAccAWSEBSVolume_updateIops_Io2
=== PAUSE TestAccAWSEBSVolume_updateIops_Io2
=== RUN   TestAccAWSEBSVolume_kmsKey
=== PAUSE TestAccAWSEBSVolume_kmsKey
=== RUN   TestAccAWSEBSVolume_NoIops
=== PAUSE TestAccAWSEBSVolume_NoIops
=== RUN   TestAccAWSEBSVolume_InvalidIopsForType
=== PAUSE TestAccAWSEBSVolume_InvalidIopsForType
=== RUN   TestAccAWSEBSVolume_withTags
=== PAUSE TestAccAWSEBSVolume_withTags
=== RUN   TestAccAWSEBSVolume_multiAttach
=== PAUSE TestAccAWSEBSVolume_multiAttach
=== RUN   TestAccAWSEBSVolume_outpost
=== PAUSE TestAccAWSEBSVolume_outpost
=== RUN   TestAccAWSEBSVolume_gp3_basic
=== PAUSE TestAccAWSEBSVolume_gp3_basic
=== RUN   TestAccAWSEBSVolume_gp3_throughput
=== PAUSE TestAccAWSEBSVolume_gp3_throughput
=== RUN   TestAccAWSEBSVolume_disappears
=== PAUSE TestAccAWSEBSVolume_disappears
=== CONT  TestAccAWSEBSVolume_basic
=== CONT  TestAccAWSEBSVolume_disappears
=== CONT  TestAccAWSEBSVolume_gp3_throughput
=== CONT  TestAccAWSEBSVolume_gp3_basic
=== CONT  TestAccAWSEBSVolume_outpost
=== CONT  TestAccAWSEBSVolume_multiAttach
=== CONT  TestAccAWSEBSVolume_withTags
=== CONT  TestAccAWSEBSVolume_InvalidIopsForType
=== CONT  TestAccAWSEBSVolume_NoIops
=== CONT  TestAccAWSEBSVolume_kmsKey
=== CONT  TestAccAWSEBSVolume_updateIops_Io2
=== CONT  TestAccAWSEBSVolume_updateIops_Io1
=== CONT  TestAccAWSEBSVolume_updateType
=== CONT  TestAccAWSEBSVolume_updateSize
=== CONT  TestAccAWSEBSVolume_updateAttachedEbsVolume
=== CONT  TestAccAWSEBSVolume_outpost
    data_source_aws_outposts_outposts_test.go:66: skipping since no Outposts found
--- SKIP: TestAccAWSEBSVolume_outpost (2.20s)
--- PASS: TestAccAWSEBSVolume_InvalidIopsForType (16.56s)
--- PASS: TestAccAWSEBSVolume_disappears (51.43s)
--- PASS: TestAccAWSEBSVolume_withTags (59.32s)
--- PASS: TestAccAWSEBSVolume_NoIops (59.53s)
--- PASS: TestAccAWSEBSVolume_basic (59.58s)
--- PASS: TestAccAWSEBSVolume_gp3_basic (62.54s)
--- PASS: TestAccAWSEBSVolume_multiAttach (62.95s)
--- PASS: TestAccAWSEBSVolume_kmsKey (64.01s)
--- PASS: TestAccAWSEBSVolume_updateType (90.32s)
--- PASS: TestAccAWSEBSVolume_gp3_throughput (91.32s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io2 (91.91s)
--- PASS: TestAccAWSEBSVolume_updateSize (92.72s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io1 (92.86s)
--- PASS: TestAccAWSEBSVolume_updateAttachedEbsVolume (189.76s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	189.874s
Acceptance test output:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEBSVolume_gp3'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEBSVolume_gp3 -timeout 120m
=== RUN   TestAccAWSEBSVolume_gp3_basic
=== PAUSE TestAccAWSEBSVolume_gp3_basic
=== RUN   TestAccAWSEBSVolume_gp3_iops
=== PAUSE TestAccAWSEBSVolume_gp3_iops
=== RUN   TestAccAWSEBSVolume_gp3_throughput
=== PAUSE TestAccAWSEBSVolume_gp3_throughput
=== CONT  TestAccAWSEBSVolume_gp3_basic
=== CONT  TestAccAWSEBSVolume_gp3_throughput
=== CONT  TestAccAWSEBSVolume_gp3_iops
--- PASS: TestAccAWSEBSVolume_gp3_basic (31.18s)
--- PASS: TestAccAWSEBSVolume_gp3_iops (55.62s)
--- PASS: TestAccAWSEBSVolume_gp3_throughput (55.71s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	55.751s
@ewbankkit ewbankkit force-pushed the f-aws_ebs_volume-gp3-throughput branch from 9a56af4 to 52044ee Compare December 2, 2020 19:31
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Dec 2, 2020
Acceptance test output:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEbsVolumeDataSource_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEbsVolumeDataSource_ -timeout 120m
=== RUN   TestAccAWSEbsVolumeDataSource_basic
=== PAUSE TestAccAWSEbsVolumeDataSource_basic
=== RUN   TestAccAWSEbsVolumeDataSource_multipleFilters
=== PAUSE TestAccAWSEbsVolumeDataSource_multipleFilters
=== CONT  TestAccAWSEbsVolumeDataSource_basic
=== CONT  TestAccAWSEbsVolumeDataSource_multipleFilters
--- PASS: TestAccAWSEbsVolumeDataSource_basic (25.19s)
--- PASS: TestAccAWSEbsVolumeDataSource_multipleFilters (26.17s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	26.219s
…icorp#15893).

Acceptance test output:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEBSVolume_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEBSVolume_ -timeout 120m
=== RUN   TestAccAWSEBSVolume_basic
=== PAUSE TestAccAWSEBSVolume_basic
=== RUN   TestAccAWSEBSVolume_updateAttachedEbsVolume
=== PAUSE TestAccAWSEBSVolume_updateAttachedEbsVolume
=== RUN   TestAccAWSEBSVolume_updateSize
=== PAUSE TestAccAWSEBSVolume_updateSize
=== RUN   TestAccAWSEBSVolume_updateType
=== PAUSE TestAccAWSEBSVolume_updateType
=== RUN   TestAccAWSEBSVolume_updateIops_Io1
=== PAUSE TestAccAWSEBSVolume_updateIops_Io1
=== RUN   TestAccAWSEBSVolume_updateIops_Io2
=== PAUSE TestAccAWSEBSVolume_updateIops_Io2
=== RUN   TestAccAWSEBSVolume_kmsKey
=== PAUSE TestAccAWSEBSVolume_kmsKey
=== RUN   TestAccAWSEBSVolume_NoIops
=== PAUSE TestAccAWSEBSVolume_NoIops
=== RUN   TestAccAWSEBSVolume_InvalidIopsForType
=== PAUSE TestAccAWSEBSVolume_InvalidIopsForType
=== RUN   TestAccAWSEBSVolume_withTags
=== PAUSE TestAccAWSEBSVolume_withTags
=== RUN   TestAccAWSEBSVolume_multiAttach
=== PAUSE TestAccAWSEBSVolume_multiAttach
=== RUN   TestAccAWSEBSVolume_outpost
=== PAUSE TestAccAWSEBSVolume_outpost
=== RUN   TestAccAWSEBSVolume_gp3_basic
=== PAUSE TestAccAWSEBSVolume_gp3_basic
=== RUN   TestAccAWSEBSVolume_gp3_iops
=== PAUSE TestAccAWSEBSVolume_gp3_iops
=== RUN   TestAccAWSEBSVolume_gp3_throughput
=== PAUSE TestAccAWSEBSVolume_gp3_throughput
=== RUN   TestAccAWSEBSVolume_disappears
=== PAUSE TestAccAWSEBSVolume_disappears
=== CONT  TestAccAWSEBSVolume_basic
=== CONT  TestAccAWSEBSVolume_withTags
=== CONT  TestAccAWSEBSVolume_disappears
=== CONT  TestAccAWSEBSVolume_gp3_throughput
=== CONT  TestAccAWSEBSVolume_gp3_iops
=== CONT  TestAccAWSEBSVolume_gp3_basic
=== CONT  TestAccAWSEBSVolume_outpost
=== CONT  TestAccAWSEBSVolume_multiAttach
=== CONT  TestAccAWSEBSVolume_updateIops_Io2
=== CONT  TestAccAWSEBSVolume_InvalidIopsForType
=== CONT  TestAccAWSEBSVolume_NoIops
=== CONT  TestAccAWSEBSVolume_kmsKey
=== CONT  TestAccAWSEBSVolume_updateType
=== CONT  TestAccAWSEBSVolume_updateIops_Io1
=== CONT  TestAccAWSEBSVolume_updateSize
=== CONT  TestAccAWSEBSVolume_updateAttachedEbsVolume
=== CONT  TestAccAWSEBSVolume_outpost
    data_source_aws_outposts_outposts_test.go:66: skipping since no Outposts found
--- SKIP: TestAccAWSEBSVolume_outpost (2.13s)
--- PASS: TestAccAWSEBSVolume_InvalidIopsForType (17.40s)
--- PASS: TestAccAWSEBSVolume_disappears (52.68s)
--- PASS: TestAccAWSEBSVolume_NoIops (55.37s)
--- PASS: TestAccAWSEBSVolume_gp3_basic (64.85s)
--- PASS: TestAccAWSEBSVolume_basic (65.87s)
--- PASS: TestAccAWSEBSVolume_multiAttach (66.08s)
--- PASS: TestAccAWSEBSVolume_withTags (66.99s)
--- PASS: TestAccAWSEBSVolume_kmsKey (67.13s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io1 (95.66s)
--- PASS: TestAccAWSEBSVolume_gp3_iops (96.68s)
--- PASS: TestAccAWSEBSVolume_updateType (98.48s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io2 (98.71s)
--- PASS: TestAccAWSEBSVolume_gp3_throughput (99.21s)
--- PASS: TestAccAWSEBSVolume_updateSize (99.32s)
--- PASS: TestAccAWSEBSVolume_updateAttachedEbsVolume (181.29s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	181.371s
@ewbankkit ewbankkit changed the title [WIP] aws_ebs_volume: gp3 volume scalable throughput aws_ebs_volume: gp3 volume scalable throughput Dec 2, 2020
Acceptance test output:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEBSVolume_InvalidThroughputForType'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEBSVolume_InvalidThroughputForType -timeout 120m
=== RUN   TestAccAWSEBSVolume_InvalidThroughputForType
=== PAUSE TestAccAWSEBSVolume_InvalidThroughputForType
=== CONT  TestAccAWSEBSVolume_InvalidThroughputForType
--- PASS: TestAccAWSEBSVolume_InvalidThroughputForType (4.68s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	4.732s
@ghost ghost added the documentation Introduces or discusses updates to documentation. label Dec 7, 2020
@ewbankkit
Copy link
Contributor Author

Re-ran acceptance tests:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEBSVolume_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEBSVolume_ -timeout 120m
=== RUN   TestAccAWSEBSVolume_basic
=== PAUSE TestAccAWSEBSVolume_basic
=== RUN   TestAccAWSEBSVolume_updateAttachedEbsVolume
=== PAUSE TestAccAWSEBSVolume_updateAttachedEbsVolume
=== RUN   TestAccAWSEBSVolume_updateSize
=== PAUSE TestAccAWSEBSVolume_updateSize
=== RUN   TestAccAWSEBSVolume_updateType
=== PAUSE TestAccAWSEBSVolume_updateType
=== RUN   TestAccAWSEBSVolume_updateIops_Io1
=== PAUSE TestAccAWSEBSVolume_updateIops_Io1
=== RUN   TestAccAWSEBSVolume_updateIops_Io2
=== PAUSE TestAccAWSEBSVolume_updateIops_Io2
=== RUN   TestAccAWSEBSVolume_kmsKey
=== PAUSE TestAccAWSEBSVolume_kmsKey
=== RUN   TestAccAWSEBSVolume_NoIops
=== PAUSE TestAccAWSEBSVolume_NoIops
=== RUN   TestAccAWSEBSVolume_InvalidIopsForType
=== PAUSE TestAccAWSEBSVolume_InvalidIopsForType
=== RUN   TestAccAWSEBSVolume_InvalidThroughputForType
=== PAUSE TestAccAWSEBSVolume_InvalidThroughputForType
=== RUN   TestAccAWSEBSVolume_withTags
=== PAUSE TestAccAWSEBSVolume_withTags
=== RUN   TestAccAWSEBSVolume_multiAttach
=== PAUSE TestAccAWSEBSVolume_multiAttach
=== RUN   TestAccAWSEBSVolume_outpost
=== PAUSE TestAccAWSEBSVolume_outpost
=== RUN   TestAccAWSEBSVolume_gp3_basic
=== PAUSE TestAccAWSEBSVolume_gp3_basic
=== RUN   TestAccAWSEBSVolume_gp3_iops
=== PAUSE TestAccAWSEBSVolume_gp3_iops
=== RUN   TestAccAWSEBSVolume_gp3_throughput
=== PAUSE TestAccAWSEBSVolume_gp3_throughput
=== RUN   TestAccAWSEBSVolume_disappears
=== PAUSE TestAccAWSEBSVolume_disappears
=== CONT  TestAccAWSEBSVolume_basic
=== CONT  TestAccAWSEBSVolume_InvalidThroughputForType
=== CONT  TestAccAWSEBSVolume_withTags
=== CONT  TestAccAWSEBSVolume_disappears
=== CONT  TestAccAWSEBSVolume_gp3_throughput
=== CONT  TestAccAWSEBSVolume_gp3_iops
=== CONT  TestAccAWSEBSVolume_gp3_basic
=== CONT  TestAccAWSEBSVolume_outpost
=== CONT  TestAccAWSEBSVolume_multiAttach
=== CONT  TestAccAWSEBSVolume_updateIops_Io2
=== CONT  TestAccAWSEBSVolume_InvalidIopsForType
=== CONT  TestAccAWSEBSVolume_NoIops
=== CONT  TestAccAWSEBSVolume_kmsKey
=== CONT  TestAccAWSEBSVolume_updateType
=== CONT  TestAccAWSEBSVolume_updateIops_Io1
=== CONT  TestAccAWSEBSVolume_updateSize
=== CONT  TestAccAWSEBSVolume_updateAttachedEbsVolume
=== CONT  TestAccAWSEBSVolume_outpost
    data_source_aws_outposts_outposts_test.go:66: skipping since no Outposts found
--- SKIP: TestAccAWSEBSVolume_outpost (2.23s)
--- PASS: TestAccAWSEBSVolume_InvalidIopsForType (20.31s)
--- PASS: TestAccAWSEBSVolume_InvalidThroughputForType (20.38s)
--- PASS: TestAccAWSEBSVolume_disappears (56.19s)
--- PASS: TestAccAWSEBSVolume_NoIops (64.44s)
--- PASS: TestAccAWSEBSVolume_gp3_basic (70.68s)
--- PASS: TestAccAWSEBSVolume_basic (70.71s)
--- PASS: TestAccAWSEBSVolume_multiAttach (70.84s)
--- PASS: TestAccAWSEBSVolume_withTags (71.61s)
--- PASS: TestAccAWSEBSVolume_kmsKey (72.73s)
--- PASS: TestAccAWSEBSVolume_updateSize (101.87s)
--- PASS: TestAccAWSEBSVolume_gp3_throughput (103.67s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io2 (104.24s)
--- PASS: TestAccAWSEBSVolume_updateType (104.26s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io1 (105.10s)
--- PASS: TestAccAWSEBSVolume_gp3_iops (105.12s)
--- PASS: TestAccAWSEBSVolume_updateAttachedEbsVolume (219.29s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	219.373s

@hakman
Copy link

hakman commented Jan 15, 2021

Hello and thanks for trying to add this fairly new attribute.
Would it be possible to add it to the review queue?
Having it added for resources and missing in others makes things a bit confusing.

@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 15, 2021
@bflad bflad self-assigned this Jan 19, 2021
@bflad bflad added this to the v3.25.0 milestone Jan 19, 2021
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks, @ewbankkit 🚀

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSEBSVolume_basic (66.62s)
--- PASS: TestAccAWSEBSVolume_disappears (56.99s)
--- PASS: TestAccAWSEBSVolume_gp3_basic (63.55s)
--- PASS: TestAccAWSEBSVolume_gp3_iops (91.99s)
--- PASS: TestAccAWSEBSVolume_gp3_throughput (90.69s)
--- PASS: TestAccAWSEBSVolume_InvalidIopsForType (9.87s)
--- PASS: TestAccAWSEBSVolume_InvalidThroughputForType (10.03s)
--- PASS: TestAccAWSEBSVolume_kmsKey (65.84s)
--- PASS: TestAccAWSEBSVolume_multiAttach (66.28s)
--- PASS: TestAccAWSEBSVolume_NoIops (63.62s)
--- PASS: TestAccAWSEBSVolume_updateAttachedEbsVolume (170.50s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io1 (91.00s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io2 (91.30s)
--- PASS: TestAccAWSEBSVolume_updateSize (82.58s)
--- PASS: TestAccAWSEBSVolume_updateType (92.09s)
--- PASS: TestAccAWSEBSVolume_withTags (66.49s)
--- SKIP: TestAccAWSEBSVolume_outpost (1.68s)

--- PASS: TestAccAWSEbsVolumeDataSource_basic (57.85s)
--- PASS: TestAccAWSEbsVolumeDataSource_multipleFilters (57.39s)

Output from acceptance testing in AWS GovCloud (US):

--- FAIL: TestAccAWSEBSVolume_multiAttach (12.16s) # unrelated; will ensure there is covering issue

    resource_aws_ebs_volume_test.go:398: Step 1/2 error: Error running apply:
        Error: Error creating EC2 volume: InvalidParameterValue: The specified zone does not support multi-attach-enabled volumes.
        	status code: 400, request id: 13ded026-b104-49b4-921e-f3cc20abfdc5

--- FAIL: TestAccAWSEBSVolume_updateIops_Io2 (12.52s) # unrelated; will ensure there is covering issue

    resource_aws_ebs_volume_test.go:248: Step 1/3 error: Error running apply:
        Error: Error creating EC2 volume: UnknownVolumeType: Unsupported volume type 'io2' for volume creation.
        	status code: 400, request id: 2e43e591-c913-491c-a9dd-4bf69031059c

--- PASS: TestAccAWSEBSVolume_basic (37.24s)
--- PASS: TestAccAWSEBSVolume_disappears (31.88s)
--- PASS: TestAccAWSEBSVolume_gp3_basic (38.94s)
--- PASS: TestAccAWSEBSVolume_gp3_iops (64.65s)
--- PASS: TestAccAWSEBSVolume_gp3_throughput (64.05s)
--- PASS: TestAccAWSEBSVolume_InvalidIopsForType (5.91s)
--- PASS: TestAccAWSEBSVolume_InvalidThroughputForType (7.92s)
--- PASS: TestAccAWSEBSVolume_kmsKey (41.00s)
--- PASS: TestAccAWSEBSVolume_NoIops (35.33s)
--- PASS: TestAccAWSEBSVolume_updateAttachedEbsVolume (172.84s)
--- PASS: TestAccAWSEBSVolume_updateIops_Io1 (64.67s)
--- PASS: TestAccAWSEBSVolume_updateSize (65.03s)
--- PASS: TestAccAWSEBSVolume_updateType (64.96s)
--- PASS: TestAccAWSEBSVolume_withTags (38.69s)
--- SKIP: TestAccAWSEBSVolume_outpost (2.43s)

--- PASS: TestAccAWSEbsVolumeDataSource_basic (29.45s)
--- PASS: TestAccAWSEbsVolumeDataSource_multipleFilters (29.91s)

Comment on lines +404 to +412
// MultiAttachEnabled is supported with io1 volumes only.
if multiAttachEnabled && volumeType != ec2.VolumeTypeIo1 {
return fmt.Errorf("'multi_attach_enabled' must not be set when 'type' is '%s'", volumeType)
}

// Throughput is valid only for gp3 volumes.
if throughput > 0 && volumeType != ec2.VolumeTypeGp3 {
return fmt.Errorf("'throughput' must not be set when 'type' is '%s'", volumeType)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting here that this type of validation can become a maintenance burden.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to agree but it's also no fun for practitioners to be hit with an error during apply that could have caught at plan or best validate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, no one is arguing against that. The challenge here is that this type of information is not programmatically encoded in the API model and can differ per partition (or in worse cases per region within a partition), which means it needs manual curation should changes need to occur over time. It is no fun for practitioners to also be artificially limited in the future from doing a perfectly valid API call while waiting for this project to be updated. The most pragmatic answer probably lies somewhere in between both ends of the spectrum, adding it where there is a strong community ask and a strong maintainer ability to keep it up to date versus omitting it when either is not true.

@bflad bflad merged commit ed86205 into hashicorp:master Jan 19, 2021
bflad added a commit that referenced this pull request Jan 19, 2021
@ewbankkit ewbankkit deleted the f-aws_ebs_volume-gp3-throughput branch January 19, 2021 15:28
@ghost
Copy link

ghost commented Jan 22, 2021

This has been released in version 3.25.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!

@ghost
Copy link

ghost commented Feb 18, 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 Feb 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants