Closed rymndhng closed 2 years ago
Oops, re-opening this issue. I mis-linked the PR 🤦
The trick is to escape the handlebars braces with a double backslash:
AWSTemplateFormatVersion: 2010-09-09
Description: Lambda function code and related resources
Parameters:
Environment:
Type: String
Resources:
LambdaFunction:
Type: AWS::Lambda::Function
Properties:
Environment:
Variables:
MY_VAR: !Sub "\\{{resolve:ssm:/${Environment}/foo}}"
I've added a note about this to the docs.
The iidy preprocessor fails when using CloudFormation dynamic references, such as
{{resolve:ssm:..}}
. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.htmlTemplate that reproduces this error:
Command used for testing: