函数工作流 FUNCTIONGRAPH-变量:从环境变量中引用变量

时间:2023-11-02 11:37:54

从环境变量中引用变量

要引用环境变量中的变量,请在serverless.yml中使用${env:someProperty}语法,如下:
service: new-service

provider:
  name: huawei
  runtime: Node.js14.18
  credentials: ~/.fg/credentials # path must be absolute
  environment:
    variables:
      ENV_FIRST: ${env:TENCENTCLOUD_APPID}

plugins:
  - serverless-huawei-functions

functions:
  hello:
    handler: index.hello
support.huaweicloud.com/devg-functiongraph/functiongraph_02_0745.html