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: fix for null tags in config #31587

Merged
merged 3 commits into from
May 26, 2023
Merged

Tags: fix for null tags in config #31587

merged 3 commits into from
May 26, 2023

Conversation

johnsonaj
Copy link
Contributor

@johnsonaj johnsonaj commented May 25, 2023

Description

null values can be used as placeholders for tags that are not configured. These values should be ignored when resolving tag differences.

Relations

Closes #31583
Closes #31586

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 (0.85s)
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_duplicateTag (31.26s)
--- PASS: TestAccVPC_tags_null (33.71s)
--- PASS: TestAccVPC_tags_computed (36.52s)
--- PASS: TestAccVPC_basic (41.38s)
--- PASS: TestAccVPC_bothDNSOptionsSet (51.27s)
--- PASS: TestAccVPC_enableNetworkAddressUsageMetrics (52.15s)
--- PASS: TestAccVPC_disabledDNSSupport (52.64s)
--- PASS: TestAccVPC_DefaultTags_updateToResourceOnly (57.54s)
--- PASS: TestAccVPC_disappears (23.38s)
--- PASS: TestAccVPC_DefaultTags_updateToProviderOnly (59.32s)
--- PASS: TestAccVPC_DynamicResourceTags_ignoreChanges (60.86s)
--- PASS: TestAccVPC_DynamicResourceTagsMergedWithLocals_ignoreChanges (61.29s)
--- PASS: TestAccVPC_defaultAndIgnoreTags (61.61s)
--- PASS: TestAccVPC_ignoreTags (62.98s)
--- PASS: TestAccVPC_updateDNSHostnames (63.97s)
--- PASS: TestAccVPC_DefaultTags_zeroValue (66.80s)
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_nonOverlappingTag (70.15s)
--- PASS: TestAccVPC_DefaultTags_providerOnlyTestAccVPC_DefaultTags_providerOnly (70.23s)
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_overlappingTag (70.82s)
--- PASS: TestAccVPC_tenancy (74.72s)
--- PASS: TestAccVPC_tags (56.09s)
--- PASS: TestAccVPC_assignGeneratedIPv6CIDRBlock (97.65s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	100.941s

@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 service/vpc Issues and PRs that pertain to the vpc service. tags Pertains to resource tagging. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/S Managed by automation to categorize the size of a PR. labels May 25, 2023
Copy link
Member

@jar-b jar-b 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=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

--- PASS: TestAccVPC_DefaultTagsProviderAndResource_duplicateTag (27.56s)
=== CONT  TestAccVPC_DefaultTags_zeroValue
--- PASS: TestAccVPC_tags_computed (35.27s)
=== CONT  TestAccVPC_disappears
--- PASS: TestAccVPC_basic (40.40s)
=== CONT  TestAccVPC_tags_null
--- PASS: TestAccVPC_enableNetworkAddressUsageMetrics (52.74s)
--- PASS: TestAccVPC_disabledDNSSupport (52.98s)
--- PASS: TestAccVPC_bothDNSOptionsSet (54.31s)
--- PASS: TestAccVPC_DefaultTags_updateToResourceOnly (57.37s)
--- PASS: TestAccVPC_disappears (24.73s)
--- PASS: TestAccVPC_DefaultTags_updateToProviderOnly (60.03s)
--- PASS: TestAccVPC_DynamicResourceTagsMergedWithLocals_ignoreChanges (61.45s)
--- PASS: TestAccVPC_DynamicResourceTags_ignoreChanges (61.71s)
--- PASS: TestAccVPC_ignoreTags (64.08s)
--- PASS: TestAccVPC_defaultAndIgnoreTags (64.97s)
--- PASS: TestAccVPC_updateDNSHostnames (66.40s)
--- PASS: TestAccVPC_tags_null (27.19s)
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_nonOverlappingTag (69.71s)
--- PASS: TestAccVPC_DefaultTagsProviderAndResource_overlappingTag (71.26s)
--- PASS: TestAccVPC_DefaultTags_providerOnlyTestAccVPC_DefaultTags_providerOnly (71.39s)
--- PASS: TestAccVPC_tags (76.47s)
--- PASS: TestAccVPC_tenancy (77.66s)
--- PASS: TestAccVPC_DefaultTags_zeroValue (52.34s)
--- PASS: TestAccVPC_assignGeneratedIPv6CIDRBlockWithNetworkBorderGroup (92.09s)
--- PASS: TestAccVPC_assignGeneratedIPv6CIDRBlock (101.82s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        105.123s

@johnsonaj johnsonaj added this to the v5.0.1 milestone May 26, 2023
@johnsonaj johnsonaj merged commit 048a82c into main May 26, 2023
38 checks passed
@johnsonaj johnsonaj deleted the b-null-tag-values branch May 26, 2023 14:47
github-actions bot pushed a commit that referenced this pull request May 26, 2023
@github-actions
Copy link

This functionality has been released in v5.0.1 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 Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/vpc Issues and PRs that pertain to the vpc service. size/S 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Tf 5.0.0 crashes at apply step. [Bug]: aws_lambda_function resource causing plugin not to respond.
2 participants