Skip to content

Commit

Permalink
provider/aws: Increase timeout for creating IAM role (#7733)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay authored and radeksimko committed Aug 18, 2016
1 parent 7a163d2 commit 46c858b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/providers/aws/resource_aws_iam_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ func resourceAwsIamRoleCreate(d *schema.ResourceData, meta interface{}) error {
}

var createResp *iam.CreateRoleOutput
err := resource.Retry(10*time.Second, func() *resource.RetryError {
err := resource.Retry(30*time.Second, func() *resource.RetryError {
var err error
createResp, err = iamconn.CreateRole(request)
// IAM roles can take ~10 seconds to propagate in AWS:
// IAM roles can take ~30 seconds to propagate in AWS:
// http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console
if isAWSErr(err, "MalformedPolicyDocument", "Invalid principal in policy") {
return resource.RetryableError(err)
Expand Down

0 comments on commit 46c858b

Please sign in to comment.