I'm trying to use a GCP Secret to coordinate a job...
# google-cloud
d
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
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
The solution I ended up using is
@pulumi/random
to generate it as a Pulumi entity rather than GCP one
👍 1