ecs-cloudwatch-autoscaling
cloudposse/ecs-cloudwatch-autoscaling/aws
Terraform module to autoscale ECS Service based on CloudWatch metrics
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 =
| Name | Type | Description | Default |
|---|---|---|---|
| cluster_name | string | The name of the ECS cluster where service is to be autoscaled | required |
| service_name | string | The name of the ECS Service to autoscale | required |
| environment | string | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'st | null |
| tags | map(string) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t | {} |
| label_order | list(string) | The order in which the labels (ID elements) appear in the `id`. Defaults to ["na | null |
| scale_up_cooldown | number | Period (in seconds) to wait between scale up events | 60 |
| attributes | list(string) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, | [] |
| additional_tag_map | map(string) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add | {} |
| label_key_case | string | Controls the letter case of the `tags` keys (label names) for tags generated by | null |
| context | any | Single object for setting entire context at once. See description of individual | {
"additional_tag_map": {},
"attribu |
| enabled | bool | Set to false to prevent the module from creating any resources | null |
| namespace | string | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp' | null |
| tenant | string | ID element _(Rarely used, not included by default)_. A customer identifier, indi | null |
| name | string | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. Thi | null |
| label_value_case | string | Controls the letter case of ID elements (labels) as included in `id`, set as tag | null |
| min_capacity | number | Minimum number of running instances of a Service | 1 |
| scale_down_cooldown | number | Period (in seconds) to wait between scale down events | 300 |
| delimiter | string | Delimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` | null |
| labels_as_tags | set(string) | Set of labels (ID elements) to include as tags in the `tags` output. Default is | [
"default"
] |
| descriptor_formats | any | Describe additional descriptors to be output in the `descriptors` output map. Ma | {} |
| scale_up_step_adjustments | list(object({ metric_inter | List of step adjustments for scale up policy | [
{
"metric_interval_lower_bound": |
| stage | string | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bu | null |
scale_up_policy_arn — ARN of the scale up policyscale_down_policy_arn — ARN of the scale down policyTerraform Module to define a consistent naming convention by (namespace, stage,
Terraform module for provisioning an EKS cluster
Terraform module to generate well-formed JSON documents (container definitions)
Terraform module that provision an S3 bucket to store the terraform.tfstate file