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

r/ebs_snapshot - support storage tier + sweeper #22342

Merged
merged 20 commits into from
Jan 7, 2022

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Dec 24, 2021

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

Closes #17491.
Supersedes #17730.

Output from acceptance testing:

$ make testacc TESTS=TestAccEC2EBSSnapshot_ PKG=ec2

--- PASS: TestAccEC2EBSSnapshot_disappears (115.47s)
--- PASS: TestAccEC2EBSSnapshot_withDescription (128.47s)
--- PASS: TestAccEC2EBSSnapshot_basic (130.41s)
--- PASS: TestAccEC2EBSSnapshot_withKMS (150.40s)
--- PASS: TestAccEC2EBSSnapshot_storageTier (181.11s)
--- PASS: TestAccEC2EBSSnapshot_tags (227.18s)
$ make testacc TESTS=TestAccEC2EBSSnapshotImport_ PKG=ec2
--- PASS: TestAccEC2EBSSnapshotCopy_withRegions (91.20s)
--- PASS: TestAccEC2EBSSnapshotCopy_disappears (97.67s)--- PASS: TestAccEC2EBSSnapshotCopy_withDescription (97.85s)
--- PASS: TestAccEC2EBSSnapshotCopy_basic (98.01s)
--- PASS: TestAccEC2EBSSnapshotCopy_withKMS (99.05s)
--- PASS: TestAccEC2EBSSnapshotCopy_storageTier (157.43s)
--- PASS: TestAccEC2EBSSnapshotCopy_tags (180.89s)
$ make testacc TESTS=TestAccEC2EBSSnapshotCopy_ PKG=ec2
--- PASS: TestAccEC2EBSSnapshotImport_basic (202.33s)
--- PASS: TestAccEC2EBSSnapshotImport_disappears (207.32s)
--- PASS: TestAccEC2EBSSnapshotImport_Disappears_s3BucketObject (207.59s)
--- PASS: TestAccEC2EBSSnapshotImport_storageTier (314.20s)
--- PASS: TestAccEC2EBSSnapshotImport_tags (350.19s)
$ make testacc TESTS=TestAccEC2EBSSnapshotDataSource_ PKG=ec2
--- PASS: TestAccEC2EBSSnapshotDataSource_basic (86.74s)
--- PASS: TestAccEC2EBSSnapshotDataSource_filter (88.47s)
--- PASS: TestAccEC2EBSSnapshotDataSource_mostRecent (106.08s)

@github-actions github-actions bot added service/ec2 Issues and PRs that pertain to the ec2 service. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. labels Dec 24, 2021
@DrFaust92 DrFaust92 added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 24, 2021
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Dec 24, 2021
@DrFaust92 DrFaust92 changed the title r/ebs_snapshot - support storage tier r/ebs_snapshot - support storage tier + sweeper Dec 24, 2021
@DrFaust92 DrFaust92 marked this pull request as ready for review December 24, 2021 23:17
@ewbankkit ewbankkit mentioned this pull request Dec 31, 2021
…s resource Read is 'resourceEBSSnapshotRead'.
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

