Hi, Checking to see if anyone can tell me how to ...
# google-cloud
a
Hi, Checking to see if anyone can tell me how to add environment variables to GCP Workflows using the Python Pulumi library?
s
You want to supply an env var to the Workflow that is sourced in code, correct? (as opposed to taking an env var on your machine and feeding that into some property on a resource)
If it's the former, and Pulumi AI is to be believed (needs verification), it looks like you're supposed to store the value in Secrets Manager and then pull the value when your workflow runs. Does this make sense to you? (Seems semi-reasonable to me, but I would've expected direct support for env vars based on my experience with AWS CodeBuild.) https://www.pulumi.com/ai/conversations/4eec9f71-678c-48bf-a880-0594f024e214
a
@stocky-restaurant-98004 thanks, yes, the Workflow is sourced from a GitHub repo. I could store the config (its an Aiven-hosted OpenSearch URL and PORT) in the GCP Secrets Manager. I agree with you and would've expected direct support. I will use the Secrets Manager approach for now, thanks again. (My experience with Pulumi AU has been ok'ish)