runway.cfngin.tokenize_userdata module

Resources to tokenize userdata.

runway.cfngin.tokenize_userdata.cf_tokenize(raw_userdata: str)List[str][source]

Parse UserData for Cloudformation helper functions.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html

It breaks apart the given string at each recognized function (see HELPERS global variable) and instantiates the helper function objects in place of those.

Parameters

raw_userdata – Unparsed userdata data string.

Returns

A list of string parts that is useful when used with troposphere.Join() and troposphere.Base64() to produce userdata.

Example