provider/aws: Explain better why we retry IAM role creation (#8286)
This commit is contained in:
parent
6990db497a
commit
b2a3104118
|
@ -108,8 +108,8 @@ func resourceAwsIamRoleCreate(d *schema.ResourceData, meta interface{}) error {
|
|||
err := resource.Retry(30*time.Second, func() *resource.RetryError {
|
||||
var err error
|
||||
createResp, err = iamconn.CreateRole(request)
|
||||
// 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
|
||||
// IAM users (referenced in Principal field of assume policy)
|
||||
// can take ~30 seconds to propagate in AWS
|
||||
if isAWSErr(err, "MalformedPolicyDocument", "Invalid principal in policy") {
|
||||
return resource.RetryableError(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue