Skip to content

Instantly share code, notes, and snippets.

@madagra
Last active January 2, 2021 14:48
Show Gist options
  • Save madagra/822e9034d863a3ec9174d40405a89508 to your computer and use it in GitHub Desktop.
Save madagra/822e9034d863a3ec9174d40405a89508 to your computer and use it in GitHub Desktop.
module "sample_app" {
source = "github.com/madagra/terraform-aws-single-task-service"
ecs_cluster = aws_ecs_cluster._.id
task_name = "sample_app"
container_image = "mongo:latest"
task_exec_role = aws_iam_role.ecs_execution.arn
vpc_id = module.vpc.vpc_id
vpc_subnets = module.vpc.private_subnets
has_alb = true
alb_port = 27017
alb_target_group = module.alb.target_group_arns[0]
has_discovery = true
dns_namespace = aws_service_discovery_private_dns_namespace.dns_namespace.id
task_launch_type = "EC2"
open_ports = [27017]
environment = [
{
"name" : "EXAMPLE_ENV"
"value" : "sample"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment