Skip to content

Conversation

mavax
Copy link

@mavax mavax commented Mar 28, 2018

I was having issues when I had serverless variables specified including stage, those were not being used.

Also, the error was not very clear:

  Serverless Error ---------------------------------------
 
  Missing required key 'Value' in params.Tags[0]

I'm not 100% sure this is the proper way to do this, but it seems to work for my case.

@jamesoflol
Copy link

trek10inc did you see this?

Mavax, you're largely correct. This plugin fails if you don't provide the optional command line
argument 'stage'. That seems like bug territory. Though, ergh, this is such a painful topic. Mostly because the serverless team have been so painfully unopinionated about it. Their docs sometimes say to use

provider:
  stage: ${opt:stage, 'dev'}

but sometimes say to make a custom variable the single point of truth, and worse still in their default template they don't broach the issue at all. Thus I can see that pointing to provider.stage as not an appropriate solution for all.

Perhaps a more universal solution to this bug would be to employ the same logic in the code? i.e., look for opt.stage, and if not there, look for provider.stage. I imagine this is what other plugins do.

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.

3 participants