An open API service indexing awesome lists of open source software.

https://github.com/geekcell/terraform-aws-ecs-task-definition

Terraform AWS Module for create an ECS Task Definition.
https://github.com/geekcell/terraform-aws-ecs-task-definition

aws ecs fargate task-definition terraform terraform-module

Last synced: 3 months ago
JSON representation

Terraform AWS Module for create an ECS Task Definition.

Awesome Lists containing this project

README

        

[![Geek Cell GmbH](https://raw.githubusercontent.com/geekcell/.github/main/geekcell-github-banner.png)](https://www.geekcell.io/)

### Code Quality
[![License](https://img.shields.io/github/license/geekcell/terraform-aws-ecs-task-definition)](https://github.com/geekcell/terraform-aws-ecs-task-definition/blob/master/LICENSE)
[![GitHub release (latest tag)](https://img.shields.io/github/v/release/geekcell/terraform-aws-ecs-task-definition?logo=github&sort=semver)](https://github.com/geekcell/terraform-aws-ecs-task-definition/releases)
[![Release](https://github.com/geekcell/terraform-aws-ecs-task-definition/actions/workflows/release.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-ecs-task-definition/actions/workflows/release.yaml)
[![Validate](https://github.com/geekcell/terraform-aws-ecs-task-definition/actions/workflows/validate.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-ecs-task-definition/actions/workflows/validate.yaml)
[![Lint](https://github.com/geekcell/terraform-aws-ecs-task-definition/actions/workflows/linter.yaml/badge.svg)](https://github.com/geekcell/terraform-aws-ecs-task-definition/actions/workflows/linter.yaml)

# Terraform AWS ECS Task Definition Module

Terraform module for creating an AWS ECS Task Definition.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [additional\_execute\_role\_policies](#input\_additional\_execute\_role\_policies) | Additional policy ARNs to attach to the execution role. | `list(string)` | `[]` | no |
| [additional\_task\_role\_policies](#input\_additional\_task\_role\_policies) | Additional policy ARNs to attach to the task role. | `list(string)` | `[]` | no |
| [container\_definitions](#input\_container\_definitions) | A list of valid container definitions provided as a valid HCL object list. | `any` | n/a | yes |
| [cpu](#input\_cpu) | Number of CPU units used by the task. | `number` | `1024` | no |
| [cpu\_architecture](#input\_cpu\_architecture) | CPU architecture required by the task. | `string` | `"X86_64"` | no |
| [create\_execution\_role](#input\_create\_execution\_role) | If enabled, will create an execution role and attach the AmazonECSTaskExecutionRolePolicy to it. | `bool` | `true` | no |
| [create\_task\_role](#input\_create\_task\_role) | If enabled, will create a task role. | `bool` | `true` | no |
| [enable\_execute\_command](#input\_enable\_execute\_command) | If enabled, will add the AmazonSSMManagedInstanceCore to the task role. | `bool` | `true` | no |
| [ephemeral\_storage\_size\_in\_gib](#input\_ephemeral\_storage\_size\_in\_gib) | The amount of ephemeral storage (in GiB) to allocate to the task. | `number` | `20` | no |
| [execution\_role\_arn](#input\_execution\_role\_arn) | Execution role ARN to attach to the task. | `string` | `null` | no |
| [execution\_role\_name](#input\_execution\_role\_name) | Name of the execution role to create. | `string` | `null` | no |
| [execution\_role\_name\_prefix](#input\_execution\_role\_name\_prefix) | Whether to prefix the execution role name with the family name. | `bool` | `false` | no |
| [inference\_accelerators](#input\_inference\_accelerators) | List of Elastic Inference accelerators associated with the task. |

list(object({
name = string
type = string
}))
| `[]` | no |
| [memory](#input\_memory) | Amount (in MiB) of memory used by the task. | `number` | `2048` | no |
| [name](#input\_name) | Family of the task definition. | `string` | n/a | yes |
| [network\_mode](#input\_network\_mode) | The network mode to use for the containers in the task. The valid values are bridge, host, awsvpc, and none. If no network mode is specified, the default is bridge. | `string` | `"awsvpc"` | no |
| [operating\_system\_family](#input\_operating\_system\_family) | OS family required by the task. | `string` | `"LINUX"` | no |
| [proxy\_configuration](#input\_proxy\_configuration) | Configuration details for an App Mesh proxy. |
object({
container_name = string
properties = map(any)
type = optional(string, "APPMESH")
})
| `null` | no |
| [requires\_compatibilities](#input\_requires\_compatibilities) | The launch type on which to run your service. The valid values are EC2 and FARGATE. | `list(string)` |
[
"FARGATE"
]
| no |
| [tags](#input\_tags) | Tags to add to the created resources. | `map(any)` | `{}` | no |
| [task\_role\_arn](#input\_task\_role\_arn) | Task role ARN to attach to the task. | `string` | `null` | no |
| [task\_role\_name](#input\_task\_role\_name) | Name of the task role to create. | `string` | `null` | no |
| [task\_role\_name\_prefix](#input\_task\_role\_name\_prefix) | Whether to prefix the task role name with the family name. | `bool` | `false` | no |
| [volumes](#input\_volumes) | A list of volume definitions. |
list(object({
name = string
host_path = string

docker_volume_configuration = optional(object({
autoprovision = bool
driver = string
driver_opts = map(any)
labels = map(any)
scope = string
}))

efs_volume_configuration = optional(object({
file_system_id = string
root_directory = optional(string)
transit_encryption = optional(string)
transit_encryption_port = optional(number)

authorization_config = optional(object({
access_point_id = string
iam = optional(string)
}))
}))
}))
| `[]` | no |

## Outputs

| Name | Description |
|------|-------------|
| [arn](#output\_arn) | The ARN of the task definition. |
| [execution\_role\_arn](#output\_execution\_role\_arn) | The ARN of the IAM role that grants the Amazon ECS container agent permission to make calls to your Amazon ECS container task. |
| [execution\_role\_name](#output\_execution\_role\_name) | The name of the IAM role that grants the Amazon ECS container agent permission to make calls to your Amazon ECS container task. |
| [task\_role\_arn](#output\_task\_role\_arn) | The ARN of the IAM role that allows your Amazon ECS container task to make calls to other AWS services. |
| [task\_role\_name](#output\_task\_role\_name) | The name of the IAM role that allows your Amazon ECS container task to make calls to other AWS services. |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 4.36 |

## Resources

- resource.aws_ecs_task_definition.main (main.tf#6)
- resource.aws_iam_role_policy_attachment.execute_additional (main.tf#113)
- resource.aws_iam_role_policy_attachment.execute_command (main.tf#139)
- resource.aws_iam_role_policy_attachment.task_additional (main.tf#132)