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

tags: ignore null config tags when tags are computed #31687

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

johnsonaj
Copy link
Contributor

@johnsonaj johnsonaj commented May 31, 2023

Description

tags can be null and used as placeholder values. These null values should be ignored when calculating values that should be applied

This may result in a crash if null tags are applied to a resource where other tags are computed.

Relations

Relates #31644

References

Output from Acceptance Testing

$ make testacc TESTARGS='-run=TestAccVPC_ -short' PKG=vpc
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20  -run=TestAccVPC_ -short -timeout 180m
    vpc_test.go:969: skipping long-running test in short mode
--- SKIP: TestAccVPC_IPAMIPv4BasicNetmask (0.00s)
    vpc_test.go:996: skipping long-running test in short mode
--- SKIP: TestAccVPC_IPAMIPv4BasicExplicitCIDR (0.00s)
    vpc_test.go:1024: skipping long-running test in short mode
--- SKIP: TestAccVPC_IPAMIPv6 (0.00s)
=== NAME  TestAccVPC_assignGeneratedIPv6CIDRBlockWithNetworkBorderGroup
    ec2_availability_zone_data_source_test.go:219: skipping since no Local Zones are available
--- SKIP: TestAccVPC_assignGeneratedIPv6CIDRBlockWithNetworkBorderGroup (1.30s)
--- PASS: TestAccVPC_disappears (38.84s)
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_duplicateTag (42.37s)
--- PASS: TestAccVPC_tags_computed (44.87s)
--- PASS: TestAccVPC_tags_null (45.98s)
--- PASS: TestAccVPC_basic (51.22s)
--- PASS: TestAccVPC_disabledDNSSupport (61.92s)
--- PASS: TestAccVPC_bothDNSOptionsSet (61.94s)
--- PASS: TestAccVPC_enableNetworkAddressUsageMetrics (62.23s)
--- PASS: TestAccVPC_DefaultTags_updateToProviderOnly (73.15s)
--- PASS: TestAccVPC_DynamicResourceTagsMergedWithLocals_ignoreChanges (75.12s)
--- PASS: TestAccVPC_DefaultTags_updateToResourceOnly (76.38s)
--- PASS: TestAccVPC_ignoreTags (78.65s)
--- PASS: TestAccVPC_defaultAndIgnoreTags (78.96s)
--- PASS: TestAccVPC_updateDNSHostnames (80.26s)
--- PASS: TestAccVPC_DefaultTags_zeroValue (84.87s)
--- PASS: TestAccVPC_DefaultTags_providerOnlyTestAccVPC_DefaultTags_providerOnly (88.74s)
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_nonOverlappingTag (90.27s)
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_overlappingTag (90.77s)
--- PASS: TestAccVPC_DynamicResourceTags_ignoreChanges (54.03s)
--- PASS: TestAccVPC_tenancy (94.25s)
--- PASS: TestAccVPC_tags (66.80s)
--- PASS: TestAccVPC_assignGeneratedIPv6CIDRBlock (114.63s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	117.955s

@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/XS Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. labels May 31, 2023
@johnsonaj johnsonaj added bug Addresses a defect in current functionality. tags Pertains to resource tagging. labels May 31, 2023
@johnsonaj johnsonaj marked this pull request as ready for review May 31, 2023 20:34
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 🚀.

@ewbankkit
Copy link
Contributor

Do this need a CHANGELOG entry?

@github-actions github-actions bot removed the tags Pertains to resource tagging. label Jun 1, 2023
@johnsonaj johnsonaj added the tags Pertains to resource tagging. label Jun 1, 2023
@johnsonaj johnsonaj merged commit 76e75e1 into main Jun 1, 2023
39 checks passed
@johnsonaj johnsonaj deleted the b-null-tags-computed branch June 1, 2023 13:56
@github-actions github-actions bot added this to the v5.1.0 milestone Jun 1, 2023
github-actions bot pushed a commit that referenced this pull request Jun 1, 2023
@github-actions
Copy link

github-actions bot commented Jun 1, 2023

This functionality has been released in v5.1.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 Jul 3, 2023

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 Jul 3, 2023
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. provider Pertains to the provider itself, rather than any interaction with AWS. size/XS Managed by automation to categorize the size of a PR. tags Pertains to resource tagging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants