Hi there, I have a general question (GCP): - I ha...
# general
h
Hi there, I have a general question (GCP): • I have a Cloud Run service and this service is using a Docker image from GCR • The image is built from a Cloud Build trigger (also created via Pulumi) • Correct me if I am wrong but there is no way to actually trigger the Cloud Build pipeline after creation (only manually) I am trying to find what is the best way to: 1. Create the Cloud Build Trigger (if doesn’t exist) 2. Create the Cloud Run service w/ a dummy image (e.g.
<http://gcr.io/cloudrun/hello|gcr.io/cloudrun/hello>
) if the service doesn’t exist, or the actual GCR image otherwise). 3. Trigger the pipeline manually so that the GCR image is generated. 4. When running
pulumi up
later on, I obviously don’t want to override the last revision of the service with the dummy image if the service is already created and using the proper image. The solutions I was thiking of are the following: 1. Checking if the service already exists with
GetService
-> the issue is that it’s requiring an ID, so I can’t get the service until it’s created. 2. Using an input variable to differentiate the first time I run `pulumi up`` from the later “updates” -> I used this solution with Terraform but I find it a bit dangerous and error-prone. Any idea what the best way to do something like this would be? Thanks