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

values are not merged between yml files #15

Closed
deathemperor opened this issue May 28, 2021 · 3 comments
Closed

values are not merged between yml files #15

deathemperor opened this issue May 28, 2021 · 3 comments

Comments

@deathemperor
Copy link

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
  environment: ${file(../../serverless.environment.yml)}

package:
  individually: true
  excludeDevDependencies: true

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

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

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

serverless.own.yml

provider:
  environment:
    SOME_VAR: SOME_VALUE

serverless.own.yml

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}

results: SOME_VAR does not exists/undefined

@deathemperor
Copy link
Author

values are only merged when both yml file are imported using this plugin. but values won't be parsed as mentioned in #14

@deathemperor
Copy link
Author

it would also be nice if the plugin is compatible with sls print. meaning when running print it will show the imported configs.

@deathemperor
Copy link
Author

nvm, figured it out. I was not configure it right

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