Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google cloud functions cannot deploy

I am following the tutorial for google cloud functions. Trying to deploy the hello world from command line returns

ERROR: (gcloud.beta.functions.deploy) value for field [locationsId] for in collection [cloudfunctions.projects.locations] is required but was not provided

deploy command is

gcloud beta functions deploy helloWorld --stage-bucket shopping-functions --trigger-topic hello_world
like image 502
Arash Avatar asked Feb 05 '23 19:02

Arash


1 Answers

As @jdabello said, I attached --region option to my command and it solves the problem as follows:

gcloud beta functions deploy helloWorld --stage-bucket your-bucket --trigger-topic hello_world --region=us-central1

Or you can set your default functions/region using gcloud config set and you can skip specifying function's region each time.

gcloud config set functions/region us-central1
like image 186
Takuro Wada Avatar answered Feb 13 '23 06:02

Takuro Wada