-
Notifications
You must be signed in to change notification settings - Fork 15
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
Injecting two params with ${env: xxx} breaks compose #144
Comments
Hey @mdial89f - thanks a lot for reporting and sorry you've run into trouble. We've had a report of this issue already and it has been fixed today - I just published a new version that includes the fix - https://github.com/serverless/compose/releases/tag/v1.2.3 Let me know if that solves the problem for you. |
That fixed it! |
Ha, you actually were on the latest at the time, as I published the v1.2.3 release a few minutes after your ticket was created. Thanks for the confirmation that everything now works as expected 🙇 |
@mdial89f @pgrzesik I'm tagging here because it seems envs worked for you. I'm trying to use the Did # .env
AWS_REGION=us-west-2 # serverless-compose.yml
services:
serviceA:
path: ...
region: ${env:AWS_REGION} I'm only getting the I'm on serverless |
@ada-cienciala |
Oh, I assumed serverless loads the But it makes sense they would not load it if you cannot use the |
Are you certain it's a bug?
Are you using the latest version?
Is there an existing issue for this?
Issue description
I have created a public repo to demonstrate the issue: https://github.com/mdial89f/env-issue
To summarize:
a compose file with the following contents will FAIL with "(node:69391) UnhandledPromiseRejectionWarning: ServerlessError: Unrecognized configuration variable sources: "env":
But if you comment out one of the params calling env, like the following contents, deployment succeeds:
So, it seems you can only call env once in the compose file, for whatever reason.
To demonstrate the issue:
git clone git@github.com:mdial89f/env-issue.git
npm run test
This will fail, as the compose file in source has two parameters both defined with 'env:'npm run test
. This will succeedService configuration (serverless-compose.yml) content
See repo linked above for more info.
The text was updated successfully, but these errors were encountered: