I wanna get deployment env variables, can someone ...
# pulumi-deployments
l
I wanna get deployment env variables, can someone please help? I posted the question here https://pulumi-community.slack.com/archives/C84L4E3N1/p1715216041695069
r
So, there's definitely a bug here. But even if there weren't - the deployment settings api doesn't currently return the values of secrets once they're set.
So if this environment variable is marked a secret in the web ui, you wouldn't be able to get the value in the provider. We are considering changing this, but for now that is how the API behaves. That being said, the fact that operationContext is missing from outputs is a bug, https://github.com/pulumi/pulumi-pulumiservice/issues/267
l
@dry-controller-79976 oh I see. is there some way to have the variables on the pulumi site, and use them in the deployment? like, so I don't have to manually set them in the local config everytime and for each stack?
r
Hmm. Might be worth taking a step back. What are you trying to achieve? It’s possible ESC environments would fit your need better.
l
@dry-controller-79976 yeah, im trying to do that too, but not having much luck
r
What are you trying to do and what isn’t working? We can only help if we understand the context 😊
l
1. put GOOGLE_CLIENT_ID and others on Pulumi website
2. switch to e.g. test env
d
(you are mentioning the wrong person FYI! good luck with your issue)
l
3. get the variables, deploy digital ocean App platform app with those varables
like that
r
You can try using environments: https://www.pulumi.com/docs/esc/environments/
l
theres no code in this
I can get the data from
pulumi env open <org>/test
but not
const value = config.require("TESTING");
`console.log(
testin: ${value}
)`
r
you'll need to put it under the
pulumiConfig
key - this doc section should help https://www.pulumi.com/docs/esc/get-started/integrate-with-pulumi-iac/#access-configuration-from-esc