https://pulumi.com logo
#general
Title
# general
d

dry-autumn-69630

08/02/2023, 2:18 PM
Hi, I'm using pulumi to provision infrastructure on GCP and am running into this issue with cloud run and cloud build. It seems like there is a chicken and egg problem. My cloud build script builds the image, pushes it to the registry then deploys it to cloud run but cloud run requires an existing docker image during provisioning using pulumi and every time I run pulumi up it deploys the docker image referenced in the pulumi file to my cloud run service despite me wanting to delegate deployment to "cloud build". Does anyone have an elegant solution for this? edit: My ideal setup is I provision a cloud run service without specifying the docker image and only specifying the number of cpus, ram, min and max instances, and the network configuration. Then it doesn't actually get deployed until my cloud build script runs and builds and deploys the image. I'm open to changing my workflow, I'm trying to get automated deployment on push to main
s

salmon-account-74572

08/02/2023, 3:04 PM
Are you able to share your code?
Or at least the relevant bits?
d

dry-autumn-69630

08/02/2023, 3:06 PM
I can, give me a moment. But I've come to the conclusion that the provisioning should happen in my cloudbuild.yaml
s

salmon-account-74572

08/02/2023, 3:10 PM
No need to share if you think you have a solution. I was only going to review the code to ensure that you’re using inputs/outputs correctly between resources so that Pulumi can construct the appropriate dependency graph.