Skip to content

Commit

Permalink
Merge pull request #30370 from bschaatsbergen/fix-retrable-error
Browse files Browse the repository at this point in the history
fix: Glue crawler retry-able error string fix
  • Loading branch information
ewbankkit authored Mar 31, 2023
2 parents 94e6869 + 1fec83f commit 54ab76c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changelog/30370.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:bug
resource/aws_glue_crawler: Fix InvalidInputException error string matching
```

```release-note:bug
resource/aws_glue_trigger: Fix InvalidInputException error string matching
```
4 changes: 2 additions & 2 deletions internal/service/glue/crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func resourceCrawlerCreate(ctx context.Context, d *schema.ResourceData, meta int
return resource.RetryableError(err)
}

if tfawserr.ErrMessageContains(err, glue.ErrCodeInvalidInputException, "Service is unable to assume role") {
if tfawserr.ErrMessageContains(err, glue.ErrCodeInvalidInputException, "Service is unable to assume provided role") {
return resource.RetryableError(err)
}

Expand Down Expand Up @@ -536,7 +536,7 @@ func resourceCrawlerUpdate(ctx context.Context, d *schema.ResourceData, meta int
return resource.RetryableError(err)
}

if tfawserr.ErrMessageContains(err, glue.ErrCodeInvalidInputException, "Service is unable to assume role") {
if tfawserr.ErrMessageContains(err, glue.ErrCodeInvalidInputException, "Service is unable to assume provided role") {
return resource.RetryableError(err)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/service/glue/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func resourceTriggerCreate(ctx context.Context, d *schema.ResourceData, meta int
err := resource.RetryContext(ctx, propagationTimeout, func() *resource.RetryError {
_, err := conn.CreateTriggerWithContext(ctx, input)
if err != nil {
if tfawserr.ErrMessageContains(err, glue.ErrCodeInvalidInputException, "Service is unable to assume role") {
if tfawserr.ErrMessageContains(err, glue.ErrCodeInvalidInputException, "Service is unable to assume provided role") {
return resource.RetryableError(err)
}

Expand Down

0 comments on commit 54ab76c

Please sign in to comment.