You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When stage is missing from serverless.yml it will not automatically resolve to a passed in --stage argument, but instead remain as dev. This is dissimilar to the behavior of region which (if omitted from the yml file) will resolve to the passed in --region argument.
This issue was discovered when configuring a plugin to set defaults if none are provided such as VPC configuration and the boilerplate stage and region options/fallbacks.
@tonyallain it's actually expected, as service.provider.stage is configured to expose stage as in serverless.yml (eventually defaulting to dev). It's not a source of information for fully resolved stage.
For fully resolved stage use this.serverless.getProvider('aws').getStage().
I agree it's sort of design issue as it's counter-intuitive, but it's it is what it is (at least at this point) :)
When
stage
is missing fromserverless.yml
it will not automatically resolve to a passed in--stage
argument, but instead remain asdev
. This is dissimilar to the behavior ofregion
which (if omitted from the yml file) will resolve to the passed in--region
argument.This issue was discovered when configuring a plugin to set defaults if none are provided such as VPC configuration and the boilerplate
stage
andregion
options/fallbacks.serverless.yml
plugin.js
sls --version --stage production --region potato
outputInstalled version
The text was updated successfully, but these errors were encountered: