-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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: aws_verifiedaccess_group policy can't be set when no policy was set initially #34054
Fix: aws_verifiedaccess_group policy can't be set when no policy was set initially #34054
Conversation
This fixes an issue where, when no policy was set previously, the update would fail. Also added two new test cases - TestAccVerifiedAccessGroup_setPolicy to check when a policy is set on a resources that previously didn't have one attached. - TestAccVerifiedAccessGroup_updatePolicy to check the behaviour when updating an existing policy.
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=TestAccVerifiedAccessGroup_' 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=TestAccVerifiedAccessGroup_ -timeout 360m
=== RUN TestAccVerifiedAccessGroup_basic
=== PAUSE TestAccVerifiedAccessGroup_basic
=== RUN TestAccVerifiedAccessGroup_disappears
=== PAUSE TestAccVerifiedAccessGroup_disappears
=== RUN TestAccVerifiedAccessGroup_tags
=== PAUSE TestAccVerifiedAccessGroup_tags
=== RUN TestAccVerifiedAccessGroup_policy
=== PAUSE TestAccVerifiedAccessGroup_policy
=== RUN TestAccVerifiedAccessGroup_updatePolicy
=== PAUSE TestAccVerifiedAccessGroup_updatePolicy
=== RUN TestAccVerifiedAccessGroup_setPolicy
=== PAUSE TestAccVerifiedAccessGroup_setPolicy
=== CONT TestAccVerifiedAccessGroup_basic
=== CONT TestAccVerifiedAccessGroup_policy
--- PASS: TestAccVerifiedAccessGroup_basic (29.65s)
=== CONT TestAccVerifiedAccessGroup_tags
--- PASS: TestAccVerifiedAccessGroup_policy (30.05s)
=== CONT TestAccVerifiedAccessGroup_disappears
--- PASS: TestAccVerifiedAccessGroup_disappears (25.56s)
=== CONT TestAccVerifiedAccessGroup_setPolicy
--- PASS: TestAccVerifiedAccessGroup_tags (69.63s)
=== CONT TestAccVerifiedAccessGroup_updatePolicy
--- PASS: TestAccVerifiedAccessGroup_setPolicy (54.57s)
--- PASS: TestAccVerifiedAccessGroup_updatePolicy (49.93s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 154.467s
@sQu4rks Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.23.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
Fixes an issue in the
aws_verifiedaccess_group
where a policy document can't be set on a resource that was created without an attached policy.PolicyEnabled
flag on theModifyVerifiedAccessGroupPolicyInput
to true when detecting a changed policy.Relations
Closes #34052
Output from Acceptance Testing