This module provision ECS service. The resources involve are:
- Route53
- Target Group
- ALB Listener Rule
- CloudWatch Log Stream and Log Group
- ECS Service and Task Definition
- ECS App AutoScaling Policy and Target
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| environment | The environment for the service. | string |
stag |
no |
| region | The AWS region to create ECS cluster in. | string |
ap-southeast-1 |
no |
| resource_tags | The tags for your resource. | map |
yes | |
| vpc_id | The ID of the VPC to use for your target group. | string |
yes | |
| health_check_path | The path for ALB to health check your application. | string |
yes | |
| domain_name | The domain URL to reach your services. | string |
yes | |
| existing_domain | Whether the domain name is an existing domain and requires a new record | bool |
false |
no |
| hosted_zone | The hosted zone on Route53 to create for the service. | string |
naluri.net |
no |
| protocol | The type of protocol to use in load balancer rule. | string |
https |
no |
| private_zone | Is the Route53 Hosted Zone a private zone. | bool |
false |
no |
| health_check_parameters | The LB health check parameters to use, options include healthy_threshold, unhealthy_threshold, interval, and timeout. | map |
{} |
no |
| ecs_cluster_name | The name for the ECS cluster. | string |
yes | |
| service_name | The name of your services to deployed to ECS. | string |
yes | |
| service_port | The PORT where your service is run on. | number |
yes | |
| app_count | The count of the application to spin up in the cluster. | number |
1 |
no |
| health_check_grace_period_seconds | The number of seconds of grace period before ECS respond to ELB health checks, useful for app that has long startup time. | number |
0 |
no |
| log_retention_in_days | The number of days to retain the logs. | number |
3 |
no |
| task_definition | The task description for your service. | string |
yes | |
| ecs_task_role_arn | The ARN for the task role for your ECS task. | string |
null |
no |
| ecs_task_execution_role_arn | The ARN for the task role for your ECS task. | string |
null |
no |
| max_app_count | The maximum count for your ECS service. | number |
3 |
no |
| min_app_count | The minimum count for your ECS service. | number |
3 |
no |
| autoscaling_memory_target_value | The maximum memory of the overall ECS service usage before we autoscale. | number |
80 |
no |