-
-
Notifications
You must be signed in to change notification settings - Fork 338
Possible race condition with aws_iam_role.instance recreate #583
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
Comments
Can't confirm this using Terraform 1.3.2 Plan says: The resource is not destroyed and recreated. |
Ok, we are in process of migration to 1.3.5 - will test it on the later TF. |
Seems to be related to #591 |
Any news here, @dzinek? Or can we close this issue? |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days. |
This issue was closed because it has been stalled for 15 days with no activity. |
Hi, I decided to upgrade module from version 5.4.1 to 5.5.0 due to fixed #557.
Plan showed me that ASG Launch Template will be changed (due to changes in
user_data
with pull policy and gzip from #565).But also the
aws_iam_role.instance
has to be recreated:and then
The plan looked good (first destroy role then create it) so I applied it.
Changes with launch template and ASG passed, but role recreation failed - seems like the race condition - the new role is starting to create, when the old one has not finish destroying:
I need to run apply three times - 1st one to got this error, and also another two times to pass it.
The final state was, that the new runner cannot be registered, due to issue in
user_data
with fetching runner token from SSM. The instance profile lost the assigned role, so the ec2 could not fetch any data from SSM.I had to reassign role to instance profile manually to fix the access and have runner registered.
The text was updated successfully, but these errors were encountered: