Closed gkuga closed 1 year ago
Hi, this isn't specific to Compose but it isn't possible to use variables in the service:
key.
Thanks for your reply. I will deal with this in a different way.
Can we please get more information regarding this?
Why exactly is it not possible to use variables in the service:
key?
What is the reasoning behind this?
As a workaround, I use a script to export an environment variable, and this can be used for service
.
Removing all my other config stuff this is what I use:
.sh:
export SERVICE=xxx
serverless deploy .....
serverless.yml:
service: ${env:SERVICE}
Are you certain it's a bug?
Are you using the latest version?
Is there an existing issue for this?
Issue description
We want to pass a value from a parameter in serverless-compose.yml to the service property in serverless.yml. It looks like the following
But we run into this error.
Since it is a fixed value passed from serverless-compose.yml, it seems to me that it should be resolved first.
Service configuration (serverless-compose.yml) content
Command name and used flags
sls Foo:print or sls deploy
Command output