https://pulumi.com logo
#general
Title
# general
f

full-lamp-64265

03/11/2024, 10:43 AM
When I run:
Copy code
pulumi preview '--config=gcp:accessToken=INVALID'
Pulumi places the config value in my config file. Why is this? I just want to override it for this run, not always.
And is there another way to just override it for this run?
l

limited-rainbow-51650

03/11/2024, 12:05 PM
@full-lamp-64265 preferrably remove the access token from the stack config file. If you ran
gcloud auth login
on your system ahead of
pulumi preview/up
, our GCP provider should pick up the credentials from your local system.
f

full-lamp-64265

03/11/2024, 12:09 PM
Ringo I don't want it in the stack config file, but I want to set it from the CLI, I would actually prefer to set it from the environment, but setting it from the CLI will be better than nothing
but I don't get why preview will update my config file
This seems to me like undesired behaviour
Is there some rationale behind it?
The docs certainly does not suggest this is what will happen
l

limited-rainbow-51650

03/11/2024, 12:11 PM
Pulumi infrastructure code should never update the stack config file (
Pulumi.<stackname>.yaml
).
f

full-lamp-64265

03/11/2024, 12:12 PM
Okay, but then why does the command I share update the stack config file?
If it is not intended I will file a bug report
l

limited-rainbow-51650

03/11/2024, 12:19 PM
Checking with our engineers on expected behavior.
@full-lamp-64265 for the moment, I would like to ask you to file a bug report. Preferably add a sequence of steps to reproduce this. https://github.com/pulumi/pulumi/issues