This gist provides a sample terraform configuration to use service discovery for ecs service. It is useful when configuring a service that is only accessible internally without having to configure ELB and Route 53.
- Create service discovery namespace
- Create service discovery configuration
Afor serviceB - Create ECS service
Bto resiger with discovery configurationA - Access service
Busing dns name
This will automatically register new ECS tasks with Cloud Map when scaling in/out