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

inspector2: Fix a couple of crashes #34424

Merged
merged 5 commits into from
Nov 15, 2023
Merged

inspector2: Fix a couple of crashes #34424

merged 5 commits into from
Nov 15, 2023

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Nov 15, 2023

Description

Ibid.

Relations

Closes #34415.
Closes #31857.

References

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccInspector2_serial/Enabler\|TestAccInspector2_serial/DelegatedAdminAccount' PKG=inspector2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/inspector2/... -v -count 1 -parallel 20  -run=TestAccInspector2_serial/Enabler\|TestAccInspector2_serial/DelegatedAdminAccount -timeout 360m
=== RUN   TestAccInspector2_serial
=== PAUSE TestAccInspector2_serial
=== CONT  TestAccInspector2_serial
=== RUN   TestAccInspector2_serial/Enabler
=== RUN   TestAccInspector2_serial/Enabler/accountID
=== RUN   TestAccInspector2_serial/Enabler/updateResourceTypes_disjoint
=== RUN   TestAccInspector2_serial/Enabler/memberAccount_multiple
    enabler_test.go:330: Step 1/1 error: Error running apply: exit status 1
        
        Error: creating Amazon Inspector Member Association (123456789012): operation error Inspector2: AssociateMember, https response error StatusCode: 400, RequestID: dbbc6265-0705-4862-8d6c-76144833d338, ValidationException: The request is rejected because the given account ID is already a member or associated member of the current account.
        
          with aws_inspector2_member_association.members[1],
          on terraform_plugin_test.tf line 38, in resource "aws_inspector2_member_association" "members":
          38: resource "aws_inspector2_member_association" "members" {
        
=== RUN   TestAccInspector2_serial/Enabler/memberAccount_updateMemberAccounts
    enabler_test.go:370: Step 2/3 error: Error running apply: exit status 1
        
        Error: creating Amazon Inspector Member Association (123456789012): operation error Inspector2: AssociateMember, https response error StatusCode: 400, RequestID: c43db776-032c-4d02-84e6-c456ad28098f, ValidationException: The request is rejected because the given account ID is already a member or associated member of the current account.
        
          with aws_inspector2_member_association.members[1],
          on terraform_plugin_test.tf line 38, in resource "aws_inspector2_member_association" "members":
          38: resource "aws_inspector2_member_association" "members" {
        
=== RUN   TestAccInspector2_serial/Enabler/memberAccount_updateMemberAccountsAndScanTypes
    enabler_test.go:438: Step 2/3 error: Error running apply: exit status 1
        
        Error: creating Amazon Inspector Member Association (123456789012): operation error Inspector2: AssociateMember, https response error StatusCode: 400, RequestID: fc58354d-6eb9-4dae-8b17-bde876f77ba0, ValidationException: The request is rejected because the given account ID is already a member or associated member of the current account.
        
          with aws_inspector2_member_association.members[1],
          on terraform_plugin_test.tf line 38, in resource "aws_inspector2_member_association" "members":
          38: resource "aws_inspector2_member_association" "members" {
        
=== RUN   TestAccInspector2_serial/Enabler/memberAccount_disappearsMemberAssociation
=== RUN   TestAccInspector2_serial/Enabler/basic
=== RUN   TestAccInspector2_serial/Enabler/disappears
=== RUN   TestAccInspector2_serial/Enabler/lambda
=== RUN   TestAccInspector2_serial/Enabler/updateResourceTypes
=== RUN   TestAccInspector2_serial/Enabler/memberAccount_basic
=== RUN   TestAccInspector2_serial/DelegatedAdminAccount
=== RUN   TestAccInspector2_serial/DelegatedAdminAccount/disappears
=== RUN   TestAccInspector2_serial/DelegatedAdminAccount/basic
--- FAIL: TestAccInspector2_serial (1261.98s)
    --- FAIL: TestAccInspector2_serial/Enabler (1215.04s)
        --- PASS: TestAccInspector2_serial/Enabler/accountID (200.37s)
        --- PASS: TestAccInspector2_serial/Enabler/updateResourceTypes_disjoint (168.68s)
        --- FAIL: TestAccInspector2_serial/Enabler/memberAccount_multiple (22.13s)
        --- FAIL: TestAccInspector2_serial/Enabler/memberAccount_updateMemberAccounts (79.04s)
        --- FAIL: TestAccInspector2_serial/Enabler/memberAccount_updateMemberAccountsAndScanTypes (114.91s)
        --- PASS: TestAccInspector2_serial/Enabler/memberAccount_disappearsMemberAssociation (64.96s)
        --- PASS: TestAccInspector2_serial/Enabler/basic (82.47s)
        --- PASS: TestAccInspector2_serial/Enabler/disappears (68.10s)
        --- PASS: TestAccInspector2_serial/Enabler/lambda (66.91s)
        --- PASS: TestAccInspector2_serial/Enabler/updateResourceTypes (285.78s)
        --- PASS: TestAccInspector2_serial/Enabler/memberAccount_basic (61.70s)
    --- PASS: TestAccInspector2_serial/DelegatedAdminAccount (46.94s)
        --- PASS: TestAccInspector2_serial/DelegatedAdminAccount/disappears (21.58s)
        --- PASS: TestAccInspector2_serial/DelegatedAdminAccount/basic (25.36s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/inspector2	1267.681s
FAIL
make: *** [testacc] Error 1

Failures are unrelated to these fixes.

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/inspector2 Issues and PRs that pertain to the inspector2 service. size/XS Managed by automation to categorize the size of a PR. labels Nov 15, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Nov 15, 2023
@ewbankkit ewbankkit merged commit 1287ab9 into main Nov 15, 2023
43 checks passed
@ewbankkit ewbankkit deleted the b-inspector2-crashes branch November 15, 2023 19:21
@github-actions github-actions bot added this to the v5.26.0 milestone Nov 15, 2023
github-actions bot pushed a commit that referenced this pull request Nov 15, 2023
Copy link

This functionality has been released in v5.26.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!

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 Dec 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/inspector2 Issues and PRs that pertain to the inspector2 service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
1 participant