Terraforming a AWS ECS Service depends on this configuration:
load_balancer {
target_group_arn = aws_lb_target_group.foo.arn
container_name = "mongo"
container_port = 8080
}
‘container_name’ here needs to be the same value as what’s defined in the task definition. The problem here is that I don’t want to terraform the Task Definition, as that’s an application-level configuration I’d like to keep separate from the terraform / terragrunt which is obviously infrastructure-level configuration. What is the best approach here? Am I forced to define the task definition in terraform?
Additional Background: I have PCF experience where a simple manifest file was tied with the source code. Cloud Foundry was very 12-factor sensitive. Here it seems to be a violation of those principles.