-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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: Add custom Map type with semantic equality for tags
and tags_all
attributes
#38869
Conversation
Community NoteVoting for Prioritization
For Submitters
|
7ce4d6d
to
e41dedb
Compare
tags
and tags_all
attributestags
and tags_all
attributes
internal/tags/map.go
Outdated
} | ||
|
||
func (t mapType) String() string { | ||
return "fooMapType" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not foo
😄.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦
Do we need a CHANGELOG entry? |
There was a problem hiding this 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=TestAccVPCSecurityGroupIngressRule_' PKG=ec2 ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.0 test ./internal/service/ec2/... -v -count 1 -parallel 3 -run=TestAccVPCSecurityGroupIngressRule_ -timeout 360m
=== RUN TestAccVPCSecurityGroupIngressRule_tags
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags
=== RUN TestAccVPCSecurityGroupIngressRule_tags_null
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_null
=== RUN TestAccVPCSecurityGroupIngressRule_tags_AddOnUpdate
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_AddOnUpdate
=== RUN TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnCreate
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnCreate
=== RUN TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnUpdate_Add
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnUpdate_Add
=== RUN TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnUpdate_Replace
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnUpdate_Replace
=== RUN TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_providerOnly
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_providerOnly
=== RUN TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nonOverlapping
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nonOverlapping
=== RUN TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_overlapping
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_overlapping
=== RUN TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_updateToProviderOnly
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_updateToProviderOnly
=== RUN TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_updateToResourceOnly
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_updateToResourceOnly
=== RUN TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_emptyResourceTag
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_emptyResourceTag
=== RUN TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_emptyProviderOnlyTag
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_emptyProviderOnlyTag
=== RUN TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nullOverlappingResourceTag
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nullOverlappingResourceTag
=== RUN TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nullNonOverlappingResourceTag
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nullNonOverlappingResourceTag
=== RUN TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnCreate
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnCreate
=== RUN TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnUpdate_Add
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnUpdate_Add
=== RUN TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnUpdate_Replace
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnUpdate_Replace
=== RUN TestAccVPCSecurityGroupIngressRule_basic
=== PAUSE TestAccVPCSecurityGroupIngressRule_basic
=== RUN TestAccVPCSecurityGroupIngressRule_disappears
=== PAUSE TestAccVPCSecurityGroupIngressRule_disappears
=== RUN TestAccVPCSecurityGroupIngressRule_tags_defaultAndIgnoreTags
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_defaultAndIgnoreTags
=== RUN TestAccVPCSecurityGroupIngressRule_tags_ignoreTags
=== PAUSE TestAccVPCSecurityGroupIngressRule_tags_ignoreTags
=== RUN TestAccVPCSecurityGroupIngressRule_cidrIPv4
=== PAUSE TestAccVPCSecurityGroupIngressRule_cidrIPv4
=== RUN TestAccVPCSecurityGroupIngressRule_cidrIPv6
=== PAUSE TestAccVPCSecurityGroupIngressRule_cidrIPv6
=== RUN TestAccVPCSecurityGroupIngressRule_description
=== PAUSE TestAccVPCSecurityGroupIngressRule_description
=== RUN TestAccVPCSecurityGroupIngressRule_prefixListID
=== PAUSE TestAccVPCSecurityGroupIngressRule_prefixListID
=== RUN TestAccVPCSecurityGroupIngressRule_referencedSecurityGroupID
=== PAUSE TestAccVPCSecurityGroupIngressRule_referencedSecurityGroupID
=== RUN TestAccVPCSecurityGroupIngressRule_ReferencedSecurityGroupID_peerVPC
=== PAUSE TestAccVPCSecurityGroupIngressRule_ReferencedSecurityGroupID_peerVPC
=== RUN TestAccVPCSecurityGroupIngressRule_updateSourceType
=== PAUSE TestAccVPCSecurityGroupIngressRule_updateSourceType
=== CONT TestAccVPCSecurityGroupIngressRule_tags
=== CONT TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnCreate
=== CONT TestAccVPCSecurityGroupIngressRule_cidrIPv4
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnCreate (23.10s)
=== CONT TestAccVPCSecurityGroupIngressRule_disappears
--- PASS: TestAccVPCSecurityGroupIngressRule_cidrIPv4 (28.03s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_ignoreTags
--- PASS: TestAccVPCSecurityGroupIngressRule_disappears (16.85s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_defaultAndIgnoreTags
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_ignoreTags (24.96s)
=== CONT TestAccVPCSecurityGroupIngressRule_referencedSecurityGroupID
=== CONT TestAccVPCSecurityGroupIngressRule_updateSourceType
--- PASS: TestAccVPCSecurityGroupIngressRule_tags (55.99s)
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_defaultAndIgnoreTags (24.85s)
=== CONT TestAccVPCSecurityGroupIngressRule_ReferencedSecurityGroupID_peerVPC
vpc_security_group_ingress_rule_test.go:476: skipping test because at least one environment variable of [AWS_ALTERNATE_PROFILE AWS_ALTERNATE_ACCESS_KEY_ID] must be set. Usage: credentials for running acceptance testing in alternate AWS account.
--- SKIP: TestAccVPCSecurityGroupIngressRule_ReferencedSecurityGroupID_peerVPC (0.00s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_overlapping
--- PASS: TestAccVPCSecurityGroupIngressRule_referencedSecurityGroupID (29.37s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nullNonOverlappingResourceTag
--- PASS: TestAccVPCSecurityGroupIngressRule_updateSourceType (27.55s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nullOverlappingResourceTag
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nullNonOverlappingResourceTag (19.05s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_emptyProviderOnlyTag
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nullOverlappingResourceTag (19.10s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_emptyResourceTag
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_overlapping (49.04s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_updateToResourceOnly
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_emptyProviderOnlyTag (19.45s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_updateToProviderOnly
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_emptyResourceTag (19.58s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnUpdate_Add
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_updateToResourceOnly (30.82s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nonOverlapping
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_updateToProviderOnly (30.12s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_providerOnly
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnUpdate_Add (41.33s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnUpdate_Replace
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_nonOverlapping (46.53s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnUpdate_Replace
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnUpdate_Replace (28.49s)
=== CONT TestAccVPCSecurityGroupIngressRule_basic
--- PASS: TestAccVPCSecurityGroupIngressRule_basic (18.16s)
=== CONT TestAccVPCSecurityGroupIngressRule_description
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_DefaultTags_providerOnly (61.00s)
=== CONT TestAccVPCSecurityGroupIngressRule_prefixListID
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnUpdate_Replace (32.84s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnUpdate_Add
--- PASS: TestAccVPCSecurityGroupIngressRule_description (27.29s)
=== CONT TestAccVPCSecurityGroupIngressRule_cidrIPv6
--- PASS: TestAccVPCSecurityGroupIngressRule_prefixListID (37.38s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_AddOnUpdate
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_ComputedTag_OnUpdate_Add (33.05s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnCreate
--- PASS: TestAccVPCSecurityGroupIngressRule_cidrIPv6 (27.96s)
=== CONT TestAccVPCSecurityGroupIngressRule_tags_null
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_AddOnUpdate (29.51s)
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_null (18.63s)
--- PASS: TestAccVPCSecurityGroupIngressRule_tags_EmptyTag_OnCreate (31.43s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 293.774s
This functionality has been released in v5.66.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! |
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. |
Description
Adds a custom Map type with semantic equality for
tags
andtags_all
attributes. This prevents perpetual diffs when usingnull
-valued tags.