Check for the expected error message in the case the SSM parameter
does not exist and return `undefined`. Any other (unexpected) error
message still throws an exception.
Adds support for specifying SSM parameters as serverless variables.
Basic syntax is `${ssm:<foo>}`. To support decryption of SecureString
parameters, the extended syntax is `${ssm:<foo>~true|false}`. The `~`
is a delimiter; `true|false` is evaluated and passed to the
`WithDecryption` option of the SSM API.
When we define a cf variable in serverless.yml and that variable wasn't output from the Cloudformation Outputs
a useless error was throw:
> Cannot read property 'OutputValue' of undefined
Now the error give more information:
> Trying to request a non variable from Cloudformation.
> Stack name: "some-stack" Requested variable: "DoestNotExist"
1. Improve wording of documentation. Note the concrete object that will be written in its entirety
2. Expand documentation. Note a potential security risk for secrets
3. Move, without changes, the `warnIfNotFound` method because it was putting space between `getValueFromSource` and the various source type specific functions it uses
4. Implement unit tests for `warnIfNotFound`
5. Implement unit tests for `logWarning`
1. define new `logWarning` method in Error class and consolidate message formatting for consistency.
2. use new `logWarning` to inform users if a variable cannot be resolved.
1. Newly allow `${opt:}` and `${env:}` as a valid reference to the root of the option and environment settings hive, respectively
2. Write a test ensuring the above
3. Document the new capability
4. Eliminate a silly through-${self:} use example
5. Allow for the use of populateProperty in a not-in-place manner
6. Allow for the valid (albeit odd) valueToPopulate[''] case
1. Newly allow '${self:}' as a valid reference to the current serverless.yml's root
a. This allows for a more clean manner of passing names and identifiers around between projects. Particularly, this facilitates exporting values from projects so they can be used in other projects via Fn::ImportValue.
2. Write a test ensuring the above
3. Document the new capability
Example usage: https://github.com/Nordstrom/hello-retail/pull/26/files