ecs-cloudwatch-autoscaling

cloudposse/ecs-cloudwatch-autoscaling/aws

Terraform Module HCL AWS

Terraform module to autoscale ECS Service based on CloudWatch metrics

Install
module "ecs-cloudwatch-autoscaling" {
source = "cloudposse/ecs-cloudwatch-autoscaling/aws"
version = "1.0.0"
}
⭐ Source on GitHub 📦 Registry page
README

Terraform module for creating alarms for tracking important changes and occurrences from ECS Services. > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running atmos to manage infrastructure from our Quick Start tutorial. > Usage For a complete example, see examples/complete. For automated tests of the complete example using bats and Terratest, see test. ``hcl module "ecs_cloudwatch_autoscaling" { source = "cloudposse/ecs-cloudwatch-autoscaling/aws" # Cloud Posse recommends pinning every module to a specific version # version = "x.x.x" namespace = "eg" stage = "staging" name = "app" service_name =

Inputs (26)
NameTypeDescriptionDefault
cluster_namestringThe name of the ECS cluster where service is to be autoscaled required
service_namestringThe name of the ECS Service to autoscale required
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'stnull
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
scale_up_cooldownnumberPeriod (in seconds) to wait between scale up events60
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
additional_tag_mapmap(string)Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add{}
label_key_casestringControls the letter case of the `tags` keys (label names) for tags generated by null
contextanySingle object for setting entire context at once. See description of individual { "additional_tag_map": {}, "attribu
enabledboolSet to false to prevent the module from creating any resourcesnull
namespacestringID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp'null
tenantstringID element _(Rarely used, not included by default)_. A customer identifier, indinull
namestringID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. Thinull
label_value_casestringControls the letter case of ID elements (labels) as included in `id`, set as tagnull
min_capacitynumberMinimum number of running instances of a Service1
scale_down_cooldownnumberPeriod (in seconds) to wait between scale down events300
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` null
labels_as_tagsset(string)Set of labels (ID elements) to include as tags in the `tags` output. Default is [ "default" ]
descriptor_formatsanyDescribe additional descriptors to be output in the `descriptors` output map. Ma{}
scale_up_step_adjustmentslist(object({ metric_interList of step adjustments for scale up policy[ { "metric_interval_lower_bound":
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
Outputs (2)
scale_up_policy_arn — ARN of the scale up policy
scale_down_policy_arn — ARN of the scale down policy
Resources (2)
aws_appautoscaling_policyaws_appautoscaling_target
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.0
Cloud AWS
★ Stars33
Forks18
Total downloads2.7M
Inputs26
Outputs2
Resources2
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated