Skip to content

Instantly share code, notes, and snippets.

@teknogeek0
Created January 27, 2015 22:28
Show Gist options
  • Save teknogeek0/c7d0f69f91193bcd9dee to your computer and use it in GitHub Desktop.
Save teknogeek0/c7d0f69f91193bcd9dee to your computer and use it in GitHub Desktop.
cloudformation needs fn::split
{
"ReversePrivateDNSRecord1" : {
"Type" : "AWS::Route53::RecordSet",
"Properties" : {
"HostedZoneId" : "XXXXXXXXXXX",
"Comment" : { "Fn::Join" : [ "", ["DNS name for instance in CF stack: ", { "Ref": "AWS::StackName" }]]},
"Name" : {
"Fn::Join" : [ "", [
{ "Fn::Select" : [ "3", {"Fn::Split" : [".", { "Fn::GetAtt" : [ "Host1", "PrivateIp" ] } ] }]},
".",
{ "Fn::Select" : [ "2", {"Fn::Split" : [".", { "Fn::GetAtt" : [ "Host1", "PrivateIp" ] } ] }]},
".10.10.in-addr.arpa."
] ]
},
"Type" : "PTR",
"TTL" : "900",
"ResourceRecords" : [{"Fn::Join" : [ "", [{ "Ref" : "InstanceName" }, ".MYDOMAIN.net."] ]}]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment