This Terraform module deploys autoscaling alarms for an AWS ECS Fargate service.
Check valid versions on:
- Github Releases: https://github.com/cn-terraform/terraform-aws-ecs-service-autoscaling/releases
- Terraform Module Registry: https://registry.terraform.io/modules/cn-terraform/ecs-service-autoscaling/aws
The Networking module:
- Github Releases: https://github.com/cn-terraform/terraform-aws-networking/releases
- Terraform Module Registry: https://registry.terraform.io/modules/cn-terraform/networking/aws
The ECS cluster module:
- Github Releases: https://github.com/cn-terraform/terraform-aws-ecs-cluster/releases
- Terraform Module Registry: https://registry.terraform.io/modules/cn-terraform/ecs-cluster/aws
The ECS Task Definition:
- Github Releases: https://github.com/cn-terraform/terraform-aws-ecs-fargate-task-definition/releases
- Terraform Module Registry: https://registry.terraform.io/modules/cn-terraform/ecs-fargate-task-definition/aws
The ECS Service module:
- Github Releases: https://github.com/cn-terraform/terraform-aws-ecs-fargate-service/releases
- Terraform Module Registry: https://registry.terraform.io/modules/cn-terraform/ecs-fargate-service
Pleas run this command right after cloning the repository.
pre-commit install
For that you may need to install the folowwing tools:
In order to run all checks at any point run the following command:
pre-commit run --all-files
Name | Version |
---|---|
terraform | >= 0.13 |
aws | >= 4 |
Name | Version |
---|---|
aws | 5.44.0 |
No modules.
Name | Type |
---|---|
aws_appautoscaling_policy.scale_down_policy | resource |
aws_appautoscaling_policy.scale_up_policy | resource |
aws_appautoscaling_target.scale_target | resource |
aws_cloudwatch_metric_alarm.cpu_high | resource |
aws_cloudwatch_metric_alarm.cpu_low | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cooldown | Cooldown period for scaling actions | number |
60 |
no |
ecs_cluster_name | Name of the ECS cluster | any |
n/a | yes |
ecs_service_name | Name of the ECS service | any |
n/a | yes |
max_cpu_evaluation_period | The number of periods over which data is compared to the specified threshold for max cpu metric alarm | string |
"3" |
no |
max_cpu_period | The period in seconds over which the specified statistic is applied for max cpu metric alarm | string |
"60" |
no |
max_cpu_threshold | Threshold for max CPU usage | string |
"85" |
no |
min_cpu_evaluation_period | The number of periods over which data is compared to the specified threshold for min cpu metric alarm | string |
"3" |
no |
min_cpu_period | The period in seconds over which the specified statistic is applied for min cpu metric alarm | string |
"60" |
no |
min_cpu_threshold | Threshold for min CPU usage | string |
"10" |
no |
name_prefix | Name prefix for resources on AWS | any |
n/a | yes |
scale_target_max_capacity | The max capacity of the scalable target | number |
5 |
no |
scale_target_min_capacity | The min capacity of the scalable target | number |
1 |
no |
sns_topic_arn | The ARN of an SNS topic to send notifications on alarm actions. | string |
"" |
no |
tags | Resource tags | map(string) |
{} |
no |
No outputs.