json - If it possible connect Loadbalancers DNSname to Route53 using AWS Cloudformation template? -
what trying connect loadbalancer dns name to route53. lets on example. here loadbabancer template in resource:
"restelb" : { "type" : "aws::elasticloadbalancing::loadbalancer", "dependson": "attachgateway", "properties": { "loadbalancername": {"fn::join": ["",["rest-elb-", {"ref": "vpc"}]]}, "crosszone" : "true", "subnets": [{ "ref": "publicsubnet1" },{ "ref": "publicsubnet2" }], "listeners" : [ {"loadbalancerport" : "80", "instanceport" : "80","protocol" : "http"}, {"loadbalancerport" : "6060", "instanceport" : "6060","protocol" : "http"} ], } },
and here route53:
"apirecordset" : { "type" : "aws::route53::recordset", "properties" : { "aliastarget" :{ "dnsname" : [ {"fn::join": ["", [{"elasticloadbalancer": "dnsname"},"."]]} ], "evaluatetargethealth" : "boolean", "hostedzoneid" : "string" }, "hostedzonename" : "example.net.", "comment" : "a records frontends.", "name" : "api.example.net.", "type" : "a", "ttl" : "900", } }
just put {"elasticloadbalancer": "dnsname"} didn't work. can suggest or give me correct way add this?
thanks!
most want attribute dnsname
loadbalancer reference restelb
. need fn::getatt
(untested)
"apirecordset" : { "type" : "aws::route53::recordset", "properties" : { "aliastarget" :{ "dnsname" : { "fn::getatt" : [ "restelb", "dnsname" ]}, "evaluatetargethealth" : "boolean", "hostedzoneid" : "string" }, "hostedzonename" : "example.net.", "comment" : "a records frontends.", "name" : "api.example.net.", "type" : "a" } }
Comments
Post a Comment