provider/aws: Explain better why we retry IAM role creation (#8286)

This commit is contained in:
Radek Simko 2016-08-18 16:43:40 +01:00 committed by GitHub
parent 6990db497a
commit b2a3104118
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}