Built-In Helpers
Here are some of the built-in helpers available in the Lono DSL:
Method | Description |
---|---|
default_subnets | Returns Array of default Subnet Ids. Useful for config params. |
default_vpc | Returns default VPC id. Useful for config params. |
extract_scripts | Generates a script that can be included in user_data scripts to extract scripts files. More info about the helper is in the Extract Scripts docs. |
key_pairs | Returns Array of Key Pairs. You can pass it a pattern to filter for keypairs. IE: key_pairs(/default/).first . Useful for config params. |
stack_output | Returns the Stack output. IE: stack_output("my-stack.OutputKey") . Useful for params files. |
stack_resource | Returns the Stack resource physical id. IE: stack_resource("my-stack.LogicalId") . Useful for params files. |
tags | Converts a standard Ruby hash to the CloudFormation key, value structure. |
user_data | Returns the script from the app/user_data folder as a String. Meant for user_data scripts. |
user_data_script | Path location of the script to be used along with the user_data_script helper. |
The built-in helpers are defined in this this source code file: dsl/evaluator/helpers.
You can also create your own helpers with Custom Helpers.