-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instance Profile has no associated IAM Roles for some instances #2660
Comments
This was seen with 0.5.3. |
We're also seeing this issue, however we can deterministically reproduce it.
In our case, the change to Launch Configurations that we made had nothing to do with the NAT instance IAM Instance Profile mentioned in the error. Note that we are using at least 5 different nested modules. We're on terraform 0.6.3. Correction: This is in fact intermittent, corroborating the eventual consistency issue that @dpaq suggested. Also, we were using 0.6.2. If this issue is resolved with 0.6.3 we'll report back as such. |
we are also seeing this issue (as described by dpaq) when we deploy new AWS resources via terraform 0.6.3 |
Encountering this issue with 0.6.3 as well. It appears to be an intermittent race condition. This problem is observed with an Terraform environment when created from scratch. Running the same |
+1 on this, seeing it on S3 resources possibly, upon creation of the IAM resources needed for the principal the bucket creation is performed, and when the policy application is attempted it barfs. |
@vancluever do you have a configuration that reproduces this? If so, can you please open another issue? As it stands, IAM propagation issues need to be handled in a resource-by-resource manner, for the time being. This particular issue (#2660) has been resolved with #2037, so I'm going to close it. Let me know if anyone is still hitting this |
I am seeing this with 0.6.10. |
also still seeing behaviour occasionally in 0.6.12 |
+1 with @ickymettle... Seeing it occasionally in 0.6.12. |
Encountered this in 0.6.14 on every run. Had to switch back to 0.6.8 for modules to work properly. |
Just encountered this issue with 0.6.16. Retrying an apply worked it around. |
Seeing this in 0.6.16. When combined with #5200, it makes the |
@catsby Should this issue be reopened? |
@catsby The problem is that |
Ran into this issue yesterday while creating a 4 node application stack. 1 out of 4 failed because of this issue. When the other nodes finished building, I re-ran |
Just to add an understanding of the issue: #4306. |
We are also seeing this on 0.6.16, for now our workaround is to add:
|
@catsby you are incorrect, #2037 fixes a slightly different problem. Here the issue is that IAM profile has propagated, but the role has not, and the error is:
#2037 fixes the case where the IAM profile has not propagated. The error there is:
The below retry line searches specifically for the
I will try to create a PR in the next few days. Hope you agree to reopen. |
HI All.. faced same issue.. while creating e2 instance it was going through iam_instance_profile and was giving me different errors such as :- iam role already present, Invalid IAM Instance Profile name.. In my case the problem was instance type.. I was trying to launch m4.large instance in eu-west-1a and that availability zone was running full with m4.large instance types i.e you cannot launch more m4.large instances in same AZ for may be particular time period. As soon as i changed instance type, then error was gone and instance created.. IAM Instance Role creation is prior and parallel process while instance creation hence giving me strange/irrelevant IAM creation erros. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I think I'm seeing a race condition when using instance profiles.
In this case there were 5 instances (foo.0, foo.1, bar.0, bar.1, bar.2) that all use the same InstanceProfile. Two of them work fine but three of them claim the instance profile has no role associated:
I'm wondering if this is an eventual consistency issue and this particular error launching should just include some retry logic. Obviously the InstanceProfile does have a Role since it works for some of the instances.
This is not repeatable regularly and just applying again gets me my missing instances.
A slightly redacted portion of the config:
The text was updated successfully, but these errors were encountered: