Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/miquido/terraform-ecs-task


https://github.com/miquido/terraform-ecs-task

Last synced: 5 days ago
JSON representation

Awesome Lists containing this project

README

        

[![Miquido][logo]](https://www.miquido.com/)

# miquido-terraform-ecs-task
---
**Terraform Module**

GitLab Repository: https://gitlab.com/miquido/terraform/terraform-ecs-task

## Usage

```hcl
module "main" {
source = "git::ssh://[email protected]/miquido/terraform/terraform-ecs-task.git?ref=master"
...
}
```

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.13 |
| [aws](#requirement\_aws) | ~> 3.0 |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | ~> 3.0 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| [container](#module\_container) | git::https://github.com/cloudposse/terraform-aws-ecs-container-definition | 0.58.1 |
| [label](#module\_label) | git::https://github.com/cloudposse/terraform-terraform-label | 0.8.0 |

## Resources

| Name | Type |
|------|------|
| [aws_cloudwatch_log_group.app](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_ecs_task_definition.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition) | resource |
| [aws_iam_role.execution_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.service_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy.ecs-exec-ssm-secrets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_iam_role_policy.execution-policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_iam_policy_document.ecs-exec-ssm-secrets](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.execution-policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.execution_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.service_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [assign\_public\_ip](#input\_assign\_public\_ip) | n/a | `bool` | `false` | no |
| [cluster\_arn](#input\_cluster\_arn) | n/a | `string` | n/a | yes |
| [container\_cmd](#input\_container\_cmd) | Command that will be run on the task | `list(string)` | `null` | no |
| [container\_cpu](#input\_container\_cpu) | n/a | `number` | n/a | yes |
| [container\_image](#input\_container\_image) | n/a | `string` | n/a | yes |
| [container\_memory](#input\_container\_memory) | n/a | `number` | n/a | yes |
| [container\_tag](#input\_container\_tag) | n/a | `string` | n/a | yes |
| [environment](#input\_environment) | n/a | `string` | n/a | yes |
| [environment\_variables](#input\_environment\_variables) | Environment variables passed to container |

list(object({
name = string
value = string
}))
| `[]` | no |
| [log\_configuration](#input\_log\_configuration) | Log configuration options to send to a custom log driver for the container. For more details, see https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_LogConfiguration.html |
object({
logDriver = string
options = map(string)
secretOptions = list(object({
name = string
valueFrom = string
}))
})
| `null` | no |
| [log\_retention](#input\_log\_retention) | Specifies the number of days you want to retain log events in the specified log group. Option has no effect when custom "log\_configuration" variable is specified. | `number` | `7` | no |
| [name](#input\_name) | n/a | `string` | n/a | yes |
| [project](#input\_project) | n/a | `string` | n/a | yes |
| [region](#input\_region) | n/a | `string` | n/a | yes |
| [secrets](#input\_secrets) | The secrets to pass to the container. This is a list of maps |
list(object({
name = string
valueFrom = string
}))
| `[]` | no |
| [security\_groups](#input\_security\_groups) | n/a | `list(string)` | n/a | yes |
| [subnets](#input\_subnets) | n/a | `list(string)` | n/a | yes |
| [tags](#input\_tags) | n/a | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| [container\_name](#output\_container\_name) | n/a |
| [execution\_role\_arn](#output\_execution\_role\_arn) | n/a |
| [service\_role\_arn](#output\_service\_role\_arn) | n/a |
| [service\_role\_id](#output\_service\_role\_id) | n/a |
| [task\_definition\_arn](#output\_task\_definition\_arn) | n/a |

## Makefile Targets
```text
Available targets:

help Help screen
help/all Display help for all targets
help/short This help short screen
lint Lint Terraform code

```

## Developing

1. Make changes in terraform files

2. Regenerate documentation

```bash
bash <(git archive [email protected]:miquido/terraform/terraform-readme-update.git master update.sh | tar -xO)
```

3. Run lint

```
make lint
```

## Copyright

Copyright © 2017-2022 [Miquido](https://miquido.com)

[logo]: https://www.miquido.com/img/logos/logo__miquido.svg
[website]: https://www.miquido.com/
[gitlab]: https://gitlab.com/miquido
[github]: https://github.com/miquido
[bitbucket]: https://bitbucket.org/miquido