Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud Run update image after creation using Terraform

I am trying to create Cloud Run with ESPV2. This requires me to

1. Reserve a cloud run address by deploying a dummy cloud run instance.
2. Use the address and API spec file to build an endpoints container image
3. Update the service created at step 1 with the Hello image with newly created at step 2.

Link for Google Documentation is here https://cloud.google.com/endpoints/docs/openapi/set-up-cloud-functions-espv2

Can you suggest a way to implement this using Terraform ??
I don’t mind during this in two steps (having two terraform configurations). But I am not sure how to update an existing instance without creating it in the same terraform config. (the second one tries to recreate it).

Any help is highly appreciated.

5 1 1,389
1 REPLY 1
Top Labels in this Space
Top Solution Authors