0

I'm trying to add environmental variables using serverless-offline plugin and Turbo repo with:

...
custom:
  config: ${file(./config/${sls:stage}.yml)}

This is working when I deploy it, but it doesn't when I run yarn turbo run dev script.

I tried several things like:

  • Running the server with STAGE=dev serverless offline
  • Hardcode the name of the file: config: ${file(./config/dev.yml)}
  • Add a server-offline section to serverless.yml:
 custom:
   serverless-offline:
     custom:
       config: ${file(./config/dev.yml)}

I know there are other ways to add them, but I need it to be aligned with the other stages which uses sls:stage instead of env:stage or any other prefix.

Abdel P.
  • 739
  • 9
  • 24

0 Answers0