-
Notifications
You must be signed in to change notification settings - Fork 155
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
CLI hangs at sts:GetCallerIdentity when temporary AWS credentials exist but are expired #814
Comments
Let the token expire overnight to get the output:
|
Yikes! Thanks for the report. @stack72 can you take a look? |
I just hit something very similar myself. A stack that I have deployed many time before, I came back to after awhile and I can no longer update it -
I am using:
From outside
|
Is there any workaround for this issue? |
@borisbsu Do you have details on your repro case for this? I believe some issues which have symptoms similar to this may actually be unrelated to |
Across the notes here, in pulumi/pulumi#3604, and in #873, it appears there are a few related but independent things going on:
Together, these three compound. We can fix the latter two, but the core initial issue is an upstream bug that appears to be considered "by design". We will need to look into whether we can/should change the default behaviour for that in the Pulumi provider. |
The changes in #4004 caused old provider configuration to be used even when a provider was different between inputs and outputs, in the case that the diff returned DiffUnkown. To better handle that case, we compute a more accurate (but still conservative) DiffNone or DiffSome so that we can ensure we conservatively update to a new provider when needed, but retain the performance benefit of not creating and configuring a new provider as much as possible. Part of pulumi/pulumi-aws#814.
In #874 we added config defaults from environment variables for four new configuration settings. Thees config defaults are used in two places: (1) `aws.config` and (2) the defaults for `aws.Provider`. For (1) these changes were a good thing, but for (2) they led to values from the environment getting baked into checkpoints that should not be. It's not clear to me that we should be doing (2) at all - that is - I don't think `region` or `profile` should be picked up from the environment and baked into the checkpoint file either. But for now we'll just revert the more recent change here which has led to the more significant immediate issue. Part of #814.
The changes in #4004 caused old provider configuration to be used even when a provider was different between inputs and outputs, in the case that the diff returned DiffUnkown. To better handle that case, we compute a more accurate (but still conservative) DiffNone or DiffSome so that we can ensure we conservatively update to a new provider when needed, but retain the performance benefit of not creating and configuring a new provider as much as possible. Part of pulumi/pulumi-aws#814.
In #874 we added config defaults from environment variables for four new configuration settings. Thees config defaults are used in two places: (1) `aws.config` and (2) the defaults for `aws.Provider`. For (1) these changes were a good thing, but for (2) they led to values from the environment getting baked into checkpoints that should not be. It's not clear to me that we should be doing (2) at all - that is - I don't think `region` or `profile` should be picked up from the environment and baked into the checkpoint file either. But for now we'll just revert the more recent change here which has led to the more significant immediate issue. Part of #814. Fixes #890.
The second two issues above have been fixed, which will reduce the likelihood of hitting this for unexpected reasons. The core behaviour of hanging on expired credentials is due to upstream provider behavior - as tracked in hashicorp/terraform-provider-aws#1351, hashicorp/terraform-provider-aws#4502, hashicorp/terraform-provider-aws#9601 and hashicorp/terraform-provider-aws#12023. We are considering on diverging on some defaults which may ultimately impact this in #873. I'll close this issue out for now, and further improvements will be tracked in upstream provider issues and #873. |
Re-opening as this is still an issue that Pulumi users hit somewhat regularly, and we will likely want to find a way to workaround the upstream issues here. |
FWIW, we are using the aws-okta-processor tool and when cached credentials aren't available this issue occurs. The underlying issue, so it seems if another process, such as through credential_process is "awaiting input", Pulumi will simply hang instead of pass the STDIN/prompt to the user. In our case, it was sitting and waiting for the user's Okta credentials to have the aws credentials move forward with the profile. It might be worth having Pulumi also check during run to make sure there isn't any input expectation on the terminal when calling out It's probably worth calling this special use-case out in its own issue but I'll let guys decide. Ultimately pulumi should just not hang forever on this provider. I'd even rather have the tool spit back an error right if terminal input is blocking the finalization of credential retrieval. Ideally, it would just pass the input through to the interactive terminal and I could enter my password for Okta and move on. For now, I have to "prime" the profile being used by the provider, using say, |
I'm currently getting a hang when doing pulumi up that seems similar to this thread. On debug the last event in log during preview phase is It seems to be related to an s3 bucket. When i remove this from the configuration it is able to proceed with the preview completely. The steps I have taken to try to get passed this:
Are there any tips for further debug or actions to get past this stuck deployment? |
This is fixed now, via hashicorp/aws-sdk-go-base#362. |
Where there are no AWS access keys in my shell environment, running
pulumi up
pretty much immediately errors out witherror: unable to discover AWS AccessKeyID and/or SecretAccessKey
. But when AWS access keys exist but had expired, it just hangs (for at least several minutes) at tryingsts:GetCallerIdentity
from what I can tell from the debug output (which I have now lost 😨 ), however without debug on it just looks like it's doing normal planning forever. Ideally it quickly determines the credentials are invalid and informs the user.Pulumi: v1.6.1
Pulumi AWS: v1.13.0
The text was updated successfully, but these errors were encountered: