-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Error reading service account after creation - 403 Halts Execution #10227
Comments
@aaron-brown I noticed you said it happens |
Working on getting the requested info. Trying to reproduce in a simpler way if possible, I'm wondering if this happens when we are building a lot of things at the same time along with the service account(s). The issue is that for us it's intermittent so difficult to say. At the very least I want to try to get the debug logs, we haven't done an apply where this occurs and with debug enabled, yet. |
@aaron-brown it is possible for the time when you build a lot of things at the same time. It could be the service account has not been ready yet (may take longer time than it says done) when other processes try to use it. In this case, you could add |
Yes. Not always the same Service Account, but it was on the same terraform script.
I can provide the config if it is necessary, but there are at least two things that may complicate that:
For now, in lieu of posting the config, I'll try to describe it better. The When running the apply, the service account creation is mixed in with the creation of all of the other things. Keep this in mind as I answer the next part of this question...
I'm attaching 3 (consolidated) log files that demonstrate the HTTP Conversation when creating the Service Account that failed. File File File I did some minor scrubbing of the log files, and focused on the HTTP Conversations. If you would like the full like files, I will need to more carefully scrub them. Let me know if this is sufficient, or if you need anything further. |
@aaron-brown I see I can't repro the issue based on the config here. I do need a config that can be used to repro the issue for further investigation |
@aaron-brown is this still an issue? |
@aaron-brown closing this assuming it is no longer an issue |
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. |
Issue
My team and I have been creating Service Accounts for some time, but recently (perhaps maybe the past two weeks) we have encountered the following error when attempting to create Service Accounts:
We had done numerous things to try and mitigate seeing this error (updating Provider versions, ensuring we had up-to-date
gcloud
components, updating terraform, etc.), and at first we believed some of the things we were doing were effective; but it kept coming back intermittently.So I dug into the source code a little bit and found this bit of code.. If I'm understanding it correctly, it appears that after creation of a Service Account, there is a wait-period that retries upon receiving a
404
. This makes sense, as it takes some time for the system to update and for the account to appear.However, I believe that there is also a condition where the Account is created, so the
404
is not encountered; but, the IAM policies haven't been fully established. That is why we appear to be getting a403
. If we try theterraform apply
a little bit later, it works without issue. Presumably because now the IAM Policies are established.Expected behavior
Handle a
403
along with the404
so that when the account is created, but IAM Policies have not been fully established, the apply does not halt. The403
should eventually resolve similarly to how the404
resolves. Otherwise, the timeout occurs.Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
1.0.7 / 1.0.0
Affected Resource(s)
Terraform Configuration Files
Panic Output
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: