Merge #6049: In Opsworks Stacks, wait for IAM changes to settle
This commit is contained in:
commit
64db0454b4
|
@ -341,7 +341,8 @@ func resourceAwsOpsworksStackCreate(d *schema.ResourceData, meta interface{}) er
|
||||||
// Service Role Arn: [...] is not yet propagated, please try again in a couple of minutes
|
// Service Role Arn: [...] is not yet propagated, please try again in a couple of minutes
|
||||||
propErr := "not yet propagated"
|
propErr := "not yet propagated"
|
||||||
trustErr := "not the necessary trust relationship"
|
trustErr := "not the necessary trust relationship"
|
||||||
if opserr.Code() == "ValidationException" && (strings.Contains(opserr.Message(), trustErr) || strings.Contains(opserr.Message(), propErr)) {
|
validateErr := "validate IAM role permission"
|
||||||
|
if opserr.Code() == "ValidationException" && (strings.Contains(opserr.Message(), trustErr) || strings.Contains(opserr.Message(), propErr) || strings.Contains(opserr.Message(), validateErr)) {
|
||||||
log.Printf("[INFO] Waiting for service IAM role to propagate")
|
log.Printf("[INFO] Waiting for service IAM role to propagate")
|
||||||
return resource.RetryableError(cerr)
|
return resource.RetryableError(cerr)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue