|
| 1 | +# ECS Task Execution Role submodule |
| 2 | + |
| 3 | +This submodule help create an IAM assumable role for ECS Task Execution Role |
| 4 | + |
| 5 | +## Usage |
| 6 | + |
| 7 | +```hcl |
| 8 | +module "task_execution_role" { |
| 9 | + source = "rabiloo/ecs/aws//modules/ecs-execution-role" |
| 10 | + version = ">=0.2.1" |
| 11 | +
|
| 12 | + name = "custom-ecs-execution-role" |
| 13 | + path = "/service-roles/" |
| 14 | +
|
| 15 | + readable_kms_keys_arn = [ |
| 16 | + "arn:aws:kms:<region>:<account_id>:key/1234abcd-12ab-34cd-56ef-1234567890ab", |
| 17 | + ] |
| 18 | + readable_secrets_arn = [ |
| 19 | + "arn:aws:secretsmanager:<region>:<account_id>:secret:example-123456", |
| 20 | + ] |
| 21 | +
|
| 22 | + tags = { |
| 23 | + Owner = "user" |
| 24 | + Service = "app-name" |
| 25 | + Managed = "Terraform" |
| 26 | + } |
| 27 | +} |
| 28 | +``` |
| 29 | + |
| 30 | +<!-- BEGIN_TF_DOCS --> |
| 31 | +## Requirements |
| 32 | + |
| 33 | +| Name | Version | |
| 34 | +|------|---------| |
| 35 | +| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >=1.2 | |
| 36 | +| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >=4.0 | |
| 37 | + |
| 38 | +## Providers |
| 39 | + |
| 40 | +| Name | Version | |
| 41 | +|------|---------| |
| 42 | +| <a name="provider_aws"></a> [aws](#provider\_aws) | >=4.0 | |
| 43 | + |
| 44 | +## Modules |
| 45 | + |
| 46 | +| Name | Source | Version | |
| 47 | +|------|--------|---------| |
| 48 | +| <a name="module_policy"></a> [policy](#module\_policy) | terraform-aws-modules/iam/aws//modules/iam-policy | ~>5.14.0 | |
| 49 | +| <a name="module_this"></a> [this](#module\_this) | terraform-aws-modules/iam/aws//modules/iam-assumable-role | ~>5.14.0 | |
| 50 | + |
| 51 | +## Resources |
| 52 | + |
| 53 | +| Name | Type | |
| 54 | +|------|------| |
| 55 | +| [aws_iam_policy.AmazonECSTaskExecutionRolePolicy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy) | data source | |
| 56 | +| [aws_iam_policy_document.policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | |
| 57 | + |
| 58 | +## Inputs |
| 59 | + |
| 60 | +| Name | Description | Type | Default | Required | |
| 61 | +|------|-------------|------|---------|:--------:| |
| 62 | +| <a name="input_name"></a> [name](#input\_name) | The name of the IAM role | `string` | n/a | yes | |
| 63 | +| <a name="input_description"></a> [description](#input\_description) | The description of the IAM role | `string` | `"This is a customized role"` | no | |
| 64 | +| <a name="input_path"></a> [path](#input\_path) | The path to the IAM role | `string` | `"/"` | no | |
| 65 | +| <a name="input_readable_kms_keys_arn"></a> [readable\_kms\_keys\_arn](#input\_readable\_kms\_keys\_arn) | The list KMS key\_id | `list(string)` | `[]` | no | |
| 66 | +| <a name="input_readable_secrets_arn"></a> [readable\_secrets\_arn](#input\_readable\_secrets\_arn) | The list secret ARN | `list(string)` | `[]` | no | |
| 67 | +| <a name="input_tags"></a> [tags](#input\_tags) | The list of tags to apply to the IAM role | `map(string)` | `{}` | no | |
| 68 | + |
| 69 | +## Outputs |
| 70 | + |
| 71 | +| Name | Description | |
| 72 | +|------|-------------| |
| 73 | +| <a name="output_iam_role_arn"></a> [iam\_role\_arn](#output\_iam\_role\_arn) | The ARN of the IAM role | |
| 74 | +| <a name="output_iam_role_name"></a> [iam\_role\_name](#output\_iam\_role\_name) | The name of the IAM role | |
| 75 | +| <a name="output_iam_role_unique_id"></a> [iam\_role\_unique\_id](#output\_iam\_role\_unique\_id) | The unique ID of the IAM role | |
| 76 | +<!-- END_TF_DOCS --> |
| 77 | + |
| 78 | +## Contributing |
| 79 | + |
| 80 | +All code contributions must go through a pull request and approved by a core developer before being merged. |
| 81 | +This is to ensure proper review of all the code. |
| 82 | + |
| 83 | +Fork the project, create a feature branch, and send a pull request. |
| 84 | + |
| 85 | +If you would like to help take a look at the [list of issues](https://github.com/rabiloo/terraform-aws-ecs/issues). |
| 86 | + |
| 87 | +## License |
| 88 | + |
| 89 | +This project is released under the MIT License. |
| 90 | +Copyright © 2023 [Rabiloo Co., Ltd](https://rabiloo.com) |
| 91 | +Please see [License File](https://github.com/rabiloo/terraform-aws-ecs/blob/master/LICENSE) for more information. |
0 commit comments