-
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
Organizations Bugfix, handle missing policy when reading policy attachment #27238
Conversation
Handle missing policy when reading policy attachment Added test
Community NoteVoting for Prioritization
For Submitters
|
…entByTwoPartKey'. Acceptance test output: % make testacc TESTARGS='-run=TestAccOrganizations_serial/PolicyAttachment' PKG=organizations ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/organizations/... -v -count 1 -parallel 20 -run=TestAccOrganizations_serial/PolicyAttachment -timeout 180m === RUN TestAccOrganizations_serial === RUN TestAccOrganizations_serial/PolicyAttachment === RUN TestAccOrganizations_serial/PolicyAttachment/Account === RUN TestAccOrganizations_serial/PolicyAttachment/OrganizationalUnit === RUN TestAccOrganizations_serial/PolicyAttachment/Root === RUN TestAccOrganizations_serial/PolicyAttachment/BUG27231 acctest.go:762: error describing AWS Organization: couldn't find resource --- FAIL: TestAccOrganizations_serial (135.23s) --- FAIL: TestAccOrganizations_serial/PolicyAttachment (135.23s) --- PASS: TestAccOrganizations_serial/PolicyAttachment/Account (51.44s) --- PASS: TestAccOrganizations_serial/PolicyAttachment/OrganizationalUnit (42.40s) --- PASS: TestAccOrganizations_serial/PolicyAttachment/Root (41.16s) --- FAIL: TestAccOrganizations_serial/PolicyAttachment/BUG27231 (0.23s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/organizations 140.163s FAIL make: *** [testacc] Error 1
…231' -> 'testAccPolicyAttachment_disappears'. Acceptance test output: % make testacc TESTARGS='-run=TestAccOrganizations_serial/PolicyAttachment' PKG=organizations ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/organizations/... -v -count 1 -parallel 20 -run=TestAccOrganizations_serial/PolicyAttachment -timeout 180m === RUN TestAccOrganizations_serial === RUN TestAccOrganizations_serial/PolicyAttachment === RUN TestAccOrganizations_serial/PolicyAttachment/Account === RUN TestAccOrganizations_serial/PolicyAttachment/OrganizationalUnit === RUN TestAccOrganizations_serial/PolicyAttachment/Root === RUN TestAccOrganizations_serial/PolicyAttachment/disappears --- PASS: TestAccOrganizations_serial (118.16s) --- PASS: TestAccOrganizations_serial/PolicyAttachment (118.16s) --- PASS: TestAccOrganizations_serial/PolicyAttachment/Account (43.35s) --- PASS: TestAccOrganizations_serial/PolicyAttachment/OrganizationalUnit (25.61s) --- PASS: TestAccOrganizations_serial/PolicyAttachment/Root (26.91s) --- PASS: TestAccOrganizations_serial/PolicyAttachment/disappears (22.29s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/organizations 122.252s
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=TestAccOrganizations_serial/PolicyAttachment' PKG=organizations
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/organizations/... -v -count 1 -parallel 20 -run=TestAccOrganizations_serial/PolicyAttachment -timeout 180m
=== RUN TestAccOrganizations_serial
=== RUN TestAccOrganizations_serial/PolicyAttachment
=== RUN TestAccOrganizations_serial/PolicyAttachment/Account
=== RUN TestAccOrganizations_serial/PolicyAttachment/OrganizationalUnit
=== RUN TestAccOrganizations_serial/PolicyAttachment/Root
=== RUN TestAccOrganizations_serial/PolicyAttachment/disappears
--- PASS: TestAccOrganizations_serial (118.16s)
--- PASS: TestAccOrganizations_serial/PolicyAttachment (118.16s)
--- PASS: TestAccOrganizations_serial/PolicyAttachment/Account (43.35s)
--- PASS: TestAccOrganizations_serial/PolicyAttachment/OrganizationalUnit (25.61s)
--- PASS: TestAccOrganizations_serial/PolicyAttachment/Root (26.91s)
--- PASS: TestAccOrganizations_serial/PolicyAttachment/disappears (22.29s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/organizations 122.252s
@dkujawski Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.35.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
Properly handle missing policy when reading policy attachment.
Relations
Closes #27231
References
Output from Acceptance Testing