Open atsalolikhin-spokeo opened 3 years ago
I would definitely love this to be fixed. As a work around I have used the time provider to sleep for 5 seconds to help ensure that it exists. https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep.
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.
If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!
This is still an issue.
This is still an issue.
Community Note
Description
This is related to #7646
This is an intermittent issue that AWS Support confirmed is caused by eventual consistency.
When we bring up an EMR cluster, we create a service role and attach an existing service role policy to it. The EMR cluster uses this service role.
Intermittently, the cluster creation fails due to the role not having enough permissions.
Let's say we attach
arn:aws:iam::1234567890:policy/servicerole-policy
toarn:aws:iam::1234567890:role/cluster7-servicerole
.The servicerole-policy provides
ec2:DescribeImages
.The error is:
Terraform output showing the IAM role attachment was created before initiating the cluster launch (we have
depends_on
in our Terraform code, theaws_emr_cluster
depends on theaws_iam_role
):New or Affected Resource(s)
Potential Terraform Configuration
References
7646