google cloud build error: --substitutions flag not found

Viewed 178

I am trying to follow the tutorial from google to run a django project on Cloud Run (https://cloud.google.com/python/django/run). I've worked my way down to actually building my container by running:

gcloud builds submit --config cloudmigrate.yaml
    --substitutions _INSTANCE_NAME=INSTANCE_NAME,_REGION=REGION

However, it continues to fail with a mysterious error:

ERROR: (gcloud.builds.submit) build b1cc40a4-93e5-4935-8838-0ec2f4f9a764 completed with status "FAILURE"
zsh: command not found: --substitutions

As far as I can tell, the syntax is exactly as specified in the documentation. I've also run the command in bash with the same result. Is there maybe something wrong with my gcloud SDK install?

Many thanks in advance for help.

1 Answers

It's a bug in your command line. Add a \ at the end of the first line. Your terminal interpret the command as two different command. add a \ to tell it that the command continue to the second line

gcloud builds submit --config cloudmigrate.yaml \
    --substitutions _INSTANCE_NAME=INSTANCE_NAME,_REGION=REGION
Related