This module creates resources for a containarized ECS application.
This is a version for EC2 backed ECS cluster.
The service is behind a load balancer which means it is exposed. A HTTP healthcheck is required.
- ECS Cluster
- VPC
- VPC Subnets
- Application LoadBalancer (ALB)
- ECS Service
- ECS Task definition
- Container definition (using Cloudposse module)
- ECR Repository
- IAM Task execution role
- Custom policy attachment
- CloudWatch Log group
- Security group
- ALB Target group
- ALB Listener rule
Name | Description | Type | Default | Required |
---|---|---|---|---|
alb_arn | application load balancer under which target group and services will be registered | string | n/a | yes |
app | app name | string | n/a | yes |
cluster_name | ecs cluster name where the services will be registered | string | n/a | yes |
cooldown | string | "60" |
no | |
cpu | Hard limit of CPU for the task | string | "512" |
no |
environment | list | <list> |
no | |
healthcheck_grace | string | "0" |
no | |
healthcheck_healthy_threshold | string | "3" |
no | |
healthcheck_interval | string | "60" |
no | |
healthcheck_matcher | string | "200" |
no | |
healthcheck_path | string | "/" |
no | |
healthcheck_timeout | string | "5" |
no | |
healthcheck_unhealthy_threshold | string | "3" |
no | |
image | override image - disables creating ecr repository | string | "" |
no |
log_retention | for how many days to keep app logs | string | "30" |
no |
max_capacity | string | "1" |
no | |
max_healthy | string | "200" |
no | |
memory | Hard limit of MEM for the task | string | "1024" |
no |
min_capacity | string | "1" |
no | |
min_healthy | string | "50" |
no | |
name | name of this specific service | string | n/a | yes |
policy | IAM Policy heredoc to use with task | string | "" |
no |
port | port on which the service listens | string | "80" |
no |
priority | listener rule priority - must be unique to each ecs-app (module) | string | n/a | yes |
private_subnet_ids | list of private subnets where to provision services | list | n/a | yes |
project | project name | string | n/a | yes |
scale_down | string | "30" |
no | |
scale_up | string | "80" |
no | |
scheduling_strategy | string | "REPLICA" |
no | |
secrets | list | <list> |
no | |
stage | stage name | string | n/a | yes |
tags | map | <map> |
no | |
url | url for the alb listener | string | n/a | yes |
vpc_id | vpc id - used in target group, security group etc | string | n/a | yes |
Name | Description |
---|---|
ecr_repository |