{"id":21213983,"url":"https://github.com/cruxstack/terraform-aws-ecs-cluster","last_synced_at":"2026-05-13T07:43:07.448Z","repository":{"id":189177963,"uuid":"680198281","full_name":"cruxstack/terraform-aws-ecs-cluster","owner":"cruxstack","description":"Terraform module to properly provision an auto-scaling ECS cluster","archived":false,"fork":false,"pushed_at":"2023-08-22T13:57:55.000Z","size":84,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T16:22:32.505Z","etag":null,"topics":["aws","cloudinit","cloudposse","container","containerization","docker","ec2-instance","ecs","ecs-capacity-provider","fargate","sweetops","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/cruxstack/ecs-cluster/aws/latest","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cruxstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-18T15:23:42.000Z","updated_at":"2023-08-18T15:28:20.000Z","dependencies_parsed_at":"2023-08-18T16:47:34.053Z","dependency_job_id":"f33bb2d8-fcfc-4bb8-8932-dec17c65b0df","html_url":"https://github.com/cruxstack/terraform-aws-ecs-cluster","commit_stats":null,"previous_names":["cruxstack/terraform-aws-ecs-cluster"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cruxstack%2Fterraform-aws-ecs-cluster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cruxstack%2Fterraform-aws-ecs-cluster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cruxstack%2Fterraform-aws-ecs-cluster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cruxstack%2Fterraform-aws-ecs-cluster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cruxstack","download_url":"https://codeload.github.com/cruxstack/terraform-aws-ecs-cluster/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243663580,"owners_count":20327306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cloudinit","cloudposse","container","containerization","docker","ec2-instance","ecs","ecs-capacity-provider","fargate","sweetops","terraform","terraform-module"],"created_at":"2024-11-20T21:25:20.749Z","updated_at":"2026-05-13T07:43:02.427Z","avatar_url":"https://github.com/cruxstack.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Module: ECS Cluster\n\nThis Terraform module provides a comprehensive solution for creating and\nmanaging an AWS Elastic Container Service (ECS) cluster. Key features include\nsupport for self-hosted nodes, both spot and on-demand, with configurable\nauto-scaling policies.  The module also supports log retention configuration,\ninstance customization, and monitoring through collected metrics. It leverages\nthe `cloudposse/label/null` module for consistent naming and tagging of\nresources. Whether you need a simple ECS cluster or a complex, self-hosted\nenvironment, this module offers flexibility and ease of use to meet your\ncontainer orchestration needs.\n\n## Features\n\n- **ECS Cluster Creation**: Provides ECS cluster with optional self-hosted nodes\n  (spot and on-demand).\n- **Auto-Scaling Configuration**: Supports auto-scaling with customizable count\n  range.\n- **Instance Configuration**: Allows configuration of instance sizes and user\n  data scripts.\n- **Capacity Providers**: Configures ECS capacity providers.\n\n## Usage\n\nDeploy it using the block below.\n\n```hcl\nmodule \"ecs_cluster\" {\n  source  = \"cruxstack/ecs-cluster/aws\"\n  version = \"x.x.x\"\n\n  vpc_id         = \"vpc-00000000000000\"\n  vpc_subnet_ids = [\"subnet-33333333333333\", \"subnet-44444444444444444\", \"subnet-55555555555555555\"]\n}\n```\n\n## Inputs\n\nIn addition to the variables documented below, this module includes several\nother optional variables (e.g., `name`, `tags`, etc.) provided by the\n`cloudposse/label/null` module. Please refer to its [documentation](https://registry.terraform.io/modules/cloudposse/label/null/latest)\nfor more details on these variables.\n\n| Name                        | Description                                                           | Type           | Default         | Required |\n|-----------------------------|-----------------------------------------------------------------------|----------------|-----------------|:--------:|\n| `self_hosted`               | Enable self-hosted nodes                                              | `bool`         | `false`         |    no    |\n| `autoscale_count_range`     | Autoscale range for spot and on-demand (format \"0-3\")                 | `object`       | `{}`            |    no    |\n| `instance_sizes`            | List of instance sizes for the cluster                                | `list(string)` | `[\"m5d.large\"]` |    no    |\n| `vpc_id`                    | ID of the VPC for the resources                                       | `string`       | n/a             |   yes    |\n| `vpc_subnet_ids`            | IDs of the subnets in the VPC for the resources                       | `list(string)` | n/a             |   yes    |\n| `vpc_security_groups`       | Additional security group IDs for the instances                       | `list(string)` | `[]`            |    no    |\n| `log_retention`             | Log retention in days                                                 | `number`       | `30`            |    no    |\n| `aws_account_id`            | AWS account ID                                                        | `string`       | `\"\"`            |    no    |\n| `aws_region_name`           | AWS region name                                                       | `string`       | `\"\"`            |    no    |\n| `aws_kv_namespace`          | AWS Key-Value namespace                                               | `string`       | `null`          |    no    |\n| `instance_userdata_scripts` | Additional user data scripts for instances                            | `list(string)` | `[]`            |    no    |\n| `collected_metrics`         | Configuration of the cluster and instance metrics collection settings | `object`       | `{}`            |    no    |\n| `iam_policy_arns`           | IAM policy ARNs to attach                                             | `list(string)` | `[]`            |    no    |\n\n### Outputs\n\n| Name                  | Description                              |\n|-----------------------|------------------------------------------|\n| `security_group_id`   | Security group ID for the ECS cluster.   |\n| `security_group_name` | Security group name for the ECS cluster. |\n\n## Contributing\n\nWe welcome contributions to this project. For information on setting up a\ndevelopment environment and how to make a contribution, see [CONTRIBUTING](./CONTRIBUTING.md)\ndocumentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcruxstack%2Fterraform-aws-ecs-cluster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcruxstack%2Fterraform-aws-ecs-cluster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcruxstack%2Fterraform-aws-ecs-cluster/lists"}