When using gcloud run deploy
, how can I specify the service name with command-line args? I'm hoping to prevent the need for interactivity at deploy-time.
I'm currently deploying my service like so:
gcloud run deploy --image gcr.io/<PROJECT>/<TAG> --platform managed
Check the available projects by running: gcloud projects list . This will give you a list of projects which you can access. To switch between projects: gcloud config set project <project-id> . Show activity on this post.
There is a service parameter, which is positional as opposed to named.
From the docs:
gcloud run deploy [[SERVICE] --namespace=NAMESPACE] etc...
So you could do this:
gcloud run deploy <SERVICE_NAME> --image gcr.io/<PROJECT>/<TAG> --platform managed
https://cloud.google.com/sdk/gcloud/reference/run/deploy#POSITIONAL-ARGUMENTS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With