Open tiagomjorge opened 2 years ago
Just found this on the serverless framework plugin doc, which confirms my theory:
Note: Variable references in the serverless instance are not resolved before a Plugin's constructor is called, so if you need these, make sure to wait to access those from your hooks.
I'm trying to configure the plugin's custom variables like this:
However, I've noticed that the
dockerPath
is getting passed to the plugin non-expanded. Looking at the plugin's code, it seems like since the plugin is consuming all of the configuration parameters on its constructor, it is reading the values before the serverless framework expands them. I've also tried using a file, like:But it also doesn't work, which makes sense, since the plugin is reading the config parameters before the serverless framework has a chance to fill them in. One fix would be to read those variables inside the hooked up functions, instead of inside the constructor.
Does this make sense? Am I missing something?