serverless-google-cloudfunctions
serverless-google-cloudfunctions copied to clipboard
Gcloud - instance does not match any allowed primitive type
I'm getting the following error: Deployment failed: CONDITION_NOT_MET
"/httpsTrigger/url": domain: validation; keyword: type; message: instance does not match any allowed primitive type; allowed: ["string"]; found: "object"
This is my serverless.yml
service: xyz
tenant: adamzaczek
app: xyz
plugins:
- serverless-webpack
- serverless-offline
- serverless-dotenv-plugin
- serverless-google-cloudfunctions
custom:
webpack:
includeModules: true
webpackConfig: ./webpack.config.js
serverless-offline:
port: 8000
package:
exclude:
- node_modules/**
- .gitignore
- .git/**
provider:
name: google
runtime: nodejs10
project: xyz-242209
credentials: .gcloud/keyfile.json
region: us-central1
functions:
graphql:
handler: handler
events:
- http:
path: graphql
playground:
handler: handler
events:
- http:
path: playground
method: get
I've been very happy with using serverless and aws. I tried to make gcloud work with serverless for the entire day with no success. This is the issue that has stopped me for good.
Did you ever figure this out? I'm having the same issue
Yes, despite the claims serverless does not work with GCloud.
I was hitting this issue today when I had my function structured like my AWS serverless.yml
functions:
createCatalog:
handler: handler.createCatalog
events:
- http:
path: catalog/create
method: post
I got passed this error by changing it to the following in my GCP serverless.yml. Apparently you don't need to specify method for GCP in serverless.yml. See this doc.
functions:
createCatalog:
handler: createCatalog
events:
- http: catalog/create
See here for full example of GCP ... I also have AWS and Azure in this repo https://github.com/csplinter/datastax-serverless-examples/tree/master/gcp