Commercial
% make testacc TESTARGS='-run=TestAccEC2EBSSnapshot_\|TestAccEC2EBSSnapshotImport_\|TestAccEC2EBSSnapshotCopy_\|TestAccEC2EBSSnapshotDataSource_' PKG=ec2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 2 -run=TestAccEC2EBSSnapshot_\|TestAccEC2EBSSnapshotImport_\|TestAccEC2EBSSnapshotCopy_\|TestAccEC2EBSSnapshotDataSource_ -timeout 180m
=== RUN   TestAccEC2EBSSnapshotCopy_basic
=== PAUSE TestAccEC2EBSSnapshotCopy_basic
=== RUN   TestAccEC2EBSSnapshotCopy_tags
=== PAUSE TestAccEC2EBSSnapshotCopy_tags
=== RUN   TestAccEC2EBSSnapshotCopy_withDescription
=== PAUSE TestAccEC2EBSSnapshotCopy_withDescription
=== RUN   TestAccEC2EBSSnapshotCopy_withRegions
=== PAUSE TestAccEC2EBSSnapshotCopy_withRegions
=== RUN   TestAccEC2EBSSnapshotCopy_withKMS
=== PAUSE TestAccEC2EBSSnapshotCopy_withKMS
=== RUN   TestAccEC2EBSSnapshotCopy_storageTier
=== PAUSE TestAccEC2EBSSnapshotCopy_storageTier
=== RUN   TestAccEC2EBSSnapshotCopy_disappears
=== PAUSE TestAccEC2EBSSnapshotCopy_disappears
=== RUN   TestAccEC2EBSSnapshotDataSource_basic
=== PAUSE TestAccEC2EBSSnapshotDataSource_basic
=== RUN   TestAccEC2EBSSnapshotDataSource_filter
=== PAUSE TestAccEC2EBSSnapshotDataSource_filter
=== RUN   TestAccEC2EBSSnapshotDataSource_mostRecent
=== PAUSE TestAccEC2EBSSnapshotDataSource_mostRecent
=== RUN   TestAccEC2EBSSnapshotImport_basic
=== PAUSE TestAccEC2EBSSnapshotImport_basic
=== RUN   TestAccEC2EBSSnapshotImport_tags
=== PAUSE TestAccEC2EBSSnapshotImport_tags
=== RUN   TestAccEC2EBSSnapshotImport_storageTier
=== PAUSE TestAccEC2EBSSnapshotImport_storageTier
=== RUN   TestAccEC2EBSSnapshotImport_disappears
=== PAUSE TestAccEC2EBSSnapshotImport_disappears
=== RUN   TestAccEC2EBSSnapshotImport_Disappears_s3BucketObject
=== PAUSE TestAccEC2EBSSnapshotImport_Disappears_s3BucketObject
=== RUN   TestAccEC2EBSSnapshot_basic
=== PAUSE TestAccEC2EBSSnapshot_basic
=== RUN   TestAccEC2EBSSnapshot_storageTier
=== PAUSE TestAccEC2EBSSnapshot_storageTier
=== RUN   TestAccEC2EBSSnapshot_outpost
=== PAUSE TestAccEC2EBSSnapshot_outpost
=== RUN   TestAccEC2EBSSnapshot_tags
=== PAUSE TestAccEC2EBSSnapshot_tags
=== RUN   TestAccEC2EBSSnapshot_withDescription
=== PAUSE TestAccEC2EBSSnapshot_withDescription
=== RUN   TestAccEC2EBSSnapshot_withKMS
=== PAUSE TestAccEC2EBSSnapshot_withKMS
=== RUN   TestAccEC2EBSSnapshot_disappears
=== PAUSE TestAccEC2EBSSnapshot_disappears
=== CONT  TestAccEC2EBSSnapshotCopy_basic
=== CONT  TestAccEC2EBSSnapshotImport_storageTier
--- PASS: TestAccEC2EBSSnapshotCopy_basic (45.82s)
=== CONT  TestAccEC2EBSSnapshot_disappears
--- PASS: TestAccEC2EBSSnapshot_disappears (54.12s)
=== CONT  TestAccEC2EBSSnapshot_withKMS
--- PASS: TestAccEC2EBSSnapshot_withKMS (38.23s)
=== CONT  TestAccEC2EBSSnapshot_withDescription
--- PASS: TestAccEC2EBSSnapshot_withDescription (44.50s)
=== CONT  TestAccEC2EBSSnapshot_tags
--- PASS: TestAccEC2EBSSnapshotImport_storageTier (242.50s)
=== CONT  TestAccEC2EBSSnapshot_outpost
    acctest.go:1254: skipping since no Outposts found
