shalupov / idea-cloudformation

AWS CloudFormation plugin for IntelliJ-based IDEs (IntelliJ IDEA, RubyMine, WebStorm, PhpStorm, PyCharm, AppCode, Android Studio, DataGrip, CLion)
https://teamcity.jetbrains.com/viewType.html?buildTypeId=IdeaAwsCloudFormation_Master_Build&guest=1
Apache License 2.0
136 stars 27 forks source link

Support Fn::Sub with a Mapping #75

Open shalupov opened 7 years ago

shalupov commented 7 years ago

from https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html

Fn::Sub with a Mapping

The following example uses a mapping to substitute the ${Domain} variable with the resulting value from the Ref function.

JSON

{ "Fn::Sub": [ "www.${Domain}", { "Domain": {"Ref" : "RootDomainName" }} ]}
YAML

Name: !Sub
  - www.${Domain}
  - { Domain: !Ref RootDomainName }