This module creates an ECS cluster
module "ecs_apps" {
# source = "git::https://github.com/DNXLabs/terraform-aws-ecs.git?ref=0.1.0"
name = "${local.workspace["cluster_name"]}"
instance_type_1 = "t3.large"
instance_type_2 = "t2.large"
instance_type_3 = "m2.xlarge"
vpc_id = "${data.aws_vpc.selected.id}"
private_subnet_ids = ["${data.aws_subnet_ids.private.ids}"]
public_subnet_ids = ["${data.aws_subnet_ids.public.ids}"]
secure_subnet_ids = ["${data.aws_subnet_ids.secure.ids}"]
certificate_arn = "${data.aws_acm_certificate.dnx_host.arn}"
on_demand_percentage = 0
asg_min = 1
asg_max = 4
asg_memory_target = 50
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
alb_only | Whether to deploy only an alb and no cloudFront or not with the cluster | string | "false" |
no |
alb | Whether to deploy an ALB or not with the cluster | string | "true" |
no |
asg_max | Max number of instances for autoscaling group | string | "4" |
no |
asg_memory_target | Target average memory percentage to track for autoscaling | string | "60" |
no |
asg_min | Min number of instances for autoscaling group | string | "1" |
no |
certificate_arn | string | n/a | yes | |
instance_type_1 | Instance type for ECS workers (first priority) | string | n/a | yes |
instance_type_2 | Instance type for ECS workers (second priority) | string | n/a | yes |
instance_type_3 | Instance type for ECS workers (third priority) | string | n/a | yes |
name | Name of this ECS cluster | string | n/a | yes |
on_demand_percentage | Percentage of on-demand intances vs spot | string | "100" |
no |
private_subnet_ids | List of private subnet IDs for ECS instances | list | n/a | yes |
public_subnet_ids | List of public subnet IDs for ECS ALB | list | n/a | yes |
secure_subnet_ids | List of secure subnet IDs for EFS | list | n/a | yes |
security_group_ids | Extra security groups for instances | list | <list> |
no |
userdata | Extra commands to pass to userdata | string | "" |
no |
vpc_id | VPC ID to deploy the ECS cluster | string | n/a | yes |
expire_backup_efs | Number of days after creation that a recovery point is deleted | string | n/a | no |
Name | Description |
---|---|
alb_arn | |
alb_dns_name | |
alb_id | |
alb_listener_https_arn | |
alb_zone_id | |
ecs_arn | |
ecs_iam_role_arn | |
ecs_iam_role_name | |
ecs_id | |
ecs_name | |
ecs_nodes_secgrp_id | |
ecs_service_iam_role_arn | |
ecs_service_iam_role_name | |
ecs_task_iam_role_arn | |
ecs_task_iam_role_name |
Module managed by Allan Denot.
Apache 2 Licensed. See LICENSE for full details.