Add route53 ResourceSet to Cloudformation.
This commit is contained in:
parent
42cd333d51
commit
adb26986eb
5 changed files with 95 additions and 5 deletions
|
|
@ -0,0 +1,40 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
template = {
|
||||
"Resources" : {
|
||||
"Ec2Instance" : {
|
||||
"Type" : "AWS::EC2::Instance",
|
||||
"Properties" : {
|
||||
"ImageId" : "ami-1234abcd",
|
||||
"PrivateIpAddress": "10.0.0.25",
|
||||
}
|
||||
},
|
||||
|
||||
"HostedZone": {
|
||||
"Type" : "AWS::Route53::HostedZone",
|
||||
"Properties" : {
|
||||
"Name" : "my_zone"
|
||||
}
|
||||
},
|
||||
|
||||
"myDNSRecord" : {
|
||||
"Type" : "AWS::Route53::RecordSet",
|
||||
"Properties" : {
|
||||
"HostedZoneName" : { "Ref" : "HostedZone" },
|
||||
"Comment" : "DNS name for my instance.",
|
||||
"Name" : {
|
||||
"Fn::Join" : [ "", [
|
||||
{"Ref" : "Ec2Instance"}, ".",
|
||||
{"Ref" : "AWS::Region"}, ".",
|
||||
{"Ref" : "HostedZone"} ,"."
|
||||
] ]
|
||||
},
|
||||
"Type" : "A",
|
||||
"TTL" : "900",
|
||||
"ResourceRecords" : [
|
||||
{ "Fn::GetAtt" : [ "Ec2Instance", "PrivateIp" ] }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue