serverless-offline
serverless-offline copied to clipboard
[object Object] as environment variable when using CF functions
Bug Report
After updating severless (2.72.x -> 3.33.0) and serverless-offline (9.x -> 12.04) to the latest version my existing CF function doesn't work anymore. I will get [object Object] instead of an expected string[]. Beside my main yml-file I have for each stage another yml-file. Including allowed audiences: serverless.offline.yml
audiences:
- 'A'
- 'B'
This will be used in the main yml-file: serverless.yml
environment:
OIDC_AUDIENCES:
Fn::Join:
- ','
- ${file(./serverless.${self:provider.stage}.yml):oidc.audiences}
This works fine for online stages. Before updating it worked for offline as well. After updating I have to change to: serverless.yml
environment:
OIDC_AUDIENCES: ${file(./serverless.${self:provider.stage}.yml):oidc.audiences}
But this won't work in online stages.
I want to use CF function even in offline mode, like it was possible in the past.
plugins:
- serverless-offline
provider: runtime: nodejs16.x stage: offline and dev
yep.... same