Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use region and stage from the provider. #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tsdorsey
Copy link

@tsdorsey tsdorsey commented Jan 8, 2019

The problem

If you did not provide the stage variable on the command line the the deploy would fail.
Missing required key 'Value' in params.Tags[0]
See #7 for another example.

The reason

The plugin options were built using only the command line options and the custom options. The provider was ignored.

What I did

  • Added two new test
    • should exclude stack tags that have no value
    • should get options even when no options are passed in
  • Filter stack tags to remove any where the value is not truthy
  • Updated serverless to 1.25.0
  • Force the region and stage to come from the provider

Supporting change from serverless 1.25.0

Starting in Serverless 1.25.0 there are now getRegion and getStage functions on the provider object.
These should be used as stage and region as they are values used by other parts of the system as well.

Here is the diff when the change was added. serverless/serverless@bf8d57f#diff-a3c9979defeb57f83384efb5246290db

Starting in Serverless 1.25.0 there are no getRegion and getStage functions on the provider object.
These should be used as stage and region as they are values used by other parts of the system as well.

Here is the diff when the change was added. serverless/serverless@bf8d57f#diff-a3c9979defeb57f83384efb5246290db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant