puresec / serverless-puresec-cli

Serverless plugin for least privileges.
Other
247 stars 11 forks source link

Error when using --stage flag #9

Closed davetownsend closed 7 years ago

davetownsend commented 7 years ago

Getting error when using serverless --stage flag. e.g., sls puresec gen-roles --stage dev to set stage: ${opt:stage} in serverless.yml.

gives warning:

 Serverless Warning --------------------------------------

  A valid option to satisfy the declaration 'opt:stage' could not be found.

and then throws error:

ServerlessError: Trying to populate non string value into a string for variable ${self:provider.stage}. Please make sure the value of the property is a string.
    at Variables.populateVariable (/Users/dtownsend/.nvm/versions/node/v7.3.0/lib/node_modules/serverless/lib/classes/Variables.js:142:17)
    at singleValueToPopulate.then.valueToPopulate (/Users/dtownsend/.nvm/versions/node/v7.3.0/lib/node_modules/serverless/lib/classes/Variables.js:108:23)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)
avish9 commented 7 years ago

@davetownsend huge apologies for the late reply.

Thank you for reporting this issue.

We are looking into it and will fix it in the upcoming few days.