Open gdavison opened 3 years ago
Hi @gdavison,
I was running make sweep
within a member account and it failed on the GuardDuty Detector with:
Should this have been skipped?
2020/12/23 19:31:43 [ERROR] error deleting GuardDuty Detector (1111111111111111): BadRequestException: The request is rejected because member cannot disassociate from Organization administrator
{
RespMetadata: {
StatusCode: 400,
RequestID: "555555555555555555555555555555555555555555"
},
Message_: "The request is rejected because member cannot disassociate from Organization administrator",
Type: "InvalidInputException"
}
2020/12/23 19:31:43 [ERROR] Error running Sweeper (aws_guardduty_detector) in region (eu-west-1): 1 error occurred:
* error deleting GuardDuty Detector (1111111111111111111111111111): BadRequestException: The request is rejected because member cannot disassociate from Organization administrator
{
RespMetadata: {
StatusCode: 400,
RequestID: "5555555555555555555555555555555"
},
Message_: "The request is rejected because member cannot disassociate from Organization administrator",
Type: "InvalidInputException"
}
FAIL github.com/terraform-providers/terraform-provider-aws/aws 64.662s
FAIL
make: *** [sweep] Error 1
I also just created issue #16898 which applies to shared transit gateways.
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.
If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!
Bump
Most sweepers currently check for skippable errors using
testSweepSkipSweepError()
only at the listing level. In some cases, for example resources created by a central IT group, most instances of a resource can be swept but not all.Identify a set of skippable errors for individual resources and check for them on all API calls in a sweeper.