-
Notifications
You must be signed in to change notification settings - Fork 53
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
OIDC Access Token stored in state even if using env variable - results in expired credentials when destroying after expiry #1759
Comments
fixes #1759 Reverts #1715 and #1691. The TF providers was already picking up credentials from the env var before #1691. We have no reason to store these in the state. Note that this might break users who depend on the the stored credentials for authentication. I think this is intended and they can set up an env var or explicitly configure the provider to store the credentials.
@VenelinMartinov I had the exact same problem today, the issue is still happening with the latest version of the provider. From what I understand (sorry if I'm wrong) your revert PR (#1814) does not seem to fix the problem and I think actually (re)introduce a few problems:
Please see my thread on slack with @komalali : https://pulumi-community.slack.com/archives/C0602S4P4T1/p1713952731427519 |
Hi @sylver, sorry you are having trouble with this. I'd really appreciate a repro here - it's very hard to take any action without repro steps. I don't believe #1814 should have caused a regression as we supported env var tokens and credentials before #1691 - 1691 was not necessary to begin with. Looking at the slack thread, it looks like you are setting the credentials as config - can you try removing the config and just using the env variables? Thanks! |
Hey @VenelinMartinov, thanks for coming back to me.
As stated in the slack thread here https://pulumi-community.slack.com/archives/C0602S4P4T1/p1713974080632999?thread_ts=1713952731.427519&cid=C0602S4P4T1 Using
(without the returns
Sure, I understand, not sure what should I provide you with though.
|
hey @sylver, I've tried the ESC environment and it seemed to work. I suspect we are doing something different. It could be something in the pulumi program which triggers this behaviour. Maybe an explicit Can I please ask you to open a new issue with the following:
Such that the As for the plaintext access token, I've raised #1956 - we'll prioritise that one and investigate as soon as possible. |
What happened?
What happened?
I have an ESC environment set up for GCP OIDC named
gcp-access
I have a project with a
Pulumi.dev.yaml
file that looks like this:I run
pulumi up
for a gcp program (pulumi new gcp-typescript
is a good example to use).Running
pulumi stack export
or looking at the provider in the Pulumi Cloud UI will show the accessToken is stored in state.This causes problems when later, after the temporary token has expired, trying to destroy the stack will fail due to expired credentials.
Example
See above
Output of
pulumi about
CLI
Version 3.107.0
Go Version go1.22.0
Go Compiler gc
Plugins
NAME VERSION
gcp 7.11.2
nodejs unknown
Host
OS darwin
Version 13.6.3
Arch x86_64
This project is written in nodejs
Current Stack: dev
TYPE URN
pulumi:pulumi:Stack urn:pulumi:dev::gcp-simple-test::pulumi:pulumi:Stack::gcp-simple-test-dev
pulumi:providers:gcp urn:pulumi:dev::gcp-simple-test::pulumi:providers:gcp::default_7_11_2
gcp:storage/bucket:Bucket urn:pulumi:dev::gcp-simple-test::gcp:storage/bucket:Bucket::my-bucket2
Found no pending operations associated with dev
Backend
Name pulumi.com
Dependencies:
NAME VERSION
@pulumi/gcp v7.11.2
@pulumi/pulumi 3.107.0
@types/node 18.19.21
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: