Skip to content

appzen-oss/terraform-aws-ecs-service-autoscale-step-sqs

Repository files navigation

terraform-aws-ecs-service-autoscale-step-sqs

CircleCI Github release

Terraform module to manage application autoscaling for an ECS service based on a SQS queue's length

Terraform registry

Usage

Basic Example

module "" {
  source        = "appzen-oss/ecs-service-autoscale-step-sqs/aws"
  version       = "0.0.1"
}

Inputs

Name Description Type Default Required
adjustment_type_down Autoscaling policy down adjustment type (ChangeInCapacity, ExactCapacity, PercentChangeInCapacity) string "ChangeInCapacity" no
adjustment_type_up Autoscaling policy up adjustment type (ChangeInCapacity, ExactCapacity, PercentChangeInCapacity) string "ChangeInCapacity" no
attributes Suffix name with additional attributes (policy, role, etc.) list <list> no
cluster_name Name of ECS cluster that service is in string n/a yes
component TAG: Underlying, dedicated piece of service (Cache, DB, ...) string "UNDEF-ECSAutoScaleSQS" no
delimiter Delimiter to be used between name, namespaces, attributes, etc. string "-" no
environment Environment (ex: dev, qa, stage, prod). (Second or top level namespace. Depending on namespacing options) string n/a yes
high_eval_periods The number of periods over which data is compared to the high threshold string "1" no
high_period_secs The period in seconds over which the high statistic is applied string "60" no
high_threshold The value against which the high statistic is compared string "1000" no
low_eval_periods The number of periods over which data is compared to the low threshold string "1" no
low_period_secs The period in seconds over which the low statistic is applied string "60" no
low_threshold The value against which the low statistic is compared string "100" no
max_capacity Maximum number of tasks to scale to string "5" no
min_capacity Minimum number of tasks to scale to string "0" no
monitor TAG: Should resource be monitored string "UNDEF-ECSAutoScaleSQS" no
name Base name for resource string n/a yes
namespace-env Prefix name with the environment. If true, format is: {env}-{name} string "true" no
namespace-org Prefix name with the organization. If true, format is: {org}-{env namespaced name}. If both env and org namespaces are used, format will be {org}-{env}-{name} string "false" no
organization Organization name (Top level namespace) string "" no
owner TAG: Owner of the service string "UNDEF-ECSAutoScaleSQS" no
product TAG: Company/business product string "UNDEF-ECSAutoScaleSQS" no
queue_name Name of SQS queue to monitor string n/a yes
scale_down_cooldown The amount of time, in seconds, after a scaling down completes and before the next scaling activity can start string "60" no
scale_down_count The number of members by which to scale down, when the adjustment bounds are breached. Should always be negative value string "-3" no
scale_down_lower_bound The lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as negative infinity string "" no
scale_down_min_adjustment_magnitude Minimum number of tasks to scale down at a time string "10" no
scale_down_upper_bound The upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as infinity string "0" no
scale_up_cooldown The amount of time, in seconds, after a scaling up completes and before the next scaling up can start string "60" no
scale_up_count The number of members by which to scale up, when the adjustment bounds are breached. Should always be positive value string "5" no
scale_up_lower_bound The lower bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as negative infinity string "0" no
scale_up_min_adjustment_magnitude Minimum number of tasks to scale up at a time string "10" no
scale_up_upper_bound The upper bound for the difference between the alarm threshold and the CloudWatch metric. Without a value, AWS will treat this bound as infinity string "" no
service TAG: Application (microservice) name string "UNDEF-ECSAutoScaleSQS" no
service_name Name of ECS service to autoscale string n/a yes
tags A map of additional tags map <map> no
team TAG: Department/team of people responsible for service string "UNDEF-ECSAutoScaleSQS" no

Resource Graph of plan

Terraform Graph