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/s3_bucket_intelligent_tiering_configuration: New Resource #20329

Conversation

daniepett
Copy link

@daniepett daniepett commented Jul 27, 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 #16123

Example

resource "aws_s3_bucket_intelligent_tiering_configuration" "example" {
  bucket = "my-bucket-name"
  name   = "example-tier"

  filter {
    prefix = "test/"

    tags = {
      name = "example"
    }
  }

  tier {
    access_tier = "DEEP_ARCHIVE_ACCESS"
    days        = 180
  }

  tier {
    access_tier = "ARCHIVE_ACCESS"
    days        = 125
  }

}

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSS3BucketIntelligentTieringConfiguration_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSS3BucketIntelligentTieringConfiguration_ -timeout 180m
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_basic
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_basic
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_removed
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_removed
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_disableBasic
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_disableBasic
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_updateBasic
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_updateBasic
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Empty
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Empty
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Prefix
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Prefix
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_SingleTag
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_SingleTag
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_MultipleTags
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_MultipleTags
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_PrefixAndTags
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_PrefixAndTags
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Remove
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Remove
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_WithTier_Empty
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_WithTier_Empty
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_WithTwoTiers_Default
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_WithTwoTiers_Default
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_WithOneTier_UpdateDays
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_WithOneTier_UpdateDays
=== RUN   TestAccAWSS3BucketIntelligentTieringConfiguration_WithTwoTiers_RemoveOne
=== PAUSE TestAccAWSS3BucketIntelligentTieringConfiguration_WithTwoTiers_RemoveOne
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_basic
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_PrefixAndTags
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Remove
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Empty
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_MultipleTags
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_SingleTag
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Prefix
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_WithOneTier_UpdateDays
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_WithTwoTiers_RemoveOne
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_WithTier_Empty
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_WithTwoTiers_Default
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_updateBasic
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_disableBasic
=== CONT  TestAccAWSS3BucketIntelligentTieringConfiguration_removed
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_WithTier_Empty (24.26s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Empty (24.97s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_basic (94.91s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_WithTwoTiers_Default (98.00s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_removed (134.45s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_disableBasic (149.40s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_SingleTag (153.90s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_WithTwoTiers_RemoveOne (153.95s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_MultipleTags (155.14s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Prefix (156.40s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_Remove (156.61s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_WithOneTier_UpdateDays (156.62s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_WithFilter_PrefixAndTags (156.68s)
--- PASS: TestAccAWSS3BucketIntelligentTieringConfiguration_updateBasic (203.35s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       205.230s
...

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/s3 Issues and PRs that pertain to the s3 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. size/XL Managed by automation to categorize the size of a PR. labels Jul 27, 2021
@breathingdust breathingdust added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 31, 2021
@KVInventoR
Copy link

how will be it work if you setup many policies for different folders?

I think configuration for specific folder should in included in namespace for this folder.

@zhelding
Copy link
Contributor

Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding.

Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single aws directory to a large number of separate directories in internal/service, each corresponding to a particular AWS service. This separation of code has also allowed for us to simplify the names of underlying functions -- while still avoiding namespace collisions.

We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author.

For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000.

For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide.

@ewbankkit ewbankkit self-assigned this Nov 10, 2021
Daniel Pettersen and others added 4 commits November 10, 2021 15:20
Acceptance test output:

% make testacc PKG_NAME=internal/service/s3 TESTARGS='-run=TestAccS3BucketIntelligentTieringConfiguration_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run=TestAccS3BucketIntelligentTieringConfiguration_ -timeout 180m
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_basic
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_basic
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_disableBasic
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_disableBasic
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_updateBasic
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_updateBasic
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Empty
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Empty
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Prefix
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Prefix
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_WithFilter_SingleTag
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_WithFilter_SingleTag
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_WithFilter_MultipleTags
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_WithFilter_MultipleTags
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_WithFilter_PrefixAndTags
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_WithFilter_PrefixAndTags
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Remove
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Remove
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_WithTier_Empty
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_WithTier_Empty
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_basic
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_WithTier_Empty
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_WithFilter_SingleTag
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_WithFilter_MultipleTags
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Remove
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_WithFilter_PrefixAndTags
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Empty
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Prefix
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_disableBasic
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_updateBasic
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_WithTier_Empty (3.00s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Empty (3.18s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_basic (34.85s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_WithFilter_MultipleTags (60.70s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Prefix (60.70s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_WithFilter_Remove (60.72s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_disableBasic (60.72s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_WithFilter_SingleTag (60.72s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_WithFilter_PrefixAndTags (60.75s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_updateBasic (86.88s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	90.313s
@ewbankkit ewbankkit force-pushed the f-aws_s3_bucket_intelligent_tiering_configuration_add branch from 35e7d6c to 9a3dcbc Compare November 10, 2021 21:37
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 PKG_NAME=internal/service/s3 TESTARGS='-run=TestAccS3BucketIntelligentTieringConfiguration_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run=TestAccS3BucketIntelligentTieringConfiguration_ -timeout 180m
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_basic
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_basic
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_disappears
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_disappears
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_Filter
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_Filter
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_basic
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_Filter
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_disappears
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_disappears (25.23s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_basic (27.99s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_Filter (107.78s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	111.337s
GovCloud
% make testacc PKG_NAME=internal/service/s3 TESTARGS='-run=TestAccS3BucketIntelligentTieringConfiguration_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run=TestAccS3BucketIntelligentTieringConfiguration_ -timeout 180m
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_basic
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_basic
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_disappears
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_disappears
=== RUN   TestAccS3BucketIntelligentTieringConfiguration_Filter
=== PAUSE TestAccS3BucketIntelligentTieringConfiguration_Filter
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_basic
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_Filter
=== CONT  TestAccS3BucketIntelligentTieringConfiguration_disappears
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_disappears (28.16s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_basic (31.24s)
--- PASS: TestAccS3BucketIntelligentTieringConfiguration_Filter (126.74s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	130.097s

@ewbankkit
Copy link
Contributor

@daniepett Thanks for the contribution 🎉 👏.

@ewbankkit
Copy link
Contributor

% make golangci-lint
==> Checking source code with golangci-lint...

@ewbankkit ewbankkit merged commit 3f53edb into hashicorp:main Nov 11, 2021
@github-actions github-actions bot added this to the v3.65.0 milestone Nov 11, 2021
@github-actions
Copy link

This functionality has been released in v3.65.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 Jun 9, 2022

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 Jun 9, 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. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/s3 Issues and PRs that pertain to the s3 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.

S3 Intelligent-Tiering Archive configuration
6 participants