Consul is a distributed service mesh solution that provides service discovery, health checking, key-value storage, and more. Each node in a Consul cluster runs a Consul agent, which communicates with other agents in the cluster to maintain a consistent view of the services running on the network. When an application needs to discover a service, it can send a request to the Consul cluster, which will return the address of the nearest healthy instance of the service.
- Static IP
- DNS forwarding private zone
- TCP + UDP ILB
- Instance Template
- MIG
- Backend
- Firewall rules
- Service account
- Health Check
terraform init
terraform plan
terraform apply
Connect to any of your consul cluster node and use below commands
/opt/consul/1.4.4/consul catalog nodes
dig consul.service.dc1.consul
dig @localhost -p 8600 consul.service.dc1.consul