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

default tags: zero value, duplicate, and computed tags #30793

Merged
merged 28 commits into from
Apr 24, 2023

Conversation

johnsonaj
Copy link
Contributor

@johnsonaj johnsonaj commented Apr 18, 2023

Description

Update tags and default_tags to do the following using SDKv2.

  • Allow duplicate tags in both tags and default_tags. Default tags can be overwritten by resource tags.
  • Allow zero value "" tags in both tags and default_tags
  • Allow Computed tags.

Relations

Relates #29747
Relates #29842
Relates #24449

References

Output from Acceptance Testing

$ make testacc TESTARGS='-run=TestAccMediaLiveInputSecurityGroup_updateTags' PKG=medialive

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/medialive/... -v -count 1 -parallel 20  -run=TestAccMediaLiveInputSecurityGroup_updateTags -timeout 180m
=== RUN   TestAccMediaLiveInputSecurityGroup_updateTags
=== PAUSE TestAccMediaLiveInputSecurityGroup_updateTags
=== CONT  TestAccMediaLiveInputSecurityGroup_updateTags
--- PASS: TestAccMediaLiveInputSecurityGroup_updateTags (35.98s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/medialive	39.173s
...
$ make testacc TESTS='TestAccVPC_DefaultTags|TestAccVPC_tags|TestAccVPC_basic|TestAccVPC_disappears' PKG=vpc

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPC_DefaultTags|TestAccVPC_tags|TestAccVPC_basic|TestAccVPC_disappears'  -timeout 180m
--- PASS: TestAccVPC_disappears (16.05s)
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_duplicateTag (17.24s)
--- PASS: TestAccVPC_tags_computed (19.99s)
--- PASS: TestAccVPC_basic (21.83s)
--- PASS: TestAccVPC_DefaultTags_updateToResourceOnly (30.39s)
--- PASS: TestAccVPC_DefaultTags_updateToProviderOnly (30.47s)
--- PASS: TestAccVPC_DefaultTags_zeroValue (36.87s)
--- PASS: TestAccVPC_DefaultTags_providerOnlyTestAccVPC_DefaultTags_providerOnly (39.20s)
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_nonOverlappingTag (40.32s)
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_overlappingTag (40.32s)
--- PASS: TestAccVPC_tags (44.92s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	47.973s

@johnsonaj johnsonaj added this to the v5.0.0 milestone Apr 18, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. tags Pertains to resource tagging. verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.) labels Apr 18, 2023
@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. 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 Apr 19, 2023
@github-actions github-actions bot added the service/vpc Issues and PRs that pertain to the vpc service. label Apr 20, 2023
@johnsonaj johnsonaj marked this pull request as ready for review April 21, 2023 16:12
@johnsonaj johnsonaj changed the title default tags: zero value tags default tags: zero value, duplicate, and computed tags Apr 21, 2023
@johnsonaj johnsonaj changed the base branch from release/5.x to prerelease/5.x April 21, 2023 18:18
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Apr 21, 2023
@github-actions github-actions bot removed the documentation Introduces or discusses updates to documentation. label Apr 21, 2023
@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 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
provider Pertains to the provider itself, rather than any interaction with AWS. service/vpc Issues and PRs that pertain to the vpc service. size/XL Managed by automation to categorize the size of a PR. tags Pertains to resource tagging. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. verify Pertains to the verify package (i.e., provider-level validating, diff suppression, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants