Open Meddan opened 1 year ago
It seems like this could probably be solved by allowing us to call the script with parameters as those are resolved beforehand. Calling the script like so:
serverless migrations down --DB_PORT ${self:provider.environment.DB_PORT}
Gives the following error (to be expected really):
Error:
Detected unrecognized CLI options: "--DB_PORT".
Error:
Error: Command failed: serverless migrations down --DB_PORT 3306
So the DB_PORT value has resolved correctly.
I am trying to pass variables between stacks using Serverless Compose, but I get an error when using that variable to execute a sql migration using the serverless-sequelize-migrations plugin. I am not sure if this is an issue with the plugin, a limitation in Serverless or just me doing something wrong.
The variable is usable in the stack as I can see it in my environment when deploying a lambda. Is there something I am missing about how serverless handles its context or is this maybe a bug in the plugin?
Relevant snippets from my setup:
serverless_compose.yml:
service/serverless.yml:
migration/serverless.yml: