{"id":30339833,"url":"https://github.com/wearetechnative/terraform-aws-ecs","last_synced_at":"2026-02-09T07:07:22.931Z","repository":{"id":287259905,"uuid":"709334498","full_name":"wearetechnative/terraform-aws-ecs","owner":"wearetechnative","description":"Terraform module to provision an ECS cluster, with fargate, service and ALB","archived":false,"fork":false,"pushed_at":"2025-05-15T09:14:05.000Z","size":252,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-15T09:40:43.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wearetechnative.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-24T14:06:10.000Z","updated_at":"2025-05-15T09:14:08.000Z","dependencies_parsed_at":"2025-04-10T20:36:29.597Z","dependency_job_id":"e25596b1-3373-43d2-8e25-fe91dff5803c","html_url":"https://github.com/wearetechnative/terraform-aws-ecs","commit_stats":null,"previous_names":["wearetechnative/terraform-aws-ecs"],"tags_count":0,"template":false,"template_full_name":"TechNative-B-V/terraform-aws-module-template","purl":"pkg:github/wearetechnative/terraform-aws-ecs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-ecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-ecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-ecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-ecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wearetechnative","download_url":"https://codeload.github.com/wearetechnative/terraform-aws-ecs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-ecs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270961764,"owners_count":24675915,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-18T07:32:20.125Z","updated_at":"2025-08-18T07:33:10.847Z","avatar_url":"https://github.com/wearetechnative.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform AWS ECS ![](https://img.shields.io/github/actions/workflow/status/wearetechnative/terraform-aws-ecs/tflint.yaml?style=plastic)\n\n\u003c!-- SHIELDS --\u003e\n\nThis module implements an ecs cluster.\n\n[![](we-are-technative.png)](https://www.technative.nl)\n\n## How does it work\n\n### First use after you clone this repository or when .pre-commit-config.yaml is updated\n\nRun `pre-commit install` to install any guardrails implemented using pre-commit.\n\nSee [pre-commit installation](https://pre-commit.com/#install) on how to install pre-commit.\n\n\n## Usage\n\nTo use this module ...\n\n```hcl\n{\n  some_conf = \"might need explanation\"\n}\n````\n\u003c!-- BEGIN_TERRAFORM_DOMAINS --\u003e\n## Domain: ecs_service\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.1.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e=4.18.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e=4.18.0 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_autoscaling\"\u003e\u003c/a\u003e [autoscaling](#module\\_autoscaling) | ./autoscaling | n/a |\n| \u003ca name=\"module_dns_lambda\"\u003e\u003c/a\u003e [dns\\_lambda](#module\\_dns\\_lambda) | ./fargate_dns_lambda | n/a |\n| \u003ca name=\"module_task_definition\"\u003e\u003c/a\u003e [task\\_definition](#module\\_task\\_definition) | ../ecs_task_definition | n/a |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_ecs_service.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_service) | resource |\n| [aws_service_discovery_service.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/service_discovery_service) | resource |\n| [aws_arn.ecs_cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) | data source |\n| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_capacity_provider_name\"\u003e\u003c/a\u003e [capacity\\_provider\\_name](#input\\_capacity\\_provider\\_name) | Capacity provider name which is always required if var.scheduling\\_strategy is set to REPLICA. | `string` | n/a | yes |\n| \u003ca name=\"input_cloudwatch_group_name\"\u003e\u003c/a\u003e [cloudwatch\\_group\\_name](#input\\_cloudwatch\\_group\\_name) | Cloudwatch log group name. | `string` | n/a | yes |\n| \u003ca name=\"input_container_name\"\u003e\u003c/a\u003e [container\\_name](#input\\_container\\_name) | Unique name for the container. | `string` | `\"application\"` | no |\n| \u003ca name=\"input_desired_count\"\u003e\u003c/a\u003e [desired\\_count](#input\\_desired\\_count) | Desired count of instances to start. | `number` | `0` | no |\n| \u003ca name=\"input_discovery_service_namespace_id\"\u003e\u003c/a\u003e [discovery\\_service\\_namespace\\_id](#input\\_discovery\\_service\\_namespace\\_id) | Namespace ID of discovery service. The service will have the same name as the var.name value. Requires the use of Fargate and will provide A records only.\u003cbr\u003eWARNING: Enabling this attribute on an existing ecs\\_service will not have any effect. Make sure you replace the service when you do so. | `string` | `null` | no |\n| \u003ca name=\"input_disovery_service_name_override\"\u003e\u003c/a\u003e [disovery\\_service\\_name\\_override](#input\\_disovery\\_service\\_name\\_override) | If var.discovery\\_service\\_namespace\\_id is set then the servicename is equal to the application name if this value is not set. Otherwise this value prevails. | `string` | `null` | no |\n| \u003ca name=\"input_docker_image_tag\"\u003e\u003c/a\u003e [docker\\_image\\_tag](#input\\_docker\\_image\\_tag) | Docker image tag. | `string` | n/a | yes |\n| \u003ca name=\"input_docker_image_url\"\u003e\u003c/a\u003e [docker\\_image\\_url](#input\\_docker\\_image\\_url) | Docker image URL without the tag component. | `string` | n/a | yes |\n| \u003ca name=\"input_ecs_cluster_arn\"\u003e\u003c/a\u003e [ecs\\_cluster\\_arn](#input\\_ecs\\_cluster\\_arn) | ECS cluster ARN to attach service to. | `string` | n/a | yes |\n| \u003ca name=\"input_execution_role_arn\"\u003e\u003c/a\u003e [execution\\_role\\_arn](#input\\_execution\\_role\\_arn) | ARN of the execution role responsible for starting the container. Requires access to ECR and secrets (if used). | `string` | `null` | no |\n| \u003ca name=\"input_extra_container_def_string\"\u003e\u003c/a\u003e [extra\\_container\\_def\\_string](#input\\_extra\\_container\\_def\\_string) | n/a | `string` | `\"\"` | no |\n| \u003ca name=\"input_fargate_architecture\"\u003e\u003c/a\u003e [fargate\\_architecture](#input\\_fargate\\_architecture) | Fargate architecture, defaults to X86\\_64. Can also be ARM64. | `string` | `\"X86_64\"` | no |\n| \u003ca name=\"input_fargate_assign_public_ip\"\u003e\u003c/a\u003e [fargate\\_assign\\_public\\_ip](#input\\_fargate\\_assign\\_public\\_ip) | Assign public IP if Fargate is used. | `bool` | `false` | no |\n| \u003ca name=\"input_force_new_deployment\"\u003e\u003c/a\u003e [force\\_new\\_deployment](#input\\_force\\_new\\_deployment) | Apply any changes immediatly if a decision can be made. Recommended for testing environments but not for production. | `bool` | n/a | yes |\n| \u003ca name=\"input_healthcheck_command\"\u003e\u003c/a\u003e [healthcheck\\_command](#input\\_healthcheck\\_command) | If set then will use a command to check the container health. | `string` | `null` | no |\n| \u003ca name=\"input_healthcheck_grace_period\"\u003e\u003c/a\u003e [healthcheck\\_grace\\_period](#input\\_healthcheck\\_grace\\_period) | Number of seconds to ignore failing tasks. This is needed for containers that take a long time to start and respond to healthchecks. | `number` | `0` | no |\n| \u003ca name=\"input_hosted_zone_id\"\u003e\u003c/a\u003e [hosted\\_zone\\_id](#input\\_hosted\\_zone\\_id) | Optionally set hosted zone ID to maintain a DNS record for the Fargate pod. Requires the use of fargate and will only work effectively if only one task is used. | `string` | `null` | no |\n| \u003ca name=\"input_kms_key_arn\"\u003e\u003c/a\u003e [kms\\_key\\_arn](#input\\_kms\\_key\\_arn) | KMS key for at rest encryption purposes. | `string` | n/a | yes |\n| \u003ca name=\"input_linux_capabilities\"\u003e\u003c/a\u003e [linux\\_capabilities](#input\\_linux\\_capabilities) | Add additional capabilities to allow kernel access for e.g. OpenVPN servers. Requires EC2 launch, will not work with Fargate. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_linux_expose_devices\"\u003e\u003c/a\u003e [linux\\_expose\\_devices](#input\\_linux\\_expose\\_devices) | Expose certain kernel devices that are generally hidden to support e.g. OpenVPN servers. Requires EC2 launch, will not work with Fargate. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_load_balancer_config\"\u003e\u003c/a\u003e [load\\_balancer\\_config](#input\\_load\\_balancer\\_config) | Load balancer configuration for target groups. Container\\_name is optional and will be overwritten by var.name if not specified. | \u003cpre\u003emap(object({\u003cbr\u003e    target_group_arn = string\u003cbr\u003e    container_port = number\u003cbr\u003e    container_name = string\u003cbr\u003e  }))\u003c/pre\u003e | `{}` | no |\n| \u003ca name=\"input_max_number_of_tasks\"\u003e\u003c/a\u003e [max\\_number\\_of\\_tasks](#input\\_max\\_number\\_of\\_tasks) | Initial task amount is set to 0. Set to \u003e1 for autoscaling and use this value as a maximum. Use 0 or 1 to disable autoscaling and handle the amount of pods in the web console. | `number` | n/a | yes |\n| \u003ca name=\"input_min_number_of_tasks\"\u003e\u003c/a\u003e [min\\_number\\_of\\_tasks](#input\\_min\\_number\\_of\\_tasks) | Initial task amount is set to 0. | `number` | `0` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Unique name for the service within the ECS cluster. | `string` | n/a | yes |\n| \u003ca name=\"input_scaling_down_cooldown\"\u003e\u003c/a\u003e [scaling\\_down\\_cooldown](#input\\_scaling\\_down\\_cooldown) | Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start when scaling down (agressiveness) | `number` | `900` | no |\n| \u003ca name=\"input_scaling_down_high\"\u003e\u003c/a\u003e [scaling\\_down\\_high](#input\\_scaling\\_down\\_high) | Number of tasks to scale down by when upper bound is reached | `number` | `-3` | no |\n| \u003ca name=\"input_scaling_down_low\"\u003e\u003c/a\u003e [scaling\\_down\\_low](#input\\_scaling\\_down\\_low) | Number of tasks to scale down by when lower bound is reached | `number` | `-1` | no |\n| \u003ca name=\"input_scaling_up_cooldown\"\u003e\u003c/a\u003e [scaling\\_up\\_cooldown](#input\\_scaling\\_up\\_cooldown) | Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start when scaling up (agressiveness) | `number` | `300` | no |\n| \u003ca name=\"input_scaling_up_high\"\u003e\u003c/a\u003e [scaling\\_up\\_high](#input\\_scaling\\_up\\_high) | Number of tasks to scale up by when upper bound is reached | `number` | `5` | no |\n| \u003ca name=\"input_scaling_up_low\"\u003e\u003c/a\u003e [scaling\\_up\\_low](#input\\_scaling\\_up\\_low) | Number of tasks to scale up by when lower bound is reached | `number` | `3` | no |\n| \u003ca name=\"input_scheduling_strategy\"\u003e\u003c/a\u003e [scheduling\\_strategy](#input\\_scheduling\\_strategy) | ECS scheduling strategy to use. | `string` | `\"REPLICA\"` | no |\n| \u003ca name=\"input_security_group_ids\"\u003e\u003c/a\u003e [security\\_group\\_ids](#input\\_security\\_group\\_ids) | Security groups to assign. | `list(string)` | n/a | yes |\n| \u003ca name=\"input_sqs_dlq_arn\"\u003e\u003c/a\u003e [sqs\\_dlq\\_arn](#input\\_sqs\\_dlq\\_arn) | SQS DLQ Arn to send failed infra events to. Currently only used for the DNS Fargate Lambda. | `string` | n/a | yes |\n| \u003ca name=\"input_subnet_ids\"\u003e\u003c/a\u003e [subnet\\_ids](#input\\_subnet\\_ids) | Private subnets with a NAT gateway to route traffic for tasks. | `list(string)` | n/a | yes |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Additional tags to be added to resources. | `map(string)` | `{}` | no |\n| \u003ca name=\"input_task_cpu_units\"\u003e\u003c/a\u003e [task\\_cpu\\_units](#input\\_task\\_cpu\\_units) | Required CPU units for the task (and Fargate instance). | `number` | n/a | yes |\n| \u003ca name=\"input_task_definition_command\"\u003e\u003c/a\u003e [task\\_definition\\_command](#input\\_task\\_definition\\_command) | overriding docker command, skip to use image default command. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_task_definition_environment_variables\"\u003e\u003c/a\u003e [task\\_definition\\_environment\\_variables](#input\\_task\\_definition\\_environment\\_variables) | Map of nonsecret environment variables with the value of an SSM parameter where this value is stored. | \u003cpre\u003elist(object({\u003cbr\u003e    name  = string\u003cbr\u003e    value = string\u003cbr\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_task_definition_secrets\"\u003e\u003c/a\u003e [task\\_definition\\_secrets](#input\\_task\\_definition\\_secrets) | Map of secret environment variables with the value of an SSM parameter where this value is stored. | \u003cpre\u003elist(object({\u003cbr\u003e    name      = string\u003cbr\u003e    valueFrom = string\u003cbr\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_task_memory_units\"\u003e\u003c/a\u003e [task\\_memory\\_units](#input\\_task\\_memory\\_units) | Required memory units for the task (and Fargate instance). | `number` | n/a | yes |\n| \u003ca name=\"input_task_role_arn\"\u003e\u003c/a\u003e [task\\_role\\_arn](#input\\_task\\_role\\_arn) | ARN of the role which the container software can use to get privileges. One policy for execution-command will be assigned to this task\\_role. | `string` | n/a | yes |\n| \u003ca name=\"input_threshold_cpu_high\"\u003e\u003c/a\u003e [threshold\\_cpu\\_high](#input\\_threshold\\_cpu\\_high) | Theshold for cpu high alarm which will trigger upscaling | `number` | `50` | no |\n| \u003ca name=\"input_threshold_cpu_low\"\u003e\u003c/a\u003e [threshold\\_cpu\\_low](#input\\_threshold\\_cpu\\_low) | Theshold for cpu low alarm which will trigger downscaling | `number` | `20` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_ecs_service_arn\"\u003e\u003c/a\u003e [ecs\\_service\\_arn](#output\\_ecs\\_service\\_arn) | n/a |\n| \u003ca name=\"output_ecs_task_definition_arn\"\u003e\u003c/a\u003e [ecs\\_task\\_definition\\_arn](#output\\_ecs\\_task\\_definition\\_arn) | n/a |\n\n## Domain: ecs_cluster\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.1.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e=4.18.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e=4.18.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_ecs_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster) | resource |\n| [aws_iam_policy_document.instance_ecs_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_container_insights\"\u003e\u003c/a\u003e [container\\_insights](#input\\_container\\_insights) | Enable container insights. | `string` | `\"enabled\"` | no |\n| \u003ca name=\"input_kms_key_arn\"\u003e\u003c/a\u003e [kms\\_key\\_arn](#input\\_kms\\_key\\_arn) | KMS key arn for CI encryption. | `string` | n/a | yes |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Unique name for ECS cluster powered by Fargate. | `string` | n/a | yes |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Additional tags to be added to resources. | `map(string)` | `{}` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_ec2_instance_role_ecs_policy\"\u003e\u003c/a\u003e [ec2\\_instance\\_role\\_ecs\\_policy](#output\\_ec2\\_instance\\_role\\_ecs\\_policy) | n/a |\n| \u003ca name=\"output_ecs_cluster_arn\"\u003e\u003c/a\u003e [ecs\\_cluster\\_arn](#output\\_ecs\\_cluster\\_arn) | n/a |\n| \u003ca name=\"output_ecs_cluster_name\"\u003e\u003c/a\u003e [ecs\\_cluster\\_name](#output\\_ecs\\_cluster\\_name) | n/a |\n\n## Domain: ecs_fargate_capacity_provider\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.1.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e=4.18.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e=4.18.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_ecs_cluster_capacity_providers.fargate](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_cluster_capacity_providers) | resource |\n| [aws_arn.ecs_cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_ecs_cluster_arn\"\u003e\u003c/a\u003e [ecs\\_cluster\\_arn](#input\\_ecs\\_cluster\\_arn) | ARN of an existing ECS cluster where the capacity provider must be assigned to. This is a requirement in order to use a capacity provider in a service. | `string` | n/a | yes |\n| \u003ca name=\"input_use_spot\"\u003e\u003c/a\u003e [use\\_spot](#input\\_use\\_spot) | Use spot instances instead of continuous instances. | `bool` | `false` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_capacity_provider_name\"\u003e\u003c/a\u003e [capacity\\_provider\\_name](#output\\_capacity\\_provider\\_name) | n/a |\n\n## Domain: ecs_scheduled_task\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.1.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e=4.18.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e=4.18.0 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_eventbridge_role\"\u003e\u003c/a\u003e [eventbridge\\_role](#module\\_eventbridge\\_role) | git@github.com:TechNative-B-V/modules-aws.git//identity_and_access_management/iam_role | e3c1a1f94ffa77c5f787d44ec98e2028c824220a |\n| \u003ca name=\"module_task_definition\"\u003e\u003c/a\u003e [task\\_definition](#module\\_task\\_definition) | ../ecs_task_definition | n/a |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_cloudwatch_event_target.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target) | resource |\n| [aws_arn.ecs_cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) | data source |\n| [aws_iam_policy_document.passrole](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |\n| [aws_iam_policy_document.runtask](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_cloudwatch_group_name\"\u003e\u003c/a\u003e [cloudwatch\\_group\\_name](#input\\_cloudwatch\\_group\\_name) | Cloudwatch log group name. | `string` | n/a | yes |\n| \u003ca name=\"input_docker_image_tag\"\u003e\u003c/a\u003e [docker\\_image\\_tag](#input\\_docker\\_image\\_tag) | Docker image tag. | `string` | n/a | yes |\n| \u003ca name=\"input_docker_image_url\"\u003e\u003c/a\u003e [docker\\_image\\_url](#input\\_docker\\_image\\_url) | Docker image URL without the tag component. | `string` | n/a | yes |\n| \u003ca name=\"input_ecs_cluster_arn\"\u003e\u003c/a\u003e [ecs\\_cluster\\_arn](#input\\_ecs\\_cluster\\_arn) | ECS cluster ARN to attach service to. | `string` | n/a | yes |\n| \u003ca name=\"input_eventbridge_event_rule_name\"\u003e\u003c/a\u003e [eventbridge\\_event\\_rule\\_name](#input\\_eventbridge\\_event\\_rule\\_name) | Eventbridge rule to write this container to. | `string` | `null` | no |\n| \u003ca name=\"input_execution_role_arn\"\u003e\u003c/a\u003e [execution\\_role\\_arn](#input\\_execution\\_role\\_arn) | ARN of the execution role responsible for starting the container. Requires access to ECR and secrets (if used). | `string` | `null` | no |\n| \u003ca name=\"input_fargate_architecture\"\u003e\u003c/a\u003e [fargate\\_architecture](#input\\_fargate\\_architecture) | Fargate architecture, defaults to X86\\_64. Can also be ARM64. | `string` | `\"X86_64\"` | no |\n| \u003ca name=\"input_fargate_assign_public_ip\"\u003e\u003c/a\u003e [fargate\\_assign\\_public\\_ip](#input\\_fargate\\_assign\\_public\\_ip) | Assign public IP if Fargate is used. | `bool` | `false` | no |\n| \u003ca name=\"input_healthcheck_command\"\u003e\u003c/a\u003e [healthcheck\\_command](#input\\_healthcheck\\_command) | If set then will use a command to check the container health. | `string` | `null` | no |\n| \u003ca name=\"input_linux_capabilities\"\u003e\u003c/a\u003e [linux\\_capabilities](#input\\_linux\\_capabilities) | Add additional capabilities to allow kernel access for e.g. OpenVPN servers. Requires EC2 launch, will not work with Fargate. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_linux_expose_devices\"\u003e\u003c/a\u003e [linux\\_expose\\_devices](#input\\_linux\\_expose\\_devices) | Expose certain kernel devices that are generally hidden to support e.g. OpenVPN servers. Requires EC2 launch, will not work with Fargate. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Unique name for the service within the ECS cluster. | `string` | n/a | yes |\n| \u003ca name=\"input_security_group_ids\"\u003e\u003c/a\u003e [security\\_group\\_ids](#input\\_security\\_group\\_ids) | Security groups to assign. | `list(string)` | n/a | yes |\n| \u003ca name=\"input_sqs_dlq_arn\"\u003e\u003c/a\u003e [sqs\\_dlq\\_arn](#input\\_sqs\\_dlq\\_arn) | SQS DLQ Arn to send failed infra events to. Currently only used for the DNS Fargate Lambda. | `string` | n/a | yes |\n| \u003ca name=\"input_subnet_ids\"\u003e\u003c/a\u003e [subnet\\_ids](#input\\_subnet\\_ids) | Private subnets with a NAT gateway to route traffic for tasks. | `list(string)` | n/a | yes |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Additional tags to be added to resources. | `map(string)` | `{}` | no |\n| \u003ca name=\"input_task_cpu_units\"\u003e\u003c/a\u003e [task\\_cpu\\_units](#input\\_task\\_cpu\\_units) | Required CPU units for the task (and Fargate instance). | `number` | n/a | yes |\n| \u003ca name=\"input_task_definition_command\"\u003e\u003c/a\u003e [task\\_definition\\_command](#input\\_task\\_definition\\_command) | overriding docker command, skip to use image default command. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_task_definition_environment_variables\"\u003e\u003c/a\u003e [task\\_definition\\_environment\\_variables](#input\\_task\\_definition\\_environment\\_variables) | Map of nonsecret environment variables with the value of an SSM parameter where this value is stored. | \u003cpre\u003elist(object({\u003cbr\u003e    name  = string\u003cbr\u003e    value = string\u003cbr\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_task_definition_secrets\"\u003e\u003c/a\u003e [task\\_definition\\_secrets](#input\\_task\\_definition\\_secrets) | Map of secret environment variables with the value of an SSM parameter where this value is stored. | \u003cpre\u003elist(object({\u003cbr\u003e    name      = string\u003cbr\u003e    valueFrom = string\u003cbr\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_task_memory_units\"\u003e\u003c/a\u003e [task\\_memory\\_units](#input\\_task\\_memory\\_units) | Required memory units for the task (and Fargate instance). | `number` | n/a | yes |\n| \u003ca name=\"input_task_role_arn\"\u003e\u003c/a\u003e [task\\_role\\_arn](#input\\_task\\_role\\_arn) | ARN of the role which the container software can use to get privileges. One policy for execution-command will be assigned to this task\\_role. | `string` | n/a | yes |\n\n## Outputs\n\nNo outputs.\n\n## Domain: ecs_task_definition\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.1.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e=4.18.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e=4.18.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_ecs_task_definition.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition) | resource |\n| [aws_iam_policy.ssm_session](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |\n| [aws_iam_role_policy_attachment.ssm_session](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_iam_policy_document.ssm_session](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |\n| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_cloudwatch_group_name\"\u003e\u003c/a\u003e [cloudwatch\\_group\\_name](#input\\_cloudwatch\\_group\\_name) | Cloudwatch log group name. | `string` | n/a | yes |\n| \u003ca name=\"input_command\"\u003e\u003c/a\u003e [command](#input\\_command) | If set then will use a command to override the image command. Format as list with command arguments. E.g. [\"bundle\", \"exec\", \"rails\", \"s\"] | `list(string)` | `[]` | no |\n| \u003ca name=\"input_container_name\"\u003e\u003c/a\u003e [container\\_name](#input\\_container\\_name) | Unique name for the task container. | `string` | `\"application\"` | no |\n| \u003ca name=\"input_docker_image_tag\"\u003e\u003c/a\u003e [docker\\_image\\_tag](#input\\_docker\\_image\\_tag) | Docker image tag. | `string` | n/a | yes |\n| \u003ca name=\"input_docker_image_url\"\u003e\u003c/a\u003e [docker\\_image\\_url](#input\\_docker\\_image\\_url) | Docker image URL without the tag component. | `string` | n/a | yes |\n| \u003ca name=\"input_execution_role_arn\"\u003e\u003c/a\u003e [execution\\_role\\_arn](#input\\_execution\\_role\\_arn) | ARN of the execution role responsible for starting the container. Requires access to ECR and secrets (if used). | `string` | `null` | no |\n| \u003ca name=\"input_extra_container_def_string\"\u003e\u003c/a\u003e [extra\\_container\\_def\\_string](#input\\_extra\\_container\\_def\\_string) | n/a | `string` | `\"\"` | no |\n| \u003ca name=\"input_fargate_architecture\"\u003e\u003c/a\u003e [fargate\\_architecture](#input\\_fargate\\_architecture) | Fargate architecture, defaults to X86\\_64. Can also be ARM64. | `string` | `\"X86_64\"` | no |\n| \u003ca name=\"input_healthcheck_command\"\u003e\u003c/a\u003e [healthcheck\\_command](#input\\_healthcheck\\_command) | If set then will use a command to check the container health. | `string` | `null` | no |\n| \u003ca name=\"input_linux_capabilities\"\u003e\u003c/a\u003e [linux\\_capabilities](#input\\_linux\\_capabilities) | Add additional capabilities to allow kernel access for e.g. OpenVPN servers. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_linux_expose_devices\"\u003e\u003c/a\u003e [linux\\_expose\\_devices](#input\\_linux\\_expose\\_devices) | Expose certain kernel devices that are generally hidden to support e.g. OpenVPN servers. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_load_balancer_config\"\u003e\u003c/a\u003e [load\\_balancer\\_config](#input\\_load\\_balancer\\_config) | Load balancer configuration for target groups. Container\\_name is optional and will be overwritten by var.name if not specified. | \u003cpre\u003emap(object({\u003cbr\u003e    target_group_arn = string\u003cbr\u003e    container_port = number\u003cbr\u003e    container_name = string\u003cbr\u003e  }))\u003c/pre\u003e | `{}` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Unique name for the task definition. | `string` | n/a | yes |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Additional tags to be added to resources. | `map(string)` | `{}` | no |\n| \u003ca name=\"input_task_cpu_units\"\u003e\u003c/a\u003e [task\\_cpu\\_units](#input\\_task\\_cpu\\_units) | Required CPU units for the task (and Fargate instance). | `number` | n/a | yes |\n| \u003ca name=\"input_task_definition_environment_variables\"\u003e\u003c/a\u003e [task\\_definition\\_environment\\_variables](#input\\_task\\_definition\\_environment\\_variables) | Map of nonsecret environment variables with the value of an SSM parameter where this value is stored. | \u003cpre\u003elist(object({\u003cbr\u003e    name  = string\u003cbr\u003e    value = string\u003cbr\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_task_definition_secrets\"\u003e\u003c/a\u003e [task\\_definition\\_secrets](#input\\_task\\_definition\\_secrets) | Map of secret environment variables with the value of an SSM parameter where this value is stored. | \u003cpre\u003elist(object({\u003cbr\u003e    name      = string\u003cbr\u003e    valueFrom = string\u003cbr\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_task_memory_units\"\u003e\u003c/a\u003e [task\\_memory\\_units](#input\\_task\\_memory\\_units) | Required memory units for the task (and Fargate instance). | `number` | n/a | yes |\n| \u003ca name=\"input_task_role_arn\"\u003e\u003c/a\u003e [task\\_role\\_arn](#input\\_task\\_role\\_arn) | ARN of the role which the container software can use to get privileges. One policy for execution-command will be assigned to this task\\_role. | `string` | n/a | yes |\n| \u003ca name=\"input_use_fargate\"\u003e\u003c/a\u003e [use\\_fargate](#input\\_use\\_fargate) | Enable Fargate containers. | `bool` | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_task_definition_arn\"\u003e\u003c/a\u003e [task\\_definition\\_arn](#output\\_task\\_definition\\_arn) | n/a |\n\n## Domain: ecs_account_settings\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.1.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e=4.18.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e=4.18.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_ecs_account_setting_default.aws_vpc_trunking](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_account_setting_default) | resource |\n| [aws_ecs_account_setting_default.container_insights](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_account_setting_default) | resource |\n| [aws_ecs_account_setting_default.container_instance_long_arn_format](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_account_setting_default) | resource |\n| [aws_ecs_account_setting_default.service_long_arn_format](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_account_setting_default) | resource |\n| [aws_ecs_account_setting_default.task_long_arn_format](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_account_setting_default) | resource |\n\n## Inputs\n\nNo inputs.\n\n## Outputs\n\nNo outputs.\n\n## Domain: ecs_default_service_linked_role\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.1.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e=4.18.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e=4.18.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_iam_service_linked_role.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_service_linked_role) | resource |\n\n## Inputs\n\nNo inputs.\n\n## Outputs\n\nNo outputs.\n\n\u003c!-- END_TERRAFORM_DOMAINS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearetechnative%2Fterraform-aws-ecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwearetechnative%2Fterraform-aws-ecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearetechnative%2Fterraform-aws-ecs/lists"}