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_replication_configuration: update rule to a TypeList and mark rule.id as Computed and rule.prefix as Deprecated #23703

Merged
merged 5 commits into from
Mar 17, 2022

Conversation

anGie44
Copy link
Contributor

@anGie44 anGie44 commented Mar 16, 2022

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 #23487
Closes #23690

Description

  • rule as TypeSet has proven to be problematic, either producing odd plan-time diffs like an empty rule {} or not correctly ignoring the diff on rule.id when set as Computed. This seems similar to this issue Apply results in an incorrect Update for TypeSet with an unexpected empty element terraform-plugin-sdk#895 , where it too was mitigated by using a TypeList instead.
  • changing the data type doesn't seem like a breaking change in this direction, as the other way aroudn (List->Set), users could experience breaking changes if order is lost

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccS3BucketReplicationConfiguration_' PKG=s3 ACCTEST_PARALLELISM=5
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 5  -run=TestAccS3BucketReplicationConfiguration_ -timeout 180m
=== RUN   TestAccS3BucketReplicationConfiguration_basic
=== PAUSE TestAccS3BucketReplicationConfiguration_basic
=== RUN   TestAccS3BucketReplicationConfiguration_disappears
=== PAUSE TestAccS3BucketReplicationConfiguration_disappears
=== RUN   TestAccS3BucketReplicationConfiguration_multipleDestinationsEmptyFilter
=== PAUSE TestAccS3BucketReplicationConfiguration_multipleDestinationsEmptyFilter
=== RUN   TestAccS3BucketReplicationConfiguration_multipleDestinationsNonEmptyFilter
=== PAUSE TestAccS3BucketReplicationConfiguration_multipleDestinationsNonEmptyFilter
=== RUN   TestAccS3BucketReplicationConfiguration_twoDestination
=== PAUSE TestAccS3BucketReplicationConfiguration_twoDestination
=== RUN   TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAccessControlTranslation
=== PAUSE TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAccessControlTranslation
=== RUN   TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAddAccessControlTranslation
=== PAUSE TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAddAccessControlTranslation
=== RUN   TestAccS3BucketReplicationConfiguration_replicationTimeControl
=== PAUSE TestAccS3BucketReplicationConfiguration_replicationTimeControl
=== RUN   TestAccS3BucketReplicationConfiguration_replicaModifications
=== PAUSE TestAccS3BucketReplicationConfiguration_replicaModifications
=== RUN   TestAccS3BucketReplicationConfiguration_withoutId
=== PAUSE TestAccS3BucketReplicationConfiguration_withoutId
=== RUN   TestAccS3BucketReplicationConfiguration_withoutStorageClass
=== PAUSE TestAccS3BucketReplicationConfiguration_withoutStorageClass
=== RUN   TestAccS3BucketReplicationConfiguration_schemaV2
=== PAUSE TestAccS3BucketReplicationConfiguration_schemaV2
=== RUN   TestAccS3BucketReplicationConfiguration_schemaV2SameRegion
=== PAUSE TestAccS3BucketReplicationConfiguration_schemaV2SameRegion
=== RUN   TestAccS3BucketReplicationConfiguration_schemaV2DestinationMetrics
=== PAUSE TestAccS3BucketReplicationConfiguration_schemaV2DestinationMetrics
=== RUN   TestAccS3BucketReplicationConfiguration_existingObjectReplication
    bucket_replication_configuration_test.go:754: skipping test: AWS Technical Support request required to allow ExistingObjectReplication
