Here's my question--in Pulumi, can I get a list of...
# google-cloud
q
Here's my question--in Pulumi, can I get a list of all services running in a project? My idea is that I want to have the "main" service running plus semi-short-lived services automatically created when someone creates a PR. I have it creating a new service by simply appending the PR number (passed in from github) to the service name. That works for one PR. But I'd like to use Pulumi to keep track of all current open PRs, and tear down services when the PRs close. (Easy enough to do with
gcloud
, but...)
Oh, and to be clear, I mean Cloud Run services. Basically, I want
gcloud run services list
But within Pulumi. Should I just use the google sdk?
a
not all the list apis are implemented. In the documentation I didn’t find a list of cloud run services
q
g
Generally, you can use the gcloud CLI to list current resources, yes. If you need to automate it, though, such as if you're trying to run it on a different machine or in a pipeline, you could try running the gcloud command using the Command provider (https://www.pulumi.com/registry/packages/command/) in your Pulumi program.
q
Ah, just saw this. Thanks! gcloud is indeed a handy tool, so it's nice to have it available.
🙌 1