Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

values not parsed/fetched when imported #14

Open
deathemperor opened this issue May 28, 2021 · 0 comments
Open

values not parsed/fetched when imported #14

deathemperor opened this issue May 28, 2021 · 0 comments

Comments

@deathemperor
Copy link

my serverless.environment.yml

provider:
  environment:
    AWS_PROFILE: papaya
    SERVICE: ${self:service}
    REGION: ${self:provider.region}
    STAGE: ${self:provider.stage}
    APPLE_ENDPOINT: ${ssm:/APPLE_ENDPOINT~true}
    APPLE_SECRET: ${ssm:/APPLE_SECRET~true}
    ADMIN_SECRET: ${ssm:/ADMIN_SECRET~true}
    APOLLO_KEY: ${ssm:/APOLLO_KEY~true}
    APOLLO_GRAPH_ID: Apple-oir31
    APOLLO_GRAPH_VARIANT: ${file(../../env.${opt:stag, 'dev'}.json):APOLLO_GRAPH_VARIANT}

my serverless.yml

service: papaya-berry-id
app: papaya
org: papaya

provider:
  name: aws
  profile: papaya
  runtime: nodejs12.x
  stage: ${opt:stage, 'dev'}
  region: "ap-southeast-1"
  tracing:
    lambda: true

package:
  individually: true
  excludeDevDependencies: true

plugins:
  - serverless-bundle
  - serverless-offline
  - serverless-import-config-plugin

custom:
  import:
    - ../../serverless.common.yml
    - ../../serverless.environment.yml
    - ./serverless.own.yml

functions:
  - ${file(./functions/graphql/config.yml)}

On runtime, values are:

AWS_PROFILE: 'papaya',
  SERVICE: '${self:service}',
  REGION: '${self:provider.region}',
  STAGE: '${self:provider.stage}',
  APPLE_ENDPOINT: '${ssm:/APPLE_ENDPOINT~true}',
  APPLE_SECRET: '${ssm:/APPLE_SECRET~true}',
  ADMIN_SECRET: '${ssm:/ADMIN_SECRET~true}',
  APOLLO_KEY: '${ssm:/APOLLO_KEY~true}',
  APOLLO_GRAPH_ID: 'Apple-oir31',
  APOLLO_GRAPH_VARIANT: "${file(../../env.${opt:stag, 'dev'}.json):APOLLO_GRAPH_VARIANT}",
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant