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.
Hi @DeepakShevre,
Welcome to Google Cloud Community!
Updating Cloud Run Image with ESPv2 after Creation
While Terraform can't directly update an existing Cloud Run service's image, here are alternative approaches:
Consideration:
Terraform recreates resources on configuration changes, leading to downtime. These approaches offer a more controlled update process.