https://pulumi.com logo
#google-cloud
Title
# google-cloud
d

delightful-monkey-90700

10/03/2022, 5:12 PM
I'm trying to use a GCP Secret to coordinate a job between a Schedule which runs periodically and an Google Cloud Run function which it invokes via HTTP (since that seems to be the only mechanism for doing this). How do I get the value of a Secret within Pulumi, to pass to the Job ?
b

billowy-army-68599

10/03/2022, 6:58 PM
I’m assuming here that the secret isn’t defined in Pulumi, in which case you’d look up the secret: https://www.pulumi.com/registry/packages/gcp/api-docs/secretmanager/getsecret/ and then the secretversion, which returns the value: https://www.pulumi.com/registry/packages/gcp/api-docs/secretmanager/getsecretversion/
d

delightful-monkey-90700

10/03/2022, 6:59 PM
The solution I ended up using is
@pulumi/random
to generate it as a Pulumi entity rather than GCP one
👍 1