not sure why but succesfull deployments for serverless GCP stopped working with the error:
team27> serverless deploy -c serverless_stage.yml
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Compiling function "user"...
Serverless: Compiling function "volunteer"...
Serverless: Compiling function "clear"...
Serverless: Uploading artifacts...
Serverless: Artifacts successfully uploaded...
Serverless: Updating deployment...
Serverless: Checking deployment update progress...
..
Error --------------------------------------------------
Error: Deployment failed: RESOURCE_ERROR
{"ResourceType":"cloudfunctions.v1beta2.function","ResourceErrorCode":"403","ResourceErrorMessage":{"code":403,"message":"The GCF v1beta2 API is deprecated. See https://cloud.google.com/functions/docs/migrating","status":"PERMISSION_DENIED","details":[],"statusMessage":"Forbidden","requestPath":"https://cloudfunctions.googleapis.com/v1beta2/projects/stageteam27/locations/us-central1/functions","httpMethod":"POST"}}
at throwErrorIfDeploymentFails (xxx\team27\node_modules\serverless-google-cloudfunctions\shared\monitorDeployment.js:71:11)
at xxx\team27\node_modules\serverless-google-cloudfunctions\shared\monitorDeployment.js:42:17
at processTicksAndRejections (internal/process/task_queues.js:93:5)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: win32
Node Version: 12.13.1
Framework Version: 1.64.0
Plugin Version: 3.4.0
SDK Version: 2.3.0
Components Core Version: 1.1.2
Components CLI Version: 1.4.0
As suggested in https://cloud.google.com/functions/docs/migrating
I performed gcloud components update
Same error...
Here is my yml:
service: stageteam27
provider:
name: google
stage: stage
runtime: nodejs10
region: us-central1
project: stageteam27
credentials: /xxx/stageteam27keyfile.json
environment:
IS_PROD: 'false'
plugins:
- serverless-google-cloudfunctions
package:
exclude:
- node_modules/**
- .gitignore
- .git/**
functions:
user:
handler: userMessage
events:
- http: user
volunteer:
handler: volunteerMessage
events:
- http: volunteer
clear:
handler: clearCommand
events:
- http: clear