-
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
Fix: Principal allowed returned multiple when expecting one #30974
Conversation
Community NoteVoting for Prioritization
For Submitters
|
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=TestAccVPCEndpointServiceAllowedPrincipal_' PKG=ec2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 2 -run=TestAccVPCEndpointServiceAllowedPrincipal_ -timeout 180m
=== RUN TestAccVPCEndpointServiceAllowedPrincipal_basic
=== PAUSE TestAccVPCEndpointServiceAllowedPrincipal_basic
=== RUN TestAccVPCEndpointServiceAllowedPrincipal_multiple
=== PAUSE TestAccVPCEndpointServiceAllowedPrincipal_multiple
=== RUN TestAccVPCEndpointServiceAllowedPrincipal_tags
=== PAUSE TestAccVPCEndpointServiceAllowedPrincipal_tags
=== RUN TestAccVPCEndpointServiceAllowedPrincipal_migrateID
=== PAUSE TestAccVPCEndpointServiceAllowedPrincipal_migrateID
=== RUN TestAccVPCEndpointServiceAllowedPrincipal_migrateAndTag
=== PAUSE TestAccVPCEndpointServiceAllowedPrincipal_migrateAndTag
=== CONT TestAccVPCEndpointServiceAllowedPrincipal_basic
=== CONT TestAccVPCEndpointServiceAllowedPrincipal_migrateID
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_basic (236.85s)
=== CONT TestAccVPCEndpointServiceAllowedPrincipal_migrateAndTag
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_migrateID (291.36s)
=== CONT TestAccVPCEndpointServiceAllowedPrincipal_tags
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_tags (244.29s)
=== CONT TestAccVPCEndpointServiceAllowedPrincipal_multiple
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_migrateAndTag (320.34s)
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_multiple (224.07s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 765.454s
@robh007 Thanks for the contribution 🎉 👏. I found that we have to do the
in our testing. |
Thanks for fixing it up @ewbankkit , apologies if I caused additional work. |
This functionality has been released in v4.65.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
A change was made to
vpc_endpoint_service_allowed
#27640 which introducedtfresource.AssertSingleResult
however the results returned from the call toFindVPCEndpointServicePermissions
didn't filter the result & anything above 1 allowed principal resulted in an error. I've also added an additional test which adds two service principals to be allowed access to the endpoint.Relations
Closes #30873.
Relates #27640.
References
Output from Acceptance Testing