-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
When I deploy my functions, it creates a deployment bucket to us location despite I configured a region in my config :
service: my-service
provider:
name: google
runtime: nodejs10
region: europe-west1
project: my-project
If a restriction has been made on the deployment regions, an error like this one is produced :
Error: Deployment failed: RESOURCE_ERROR
{"ResourceType":"storage.v1.bucket","ResourceErrorCode":"412","ResourceErrorMessage":{"code":412,"errors":[{"domain":"global","location":"If-Match","locationType":"header","message":"'us' violates constraint 'constraints/gcp.resourceLocations'","reason":"conditionNotMet"}],"message":"'us' violates constraint 'constraints/gcp.resourceLocations'","statusMessage":"Precondition Failed","requestPath":"https://storage.googleapis.com/storage/v1/b","httpMethod":"POST"}}
at throwErrorIfDeploymentFails (/home/gnucki/Workspace/top/poc-cqrs/node_modules/serverless-google-cloudfunctions/shared/monitorDeployment.js:71:11)
at /home/gnucki/Workspace/top/poc-cqrs/node_modules/serverless-google-cloudfunctions/shared/monitorDeployment.js:42:17
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Even if this error does'nt occur, it seems there is a logic issue here.
Note that it leads, in further deployments, to the error specified in issues serverless/serverless#6820 and #217 because the deployment is created in an unstable state because the bucket creation has failed.
Metadata
Metadata
Assignees
Labels
No labels