I am working with a kafka cluster on AWS, I would like to give each broker a CNAME so I can reference that rather than the IP address.
I know usually with an EC2 we can do this in the cloud formation template using something like this..
{
"Parameters": {
"TestCname":{
"Description": "The IpAddress for the MyInstance Ec2",
"Type": "String",
"Default": "domainName.com"
}
},
"Resources": {
"MyInstanceCNAME": {
"Type": "Custom::ResourceDNS",
"Version": "1.0",
"Properties": {
"ServiceToken": { "Fn::Sub": "arn:aws:sns:${AWS::Region}:<Account_Num>:custom-resource" },
"Resource": "CNAME",
"CNAME": { "Ref": "TestCname" },
"IpAddress" : { "Fn::GetAtt" : [ "MyInstance", "PrivateIp" ]}
}
},
"MyInstance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"AvailabilityZone": "us-east-1a",
"ImageId": "ami-a4c7edb2",
"InstanceType": "t2.micro"}
}
}
The problem is that with confluent quickstart script for AWS
I initially thought the creation of the ec2s must be in the referenced templates eg.
Fn::Sub": "https://${QSS3BucketName}.s3.amazonaws.com/${QSS3KeyPrefix}templates/nodegroup.template
But I couldn't see the instantation in that template either and have just discovered through a guy on my team that the ec2s are being created through auto scaling.
Can we add a CNAME and how is the question? Thanks