Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[object Object] as environment variable when using CF functions #1713

Open
10Bude10 opened this issue Jul 14, 2023 · 1 comment · May be fixed by #1842
Open

[object Object] as environment variable when using CF functions #1713

10Bude10 opened this issue Jul 14, 2023 · 1 comment · May be fixed by #1842

Comments

@10Bude10
Copy link

10Bude10 commented Jul 14, 2023

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

@NickKelly1
Copy link

yep.... same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants