ECS FARGATE Cluster is created with the image(wordpress:php7.4) from Elastic Container Registry. Refer ECR Module
- aws_region
- vpc_id
- private_subnets
- public_subnets
- ecs_task_execution_role_name
- ecs_task_role_name
- az_count
- app_image
- app_port
- app_port_secure
- app_count
- health_check_path
- fargate_cpu
- fargate_memory
- efs_access_point
- efs_id
- rds_endpoint
- rds_database_name
- rds_database_username
- rds_database_password
- domain_name
- hosted_zone_id
- acm_cert_arn
- ecs_cluster
- ecs_cluster_service
- ecs_task_definitions
Below are the terraform files for creating ECS FARGATE Cluster
- Application Load Balancer - alb.tf
- ECS FARGATE Cluster - main.tf
- IAM Roles for FARGATE - roles.tf
- ALB and FARGATE Security Group - security.tf
- Enable Cloudwatch Logs - logs.tf
- ECS Autoscaling - auto_scaling.tf
Logging and Alarming are enabled for ECS for monitoring and Notifying health of FARGATE containers. Refer Logging & Alarming
AutoScaling is enabled based on the below configuration Criteria. Desired Capacity = 2 Minimum Capacity = 2 Maximum Capacity = 4
Scale-up: Scale up will happen when the CPU is 85% Scale-Down: Scale down will happen when the CPU is 10%