I am using this cloudformation fragment to map my elb to a domain name:
"dnsRecord" : {
"Type" : "AWS::Route53::RecordSet",
"Properties" : {
"HostedZoneName" : "apps.acme.com.",
"Comment" : "DNS name for instance.",
"Name" : {
"Fn::Join" : [ "", [
{"Ref" : "Hostname"}, "."
]]
},
"Type" : "CNAME",
"TTL" : "900",
"ResourceRecords" : [
{ "Fn::GetAtt" : [ "ElasticLoadBalancer", "DNSName" ] }
]
}
}
I need to be able to setup many names or aliases for this elb using cloudformation, using a parameter. I am thinking of a CSV string as the parameter, but am not clear how to "iterate" over that CSV string to repeat this "dnsRecord" block as many times as required.
For example, if Hostname was "fred.apps.acme.com,bertha.apps.acme.com", that would setup 2 dns entries for me to the same elb.
How can I do this?
Aucun commentaire:
Enregistrer un commentaire