--- SKIP: TestAccEC2EBSSnapshot_outpost (0.63s)
=== CONT  TestAccEC2EBSSnapshot_storageTier
--- PASS: TestAccEC2EBSSnapshot_tags (69.59s)
=== CONT  TestAccEC2EBSSnapshot_basic
--- PASS: TestAccEC2EBSSnapshot_basic (45.61s)
=== CONT  TestAccEC2EBSSnapshotImport_Disappears_s3BucketObject
--- PASS: TestAccEC2EBSSnapshot_storageTier (112.94s)
==== CONT  TestAccEC2EBSSnapshotImport_disappears
--- PASS: TestAccEC2EBSSnapshotImport_disappears (145.84s)
=== CONT  TestAccEC2EBSSnapshotCopy_disappears
--- PASS: TestAccEC2EBSSnapshotCopy_disappears (47.65s)
=== CONT  TestAccEC2EBSSnapshotImport_tags
--- PASS: TestAccEC2EBSSnapshotImport_Disappears_s3BucketObject (139.95s)
=== CONT  TestAccEC2EBSSnapshotImport_basic
--- PASS: TestAccEC2EBSSnapshotImport_basic (140.46s)
=== CONT  TestAccEC2EBSSnapshotDataSource_mostRecent
--- PASS: TestAccEC2EBSSnapshotImport_tags (181.57s)
=== CONT  TestAccEC2EBSSnapshotDataSource_filter
--- PASS: TestAccEC2EBSSnapshotDataSource_mostRecent (78.01s)
=== CONT  TestAccEC2EBSSnapshotDataSource_basic
--- PASS: TestAccEC2EBSSnapshotDataSource_filter (47.50s)
=== CONT  TestAccEC2EBSSnapshotCopy_withRegions
--- PASS: TestAccEC2EBSSnapshotDataSource_basic (46.92s)
=== CONT  TestAccEC2EBSSnapshotCopy_storageTier
--- PASS: TestAccEC2EBSSnapshotCopy_withRegions (59.63s)
=== CONT  TestAccEC2EBSSnapshotCopy_withDescription
--- PASS: TestAccEC2EBSSnapshotCopy_withDescription (61.09s)
=== CONT  TestAccEC2EBSSnapshotCopy_tags
--- PASS: TestAccEC2EBSSnapshotCopy_storageTier (131.50s)
=== CONT  TestAccEC2EBSSnapshotCopy_withKMS
--- PASS: TestAccEC2EBSSnapshotCopy_tags (88.95s)
--- PASS: TestAccEC2EBSSnapshotCopy_withKMS (61.08s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	899.446s
GovCloud
% make testacc TESTARGS='-run=TestAccEC2EBSSnapshot_\|TestAccEC2EBSSnapshotImport_\|TestAccEC2EBSSnapshotCopy_\|TestAccEC2EBSSnapshotDataSource_' PKG=ec2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 2 -run=TestAccEC2EBSSnapshot_\|TestAccEC2EBSSnapshotImport_\|TestAccEC2EBSSnapshotCopy_\|TestAccEC2EBSSnapshotDataSource_ -timeout 180m
=== RUN   TestAccEC2EBSSnapshotCopy_basic
=== PAUSE TestAccEC2EBSSnapshotCopy_basic
=== RUN   TestAccEC2EBSSnapshotCopy_tags
=== PAUSE TestAccEC2EBSSnapshotCopy_tags
=== RUN   TestAccEC2EBSSnapshotCopy_withDescription
=== PAUSE TestAccEC2EBSSnapshotCopy_withDescription
=== RUN   TestAccEC2EBSSnapshotCopy_withRegions
=== PAUSE TestAccEC2EBSSnapshotCopy_withRegions
=== RUN   TestAccEC2EBSSnapshotCopy_withKMS
=== PAUSE TestAccEC2EBSSnapshotCopy_withKMS
=== RUN   TestAccEC2EBSSnapshotCopy_storageTier
=== PAUSE TestAccEC2EBSSnapshotCopy_storageTier
=== RUN   TestAccEC2EBSSnapshotCopy_disappears
=== PAUSE TestAccEC2EBSSnapshotCopy_disappears
=== RUN   TestAccEC2EBSSnapshotDataSource_basic
=== PAUSE TestAccEC2EBSSnapshotDataSource_basic
=== RUN   TestAccEC2EBSSnapshotDataSource_filter
=== PAUSE TestAccEC2EBSSnapshotDataSource_filter
=== RUN   TestAccEC2EBSSnapshotDataSource_mostRecent
=== PAUSE TestAccEC2EBSSnapshotDataSource_mostRecent
=== RUN   TestAccEC2EBSSnapshotImport_basic
=== PAUSE TestAccEC2EBSSnapshotImport_basic
=== RUN   TestAccEC2EBSSnapshotImport_tags
=== PAUSE TestAccEC2EBSSnapshotImport_tags
=== RUN   TestAccEC2EBSSnapshotImport_storageTier
=== PAUSE TestAccEC2EBSSnapshotImport_storageTier
=== RUN   TestAccEC2EBSSnapshotImport_disappears
=== PAUSE TestAccEC2EBSSnapshotImport_disappears
=== RUN   TestAccEC2EBSSnapshotImport_Disappears_s3BucketObject
=== PAUSE TestAccEC2EBSSnapshotImport_Disappears_s3BucketObject
=== RUN   TestAccEC2EBSSnapshot_basic
=== PAUSE TestAccEC2EBSSnapshot_basic
=== RUN   TestAccEC2EBSSnapshot_storageTier
=== PAUSE TestAccEC2EBSSnapshot_storageTier
=== RUN   TestAccEC2EBSSnapshot_outpost
=== PAUSE TestAccEC2EBSSnapshot_outpost
=== RUN   TestAccEC2EBSSnapshot_tags
=== PAUSE TestAccEC2EBSSnapshot_tags
=== RUN   TestAccEC2EBSSnapshot_withDescription
=== PAUSE TestAccEC2EBSSnapshot_withDescription
=== RUN   TestAccEC2EBSSnapshot_withKMS
=== PAUSE TestAccEC2EBSSnapshot_withKMS
=== RUN   TestAccEC2EBSSnapshot_disappears
=== PAUSE TestAccEC2EBSSnapshot_disappears
=== CONT  TestAccEC2EBSSnapshotCopy_basic
=== CONT  TestAccEC2EBSSnapshotImport_storageTier
--- PASS: TestAccEC2EBSSnapshotCopy_basic (81.31s)
=== CONT  TestAccEC2EBSSnapshot_tags
=== CONT  TestAccEC2EBSSnapshotImport_storageTier
    acctest.go:1007: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        
        Error: error setting EBS Snapshot Import (snap-04b9e49d0ee77fa21) Storage Tier: InvalidAction: The action ModifySnapshotTier is not valid for this web service.
        	status code: 400, request id: fde6b075-7d09-423e-8e1a-1a1a07a43085
        
          with aws_ebs_snapshot_import.test,
          on terraform_plugin_test.tf line 72, in resource "aws_ebs_snapshot_import" "test":
          72: resource "aws_ebs_snapshot_import" "test" {
        
--- SKIP: TestAccEC2EBSSnapshotImport_storageTier (145.78s)
=== CONT  TestAccEC2EBSSnapshot_disappears
--- PASS: TestAccEC2EBSSnapshot_tags (80.80s)
=== CONT  TestAccEC2EBSSnapshot_withKMS
--- PASS: TestAccEC2EBSSnapshot_disappears (46.02s)
=== CONT  TestAccEC2EBSSnapshot_withDescription
--- PASS: TestAccEC2EBSSnapshot_withKMS (58.17s)
=== CONT  TestAccEC2EBSSnapshotCopy_disappears
--- PASS: TestAccEC2EBSSnapshot_withDescription (53.99s)
=== CONT  TestAccEC2EBSSnapshotImport_tags
--- PASS: TestAccEC2EBSSnapshotCopy_disappears (67.59s)
=== CONT  TestAccEC2EBSSnapshotImport_basic
--- PASS: TestAccEC2EBSSnapshotImport_basic (162.44s)
=== CONT  TestAccEC2EBSSnapshotDataSource_mostRecent
--- PASS: TestAccEC2EBSSnapshotImport_tags (242.94s)
=== CONT  TestAccEC2EBSSnapshotDataSource_filter
--- PASS: TestAccEC2EBSSnapshotDataSource_mostRecent (67.85s)
=== CONT  TestAccEC2EBSSnapshotDataSource_basic
--- PASS: TestAccEC2EBSSnapshotDataSource_filter (57.84s)
=== CONT  TestAccEC2EBSSnapshotImport_Disappears_s3BucketObject
--- PASS: TestAccEC2EBSSnapshotDataSource_basic (49.24s)
=== CONT  TestAccEC2EBSSnapshot_outpost
    acctest.go:1254: skipping since no Outposts found
--- SKIP: TestAccEC2EBSSnapshot_outpost (0.68s)
=== CONT  TestAccEC2EBSSnapshot_storageTier
    acctest.go:1007: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        
        Error: error setting EBS Snapshot (snap-0e54834866f2cd530) Storage Tier: InvalidAction: The action ModifySnapshotTier is not valid for this web service.
        	status code: 400, request id: d47747ad-4fbc-4530-93a5-5db21af63933
        
          with aws_ebs_snapshot.test,
          on terraform_plugin_test.tf line 20, in resource "aws_ebs_snapshot" "test":
          20: resource "aws_ebs_snapshot" "test" {
        
--- SKIP: TestAccEC2EBSSnapshot_storageTier (40.44s)
=== CONT  TestAccEC2EBSSnapshotCopy_withRegions
--- PASS: TestAccEC2EBSSnapshotCopy_withRegions (95.95s)
=== CONT  TestAccEC2EBSSnapshotCopy_storageTier
--- PASS: TestAccEC2EBSSnapshotImport_Disappears_s3BucketObject (158.05s)
=== CONT  TestAccEC2EBSSnapshotCopy_withKMS
=== CONT  TestAccEC2EBSSnapshotCopy_storageTier
    acctest.go:1007: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        
        Error: error setting EBS Snapshot Copy (snap-0e4a566a9fde9541b) Storage Tier: InvalidAction: The action ModifySnapshotTier is not valid for this web service.
        	status code: 400, request id: 0a548336-d4d8-4e4b-9df0-a7cf13d1d72b
        
          with aws_ebs_snapshot_copy.test,
          on terraform_plugin_test.tf line 26, in resource "aws_ebs_snapshot_copy" "test":
          26: resource "aws_ebs_snapshot_copy" "test" {
        
--- SKIP: TestAccEC2EBSSnapshotCopy_storageTier (89.28s)
=== CONT  TestAccEC2EBSSnapshotCopy_withDescription
--- PASS: TestAccEC2EBSSnapshotCopy_withKMS (99.12s)
=== CONT  TestAccEC2EBSSnapshotCopy_tags
--- PASS: TestAccEC2EBSSnapshotCopy_withDescription (99.64s)
=== CONT  TestAccEC2EBSSnapshot_basic
    ebs_snapshot_test.go:23: Step 1/2 error: Check failed: Check 7/7 error: aws_ebs_snapshot.test: Attribute 'storage_tier' expected "standard", got ""
--- FAIL: TestAccEC2EBSSnapshot_basic (41.04s)
=== CONT  TestAccEC2EBSSnapshotImport_disappears
--- PASS: TestAccEC2EBSSnapshotCopy_tags (139.69s)
--- PASS: TestAccEC2EBSSnapshotImport_disappears (172.56s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	1110.559s
FAIL
make: *** [testacc] Error 1

@ewbankkit ewbankkit merged commit 292f480 into hashicorp:main Jan 7, 2022
@github-actions github-actions bot added this to the v3.72.0 milestone Jan 7, 2022
@github-actions
Copy link

This functionality has been released in v3.72.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!

@DrFaust92 DrFaust92 deleted the r/ec2_ebs_snapshot branch February 12, 2022 12:52
@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, 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 May 19, 2022
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. sweeper Pertains to changes to or issues with the sweeper. 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.

outpost_arn support for aws_ebs_snapshot
2 participants