Table of contents
Sub
In CloudFormation Fn::Sub
is used to substitute variables into a template string.
Info on
Fn::Sub
from AWS can be found here
In KloudFormation you need to create an instance of Sub
.
For KloudFormation, it is recommended to use the simpler Join
val rootDomainName = parameter<String>("RootDomainName") outputs( "Domain" to Output(Sub("www.${'$'}{Domain}", mapOf("Domain" to rootDomainName.ref()))) )
Produces
Parameters:
RootDomainName:
Type: "String"
Resources: {}
Outputs:
Domain:
Value:
Fn::Sub:
- "www.${Domain}"
- Domain:
Ref: "RootDomainName"