We have installed Elasticsearch v2.3.5 on an EC2 instance in AWS and there are multiple applications accessing it. We'd like to control the cluster nodes via a route53 entry rather than hard coding the IP addresses which are not stable in AWS, particularly if the cluster needs to grow. The DNS name would reference 1 or more A records which comprise the nodes in the ES cluster.
All applications are created with spring-boot 1.4.0 which is configured with
spring.data.elasticsearch.cluster-nodes={ip-address}:9300
Can it be changed to a domain name? say
spring.data.elasticsearch.cluster-nodes=elastic.example.com:9300
How can we achieve this?