serverless / serverless-openwhisk

Adds Apache OpenWhisk support to the Serverless Framework!
http://openwhisk.org/
MIT License
143 stars 47 forks source link

Replicate binding service credentials to functions #122

Closed jthomas closed 6 years ago

jthomas commented 6 years ago

Available through bx wsk service bind

jthomas commented 6 years ago

This feature has now been implemented.

https://github.com/serverless/serverless-openwhisk#binding-services-ibm-cloud-functions

pneuschwander commented 6 years ago

@jthomas That's great, thanks! Can we bind multiple services (e.g. messagehub AND cloudant) and how would that look like in the yml?

jthomas commented 6 years ago

@regmebaby absolutely, see example here:

functions:
  my_function:
    handler: file_name.handler    
    bind:
      - service:
          name: cloud-object-storage
          instance: my-cos-storage
      - service:
          name: another_service
          instance: my-instance-name

Couple of caveats...