diff --git a/README.md b/README.md index 75efad8..3ddb8c4 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,10 @@ No resources. | [asg\_volume\_size](#input\_asg\_volume\_size) | Specify the volume size for the root ebs | `string` | `30` | no | | [asg\_wait\_for\_capacity\_timeout](#input\_asg\_wait\_for\_capacity\_timeout) | A maximum duration that Terraform should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to '0' causes Terraform to skip all Capacity Waiting behavior. | `string` | `null` | no | | [assign\_public\_ip](#input\_assign\_public\_ip) | Enable a public IP address for the container | `bool` | `false` | no | +| [capacity\_providers](#input\_capacity\_providers) | List of short names of one or more capacity providers to associate with the cluster. Valid values also include FARGATE and FARGATE\_SPOT. | `list(string)` | `[]` | no | +| [cluster\_tags](#input\_cluster\_tags) | tags to be added to ECS cluster | `map(any)` | `{}` | no | | [create\_launch\_template](#input\_create\_launch\_template) | Create a launch template | `bool` | `true` | no | +| [default\_capacity\_provider\_strategy](#input\_default\_capacity\_provider\_strategy) | The capacity provider strategy to use by default for the cluster. Can be one or more. | `list(map(any))` | `[]` | no | | [enable\_execute\_command](#input\_enable\_execute\_command) | Specifies whether to enable Amazon ECS Exec for the tasks within the service | `bool` | `false` | no | | [launch\_type](#input\_launch\_type) | The launch type on which to run your task.(EC2\|FARGATE) | `string` | `"EC2"` | no | | [link\_ecs\_to\_asg\_capacity\_provider](#input\_link\_ecs\_to\_asg\_capacity\_provider) | Specify whether to link ECS to autoscaling group capacity provider | `bool` | `false` | no | @@ -65,11 +68,10 @@ No resources. | [service\_scale\_out\_cooldown](#input\_service\_scale\_out\_cooldown) | Time between scale out action | `number` | `300` | no | | [service\_security\_groups](#input\_service\_security\_groups) | Security group IDs to attach to your ECS Service | `list(string)` | `[]` | no | | [service\_subnets](#input\_service\_subnets) | Private subnets for ECS | `list(string)` | `[]` | no | +| [service\_tags](#input\_service\_tags) | tags to be added to task definitions | `map(any)` | `{}` | no | | [service\_target\_cpu\_value](#input\_service\_target\_cpu\_value) | Autoscale when CPU Usage value over the specified value. Must be specified if `enable_cpu_based_autoscaling` is `true`. | `number` | `70` | no | | [service\_task\_execution\_role\_arn](#input\_service\_task\_execution\_role\_arn) | Default IAM role for ECS execution | `string` | `""` | no | | [service\_task\_role\_arn](#input\_service\_task\_role\_arn) | Default IAM role for ECS task | `string` | `""` | no | -| [capacity\_provider](#default\_capacity\_provider\_strategy) | Capacity providers for ECS Cluster | `list(string)` | `[]` | no | -| [default\_capacity\_provider\_strategy](#default\_capacity\_provider\_strategy) | Default capacity provider strategy for ECS Cluster | `list(map(any))` | `[]` | no | | [task\_placement\_constraints](#input\_task\_placement\_constraints) | The rules that are taken into consideration during task placement. Maximum number of placement\_constraints is 10 |
list(object({| `[]` | no | ## Outputs diff --git a/main.tf b/main.tf index 1201ce8..039c500 100644 --- a/main.tf +++ b/main.tf @@ -42,6 +42,7 @@ module "cluster" { default_capacity_provider_strategy = var.default_capacity_provider_strategy capacity_providers = var.capacity_providers + tags = var.cluster_tags } module "service" { @@ -77,7 +78,7 @@ module "service" { task_placement_constraints = var.task_placement_constraints capacity_provider_strategy = var.default_capacity_provider_strategy - + tags = var.service_tags } module "service_cpu_autoscaling_policy" { diff --git a/modules/autoscaling-policy/README.md b/modules/autoscaling-policy/README.md index 2d2eb9d..7ea5995 100644 --- a/modules/autoscaling-policy/README.md +++ b/modules/autoscaling-policy/README.md @@ -10,7 +10,7 @@ | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.31.0 | +| [aws](#provider\_aws) | 5.38.0 | ## Modules diff --git a/modules/cluster/README.md b/modules/cluster/README.md index ba3e985..ffb7116 100644 --- a/modules/cluster/README.md +++ b/modules/cluster/README.md @@ -10,7 +10,7 @@ | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.31.0 | +| [aws](#provider\_aws) | 5.38.0 | ## Modules diff --git a/modules/iam/README.md b/modules/iam/README.md index 11cf16b..e16ce3b 100644 --- a/modules/iam/README.md +++ b/modules/iam/README.md @@ -9,7 +9,7 @@ | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.31.0 | +| [aws](#provider\_aws) | 5.38.0 | ## Modules diff --git a/modules/service-discovery/README.md b/modules/service-discovery/README.md index 80cb604..f782bc6 100644 --- a/modules/service-discovery/README.md +++ b/modules/service-discovery/README.md @@ -10,7 +10,7 @@ | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.31.0 | +| [aws](#provider\_aws) | 5.38.0 | ## Modules diff --git a/modules/service/README.md b/modules/service/README.md index 9345896..8a7b32d 100644 --- a/modules/service/README.md +++ b/modules/service/README.md @@ -10,7 +10,7 @@ | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.31.0 | +| [aws](#provider\_aws) | 5.38.0 | ## Modules @@ -29,6 +29,7 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [assign\_public\_ip](#input\_assign\_public\_ip) | Flag for enabling/disabling public IP for ECS Containers | `bool` | `false` | no | +| [capacity\_provider\_strategy](#input\_capacity\_provider\_strategy) | The capacity provider strategy to use by ecs service. Can be one or more. | `list(map(any))` | `[]` | no | | [cluster\_id](#input\_cluster\_id) | Cluster ID | `string` | n/a | yes | | [container\_definitions](#input\_container\_definitions) | A list of container definitions in JSON format that describe the different containers that make up your task | `string` | n/a | yes | | [deployment\_circuit\_breaker](#input\_deployment\_circuit\_breaker) | Configuration block for deployment circuit breaker | `any` | `{}` | no | diff --git a/variables.tf b/variables.tf index d92f843..d37eaf9 100644 --- a/variables.tf +++ b/variables.tf @@ -13,6 +13,12 @@ variable "link_ecs_to_asg_capacity_provider" { default = false } +variable "cluster_tags" { + type = map(any) + default = {} + description = "tags to be added to ECS cluster" +} + ############################## # ECS - service ############################## @@ -83,6 +89,12 @@ variable "enable_execute_command" { default = false } +variable "service_tags" { + type = map(any) + default = {} + description = "tags to be added to task definitions" +} + ################################################################################ # Autoscaling group ################################################################################
type = string
expression = string
}))