google-cloud-run

Silently deploy Cloud run service from source


I want to deploy and application to Cloud Run from source (as demonstrated in this document: https://cloud.google.com/run/docs/deploying-source-code)

However, this runs interactively by default and asks the user many questions. Is there an option to run it silently ? For example to take the answers from a configuration file instead of user input ?

Thank you

Guy


Solution

  • There are several approaches to the deployment of Cloud Run services.

    To deploy from source, you can use gcloud run deploy but, as you've seen, you will need to provide additional data for "unknowns" that aren't provided by gcloud config, examples include the Google Project, Region etc.

    gcloud run deploy includes arguments|flags (see the link) to specify these values so that you will not be prompted e.g. --project=${PROJECT}, --region=${REGION}.