serverless / compose

Orchestrate Serverless Framework in monorepos
https://serverless.com/framework/docs/guides/compose
MIT License
111 stars 15 forks source link

feat: Support `${env:}` vars #48

Closed pgrzesik closed 2 years ago

pgrzesik commented 2 years ago

I'm putting it as a WIP right now as if we will be integrating with the Framework codebase, we should rather reuse the variable resolution logic and follow the same convention. We might also push this limited env support earlier to our betatesters. What do you think @mnapoli ?

Addresses: #48

pgrzesik commented 2 years ago

I'll investigate the Windows failure

mnapoli commented 2 years ago

we should rather reuse the variable resolution logic and follow the same convention.

Is that just an implementation change then? I.e. the variable will still work the same, right?

I'm 👍 to merge that in the meantime, then we can refactor at any time because the feature should work identically.

pgrzesik commented 2 years ago

It will work a bit differently - it will support better nesting capabilities e.g. ${env:something-${sls:stage}} will be resolved properly and in addition it will support default values, e.g. ${env:missingvalue, 'default'}. Current proposed implementation does not support that

mnapoli commented 2 years ago

👍 oh yeah 100%, it's just that it will be invisible for users because there'll be no BC break. So that sounds good to me!