Skip to content

Commit

Permalink
Skip US GovCloud MemoryDB weirdness.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Mar 5, 2024
1 parent 2159336 commit c81f372
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/sweep/awsv1/skip.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ func SkipSweepError(err error) bool {
if tfawserr.ErrMessageContains(err, "UnauthorizedException", "API is not available in") {
return true
}
// For example from us-gov-west-1 MemoryDB cluster
if tfawserr.ErrMessageContains(err, "InvalidParameterValueException", "Access Denied to API Version") {
return true
}

return false
}
4 changes: 4 additions & 0 deletions internal/sweep/awsv2/skip.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func SkipSweepError(err error) bool {
if tfawserr.ErrMessageContains(err, "ResourceNotFoundException", "The subscription does not exist") {
return true
}
// Example (GovCloud): InvalidParameterValueException: Access Denied to API Version: CORNERSTONE_V1
if tfawserr.ErrMessageContains(err, "InvalidParameterValueException", "Access Denied to API Version") {
return true
}

return false
}

0 comments on commit c81f372

Please sign in to comment.