Skip to content

Commit

Permalink
Merge pull request hashicorp#2135 from terraform-providers/b-appautos…
Browse files Browse the repository at this point in the history
…caling-retry

r/appautoscaling_policy: Retry putting policy on invalid token
  • Loading branch information
radeksimko authored Nov 1, 2017
2 parents ef14cf1 + 6936236 commit 6ee280f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aws/resource_aws_appautoscaling_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ func resourceAwsAppautoscalingPolicyCreate(d *schema.ResourceData, meta interfac
if isAWSErr(err, "FailedResourceAccessException", "is not authorized to perform") {
return resource.RetryableError(err)
}
if isAWSErr(err, "FailedResourceAccessException", "token included in the request is invalid") {
return resource.RetryableError(err)
}
return resource.NonRetryableError(fmt.Errorf("Error putting scaling policy: %s", err))
}
return nil
Expand Down

0 comments on commit 6ee280f

Please sign in to comment.