--- SKIP: TestAccS3BucketReplicationConfiguration_existingObjectReplication (0.00s)
=== RUN   TestAccS3BucketReplicationConfiguration_filter_emptyConfigurationBlock
=== PAUSE TestAccS3BucketReplicationConfiguration_filter_emptyConfigurationBlock
=== RUN   TestAccS3BucketReplicationConfiguration_filter_emptyPrefix
=== PAUSE TestAccS3BucketReplicationConfiguration_filter_emptyPrefix
=== RUN   TestAccS3BucketReplicationConfiguration_filter_tagFilter
=== PAUSE TestAccS3BucketReplicationConfiguration_filter_tagFilter
=== RUN   TestAccS3BucketReplicationConfiguration_filter_andOperator
=== PAUSE TestAccS3BucketReplicationConfiguration_filter_andOperator
=== RUN   TestAccS3BucketReplicationConfiguration_filter_withoutId
=== PAUSE TestAccS3BucketReplicationConfiguration_filter_withoutId
=== RUN   TestAccS3BucketReplicationConfiguration_withoutPrefix
=== PAUSE TestAccS3BucketReplicationConfiguration_withoutPrefix
=== CONT  TestAccS3BucketReplicationConfiguration_basic
=== CONT  TestAccS3BucketReplicationConfiguration_withoutStorageClass
=== CONT  TestAccS3BucketReplicationConfiguration_withoutPrefix
=== CONT  TestAccS3BucketReplicationConfiguration_filter_emptyPrefix
=== CONT  TestAccS3BucketReplicationConfiguration_filter_emptyConfigurationBlock
--- PASS: TestAccS3BucketReplicationConfiguration_filter_emptyConfigurationBlock (275.71s)
=== CONT  TestAccS3BucketReplicationConfiguration_schemaV2DestinationMetrics
--- PASS: TestAccS3BucketReplicationConfiguration_filter_emptyPrefix (275.87s)
=== CONT  TestAccS3BucketReplicationConfiguration_schemaV2SameRegion
--- PASS: TestAccS3BucketReplicationConfiguration_withoutPrefix (276.46s)
=== CONT  TestAccS3BucketReplicationConfiguration_schemaV2
=== CONT  TestAccS3BucketReplicationConfiguration_multipleDestinationsNonEmptyFilter
--- PASS: TestAccS3BucketReplicationConfiguration_withoutStorageClass (276.61s)
--- PASS: TestAccS3BucketReplicationConfiguration_basic (316.29s)
=== CONT  TestAccS3BucketReplicationConfiguration_twoDestination
--- PASS: TestAccS3BucketReplicationConfiguration_schemaV2SameRegion (153.64s)
=== CONT  TestAccS3BucketReplicationConfiguration_filter_andOperator
--- PASS: TestAccS3BucketReplicationConfiguration_schemaV2 (271.28s)
=== CONT  TestAccS3BucketReplicationConfiguration_filter_withoutId
--- PASS: TestAccS3BucketReplicationConfiguration_schemaV2DestinationMetrics (272.49s)
=== CONT  TestAccS3BucketReplicationConfiguration_filter_tagFilter
--- PASS: TestAccS3BucketReplicationConfiguration_multipleDestinationsNonEmptyFilter (271.56s)
=== CONT  TestAccS3BucketReplicationConfiguration_replicaModifications
--- PASS: TestAccS3BucketReplicationConfiguration_twoDestination (269.48s)
=== CONT  TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAccessControlTranslation
--- PASS: TestAccS3BucketReplicationConfiguration_filter_andOperator (302.09s)
=== CONT  TestAccS3BucketReplicationConfiguration_replicationTimeControl
--- PASS: TestAccS3BucketReplicationConfiguration_filter_withoutId (272.93s)
=== CONT  TestAccS3BucketReplicationConfiguration_withoutId
--- PASS: TestAccS3BucketReplicationConfiguration_filter_tagFilter (283.64s)
=== CONT  TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAddAccessControlTranslation
--- PASS: TestAccS3BucketReplicationConfiguration_replicaModifications (286.86s)
=== CONT  TestAccS3BucketReplicationConfiguration_multipleDestinationsEmptyFilter
--- PASS: TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAccessControlTranslation (300.15s)
=== CONT  TestAccS3BucketReplicationConfiguration_disappears
--- PASS: TestAccS3BucketReplicationConfiguration_disappears (24.78s)
--- PASS: TestAccS3BucketReplicationConfiguration_replicationTimeControl (267.55s)
--- PASS: TestAccS3BucketReplicationConfiguration_withoutId (267.86s)
--- PASS: TestAccS3BucketReplicationConfiguration_multipleDestinationsEmptyFilter (267.69s)
--- PASS: TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAddAccessControlTranslation (291.11s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	1127.236s

@github-actions github-actions bot added service/s3 Issues and PRs that pertain to the s3 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/M Managed by automation to categorize the size of a PR. labels Mar 16, 2022
@anGie44 anGie44 changed the title r/s3_bucket_replication_configuration: update rule to a TypeList and mark rule.id as Computed r/s3_bucket_replication_configuration: update rule to a TypeList and mark rule.id as Computed Mar 16, 2022
@anGie44 anGie44 added the bug Addresses a defect in current functionality. label Mar 16, 2022
@anGie44 anGie44 force-pushed the b-s3-bucket-replication-configuration-to-typelist branch from c47f670 to adcb22f Compare March 16, 2022 04:15
@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Mar 16, 2022
@anGie44 anGie44 force-pushed the b-s3-bucket-replication-configuration-to-typelist branch from b1b542b to f3f45b2 Compare March 16, 2022 04:40
@github-actions github-actions bot 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 Mar 16, 2022
@anGie44 anGie44 force-pushed the b-s3-bucket-replication-configuration-to-typelist branch from 633ef8a to b01f01d Compare March 17, 2022 17:34
@anGie44 anGie44 marked this pull request as ready for review March 17, 2022 17:48
@anGie44 anGie44 changed the title r/s3_bucket_replication_configuration: update rule to a TypeList and mark rule.id as Computed r/s3_bucket_replication_configuration: update rule to a TypeList and mark rule.id as Computed and rule.prefix as Deprecated Mar 17, 2022
@ewbankkit ewbankkit self-assigned this Mar 17, 2022
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 🚀.

% make testacc TESTARGS='-run=TestAccS3BucketReplicationConfiguration_' PKG=s3 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 2  -run=TestAccS3BucketReplicationConfiguration_ -timeout 180m
=== RUN   TestAccS3BucketReplicationConfiguration_basic
=== PAUSE TestAccS3BucketReplicationConfiguration_basic
=== RUN   TestAccS3BucketReplicationConfiguration_disappears
=== PAUSE TestAccS3BucketReplicationConfiguration_disappears
=== RUN   TestAccS3BucketReplicationConfiguration_multipleDestinationsEmptyFilter
=== PAUSE TestAccS3BucketReplicationConfiguration_multipleDestinationsEmptyFilter
=== RUN   TestAccS3BucketReplicationConfiguration_multipleDestinationsNonEmptyFilter
=== PAUSE TestAccS3BucketReplicationConfiguration_multipleDestinationsNonEmptyFilter
=== RUN   TestAccS3BucketReplicationConfiguration_twoDestination
=== PAUSE TestAccS3BucketReplicationConfiguration_twoDestination
=== RUN   TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAccessControlTranslation
=== PAUSE TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAccessControlTranslation
=== RUN   TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAddAccessControlTranslation
=== PAUSE TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAddAccessControlTranslation
=== RUN   TestAccS3BucketReplicationConfiguration_replicationTimeControl
=== PAUSE TestAccS3BucketReplicationConfiguration_replicationTimeControl
=== RUN   TestAccS3BucketReplicationConfiguration_replicaModifications
=== PAUSE TestAccS3BucketReplicationConfiguration_replicaModifications
=== RUN   TestAccS3BucketReplicationConfiguration_withoutId
=== PAUSE TestAccS3BucketReplicationConfiguration_withoutId
=== RUN   TestAccS3BucketReplicationConfiguration_withoutStorageClass
=== PAUSE TestAccS3BucketReplicationConfiguration_withoutStorageClass
=== RUN   TestAccS3BucketReplicationConfiguration_schemaV2
=== PAUSE TestAccS3BucketReplicationConfiguration_schemaV2
=== RUN   TestAccS3BucketReplicationConfiguration_schemaV2SameRegion
=== PAUSE TestAccS3BucketReplicationConfiguration_schemaV2SameRegion
=== RUN   TestAccS3BucketReplicationConfiguration_schemaV2DestinationMetrics
=== PAUSE TestAccS3BucketReplicationConfiguration_schemaV2DestinationMetrics
=== RUN   TestAccS3BucketReplicationConfiguration_existingObjectReplication
    bucket_replication_configuration_test.go:754: skipping test: AWS Technical Support request required to allow ExistingObjectReplication
--- SKIP: TestAccS3BucketReplicationConfiguration_existingObjectReplication (0.00s)
=== RUN   TestAccS3BucketReplicationConfiguration_filter_emptyConfigurationBlock
=== PAUSE TestAccS3BucketReplicationConfiguration_filter_emptyConfigurationBlock
=== RUN   TestAccS3BucketReplicationConfiguration_filter_emptyPrefix
=== PAUSE TestAccS3BucketReplicationConfiguration_filter_emptyPrefix
=== RUN   TestAccS3BucketReplicationConfiguration_filter_tagFilter
=== PAUSE TestAccS3BucketReplicationConfiguration_filter_tagFilter
=== RUN   TestAccS3BucketReplicationConfiguration_filter_andOperator
=== PAUSE TestAccS3BucketReplicationConfiguration_filter_andOperator
=== RUN   TestAccS3BucketReplicationConfiguration_filter_withoutId
=== PAUSE TestAccS3BucketReplicationConfiguration_filter_withoutId
=== RUN   TestAccS3BucketReplicationConfiguration_withoutPrefix
=== PAUSE TestAccS3BucketReplicationConfiguration_withoutPrefix
=== CONT  TestAccS3BucketReplicationConfiguration_withoutStorageClass
=== CONT  TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAccessControlTranslation
--- PASS: TestAccS3BucketReplicationConfiguration_withoutStorageClass (279.68s)
=== CONT  TestAccS3BucketReplicationConfiguration_filter_emptyPrefix
--- PASS: TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAccessControlTranslation (310.03s)
=== CONT  TestAccS3BucketReplicationConfiguration_withoutPrefix
--- PASS: TestAccS3BucketReplicationConfiguration_filter_emptyPrefix (273.99s)
=== CONT  TestAccS3BucketReplicationConfiguration_filter_withoutId
--- PASS: TestAccS3BucketReplicationConfiguration_withoutPrefix (277.64s)
=== CONT  TestAccS3BucketReplicationConfiguration_filter_andOperator
--- PASS: TestAccS3BucketReplicationConfiguration_filter_withoutId (270.92s)
=== CONT  TestAccS3BucketReplicationConfiguration_filter_tagFilter
--- PASS: TestAccS3BucketReplicationConfiguration_filter_andOperator (290.68s)
=== CONT  TestAccS3BucketReplicationConfiguration_schemaV2DestinationMetrics
--- PASS: TestAccS3BucketReplicationConfiguration_filter_tagFilter (268.22s)
=== CONT  TestAccS3BucketReplicationConfiguration_filter_emptyConfigurationBlock
--- PASS: TestAccS3BucketReplicationConfiguration_schemaV2DestinationMetrics (267.63s)
=== CONT  TestAccS3BucketReplicationConfiguration_replicaModifications
--- PASS: TestAccS3BucketReplicationConfiguration_filter_emptyConfigurationBlock (274.01s)
=== CONT  TestAccS3BucketReplicationConfiguration_withoutId
--- PASS: TestAccS3BucketReplicationConfiguration_replicaModifications (273.47s)
=== CONT  TestAccS3BucketReplicationConfiguration_multipleDestinationsNonEmptyFilter
--- PASS: TestAccS3BucketReplicationConfiguration_withoutId (272.84s)
=== CONT  TestAccS3BucketReplicationConfiguration_twoDestination
--- PASS: TestAccS3BucketReplicationConfiguration_multipleDestinationsNonEmptyFilter (271.60s)
=== CONT  TestAccS3BucketReplicationConfiguration_replicationTimeControl
--- PASS: TestAccS3BucketReplicationConfiguration_twoDestination (281.91s)
=== CONT  TestAccS3BucketReplicationConfiguration_schemaV2SameRegion
--- PASS: TestAccS3BucketReplicationConfiguration_replicationTimeControl (272.56s)
=== CONT  TestAccS3BucketReplicationConfiguration_schemaV2
--- PASS: TestAccS3BucketReplicationConfiguration_schemaV2SameRegion (149.79s)
=== CONT  TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAddAccessControlTranslation
--- PASS: TestAccS3BucketReplicationConfiguration_schemaV2 (273.48s)
=== CONT  TestAccS3BucketReplicationConfiguration_multipleDestinationsEmptyFilter
--- PASS: TestAccS3BucketReplicationConfiguration_configurationRuleDestinationAddAccessControlTranslation (358.96s)
=== CONT  TestAccS3BucketReplicationConfiguration_disappears
--- PASS: TestAccS3BucketReplicationConfiguration_disappears (33.95s)
=== CONT  TestAccS3BucketReplicationConfiguration_basic
--- PASS: TestAccS3BucketReplicationConfiguration_multipleDestinationsEmptyFilter (285.49s)
--- PASS: TestAccS3BucketReplicationConfiguration_basic (320.37s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	2792.969s

@ewbankkit ewbankkit removed their assignment Mar 17, 2022
@anGie44 anGie44 added this to the v4.6.0 milestone Mar 17, 2022
@anGie44 anGie44 merged commit 0896842 into main Mar 17, 2022
@anGie44 anGie44 deleted the b-s3-bucket-replication-configuration-to-typelist branch March 17, 2022 23:30
github-actions bot pushed a commit that referenced this pull request Mar 17, 2022
@github-actions
Copy link

This functionality has been released in v4.6.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

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 10, 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. documentation Introduces or discusses updates to documentation. 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
2 participants