runway.cfngin.tokenize_userdata module

Resources to tokenize userdata.

runway.cfngin.tokenize_userdata.cf_tokenize(raw_userdata)[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

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-cloudformation.html#scenario-userdata-base64

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 (str) – Unparsed userdata data string.

Returns

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

Return type

List[str]

Example