Reputation: 13626
When I do an sls deploy
, I ended up with a CloudFormation stack named <name of service>-<stage>
.
I would like to deploy multiple CloudFormation stacks using the same template. One way this could work is based on an environment variable. Something like:
SOURCE=twitter sls deploy
...would yield a cloud formation stack named <name of service>-<SOURCE env var>-<stage>
, which in this case would be scrape-twitter-prod
.
Is this possible?
Upvotes: 1
Views: 803
Reputation: 34744
According to the documentation you can reference environment variables with ${env:VARIABLE}
. You can then do something like:
service: scrape-${env:SOURCE}
Upvotes: 1