- terraform init
- terraform appy
- terraform destroy
This terraform script creates ec2 instance as a consul server. So your inidividual ec2 instances can register themselves to consul server. That takes care of service discovery which is one of the biggest challenges in microservice architecture.