{"id":19586315,"url":"https://github.com/tbobm/terraform-aws-ecs","last_synced_at":"2025-04-27T12:31:20.506Z","repository":{"id":37028367,"uuid":"419733615","full_name":"tbobm/terraform-aws-ecs","owner":"tbobm","description":"Terraform module to deploy ECS tasks with addons. Bootstrap an ECS service exposed with an Application Load Balancer, ECR, simple IAM Policy and generate CI credentials.","archived":false,"fork":false,"pushed_at":"2024-02-07T16:55:10.000Z","size":51,"stargazers_count":6,"open_issues_count":12,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-02-07T17:58:57.126Z","etag":null,"topics":["aws","cloud","containers","ecr","ecs","fargate","iac","terraform","terraform-module","terraform-modules"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/tbobm/ecs/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/tbobm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2021-10-21T13:26:07.000Z","updated_at":"2022-05-26T02:51:27.000Z","dependencies_parsed_at":"2024-02-07T17:54:28.287Z","dependency_job_id":"d6900f96-c2c7-44c9-b6b8-de5a0114fd40","html_url":"https://github.com/tbobm/terraform-aws-ecs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fterraform-aws-ecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fterraform-aws-ecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fterraform-aws-ecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbobm%2Fterraform-aws-ecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbobm","download_url":"https://codeload.github.com/tbobm/terraform-aws-ecs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224069489,"owners_count":17250456,"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","cloud","containers","ecr","ecs","fargate","iac","terraform","terraform-module","terraform-modules"],"created_at":"2024-11-11T07:59:23.389Z","updated_at":"2024-11-11T07:59:25.310Z","avatar_url":"https://github.com/tbobm.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform ECS Module\n\n[![terraform-aws-ecs](https://github.com/tbobm/terraform-aws-ecs/actions/workflows/terraform.yml/badge.svg)](https://github.com/tbobm/terraform-aws-ecs/actions/workflows/terraform.yml)\n\nSimple Terraform module to deploy an ECS task using AWS Fargate including addons (Load Balancer, ECR, CI credentials)\n\n## Example usage\n\n### Bootstrapped setup\n\n```hcl\nmodule \"ecr\" {\n  source  = \"tbobm/ecs/aws\"\n  # version = \"\" use latest version\n\n  container = {\n    image = \"particuleio/helloworld\"\n  }\n\n  networking = {\n    vpc_id = \"vpc-xxxxxxxx\"\n    subnet_ids = [\"subnet-xxxxxxxx\"]\n  }\n}\n```\n\n### Restricted setup\n\nSimply setup an ECS Cluster and Service based on `container.image`.\n\n```hcl\nmodule \"ecr\" {\n  source  = \"tbobm/ecs/aws\"\n  # version = \"\" use latest version\n\n  container = {\n    image = \"particuleio/helloworld\"\n  }\n\n  networking = {\n    vpc_id = \"vpc-xxxxxxxx\"\n    subnet_ids = [\"subnet-xxxxxxxx\"]\n  }\n  addons = {\n    iam = {\n      enable = false\n    }\n    ecr = {\n      enable = false\n    }\n    loadbalancer = {\n      enable = false\n    }\n  }\n}\n```\n\n### Use an external ECS Task definition\n\n```hcl\nmodule \"ecr\" {\n  source  = \"tbobm/ecs/aws\"\n  # version = \"\" use latest version\n\n  ecs_values = {\n    ecs_task_arn = \"arn:aws:ecs:\u003cregion\u003e:\u003caws_account_id\u003e:task-definition/\u003ctask_family\u003e:1\"\n  }\n  networking = {\n    vpc_id = \"vpc-xxxxxxxx\"\n    subnet_ids = [\"subnet-xxxxxxxx\"]\n  }\n}\n```\n\n## Doc generation\n\nCode formatting and documentation for variables and outputs is generated using\n[pre-commit-terraform\nhooks](https://github.com/antonbabenko/pre-commit-terraform) which uses\n[terraform-docs](https://github.com/segmentio/terraform-docs).\n\nFollow [these\ninstructions](https://github.com/antonbabenko/pre-commit-terraform#how-to-install)\nto install pre-commit locally.\n\nAnd install `terraform-docs` with `go get github.com/segmentio/terraform-docs`\nor `brew install terraform-docs`.\n\n## Contributing\n\nReport issues/questions/feature requests on in the\n[issues](https://github.com/particuleio/terraform-kubernetes-addons/issues/new)\nsection.\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | ~\u003e 3.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | ~\u003e 3.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_ecr_repository.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository) | resource |\n| [aws_ecr_repository_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository_policy) | resource |\n| [aws_ecs_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster) | resource |\n| [aws_ecs_service.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_service) | resource |\n| [aws_ecs_task_definition.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition) | resource |\n| [aws_iam_access_key.publisher](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_access_key) | resource |\n| [aws_iam_role.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |\n| [aws_iam_role_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |\n| [aws_iam_user.publisher](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_user) | resource |\n| [aws_iam_user_policy.publisher](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_user_policy) | resource |\n| [aws_lb.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb) | resource |\n| [aws_lb_listener.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener) | resource |\n| [aws_lb_target_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_addons\"\u003e\u003c/a\u003e [addons](#input\\_addons) | Configuration of each addon that can be toggles on and off | `any` | `{}` | no |\n| \u003ca name=\"input_aws_region\"\u003e\u003c/a\u003e [aws\\_region](#input\\_aws\\_region) | AWS region | `string` | `\"eu-west-3\"` | no |\n| \u003ca name=\"input_container\"\u003e\u003c/a\u003e [container](#input\\_container) | Container configuration to deploy | `any` | `{}` | no |\n| \u003ca name=\"input_ecr_values\"\u003e\u003c/a\u003e [ecr\\_values](#input\\_ecr\\_values) | AWS ECR configuration | `any` | `{}` | no |\n| \u003ca name=\"input_ecs_values\"\u003e\u003c/a\u003e [ecs\\_values](#input\\_ecs\\_values) | AWS ECS configuration | `any` | `{}` | no |\n| \u003ca name=\"input_lb_values\"\u003e\u003c/a\u003e [lb\\_values](#input\\_lb\\_values) | AWS Load Balancer configuration | `any` | `{}` | no |\n| \u003ca name=\"input_networking\"\u003e\u003c/a\u003e [networking](#input\\_networking) | AWS networking configuration (subnet\\_ids, vpc\\_id) | \u003cpre\u003eobject({\u003cbr\u003e    vpc_id     = string\u003cbr\u003e    subnet_ids = list(string)\u003cbr\u003e  })\u003c/pre\u003e | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_addons\"\u003e\u003c/a\u003e [addons](#output\\_addons) | The Addons configuration |\n| \u003ca name=\"output_app_url\"\u003e\u003c/a\u003e [app\\_url](#output\\_app\\_url) | The public ALB DNS |\n| \u003ca name=\"output_aws_region\"\u003e\u003c/a\u003e [aws\\_region](#output\\_aws\\_region) | The AWS region used |\n| \u003ca name=\"output_container_name\"\u003e\u003c/a\u003e [container\\_name](#output\\_container\\_name) | Container name for the ECS task |\n| \u003ca name=\"output_ecr_repository_name\"\u003e\u003c/a\u003e [ecr\\_repository\\_name](#output\\_ecr\\_repository\\_name) | The ECR repository name |\n| \u003ca name=\"output_ecr_url\"\u003e\u003c/a\u003e [ecr\\_url](#output\\_ecr\\_url) | The ECR repository URL |\n| \u003ca name=\"output_ecs_cluster\"\u003e\u003c/a\u003e [ecs\\_cluster](#output\\_ecs\\_cluster) | The ECS cluster name |\n| \u003ca name=\"output_ecs_service\"\u003e\u003c/a\u003e [ecs\\_service](#output\\_ecs\\_service) | The ECS service name |\n| \u003ca name=\"output_loadbalancer\"\u003e\u003c/a\u003e [loadbalancer](#output\\_loadbalancer) | The AWS Load Balancer resources (`loadbalancer`, `target_group` and `lb_listener`) |\n| \u003ca name=\"output_publisher_access_key\"\u003e\u003c/a\u003e [publisher\\_access\\_key](#output\\_publisher\\_access\\_key) | AWS\\_ACCESS\\_KEY to publish to ECR |\n| \u003ca name=\"output_publisher_secret_key\"\u003e\u003c/a\u003e [publisher\\_secret\\_key](#output\\_publisher\\_secret\\_key) | AWS\\_SECRET\\_ACCESS\\_KEY to upload to the ECR |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbobm%2Fterraform-aws-ecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbobm%2Fterraform-aws-ecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbobm%2Fterraform-aws-ecs/lists"}