Skip to content

Commit

Permalink
Merge pull request #345 from trussworks/adh-managed-tags-deployment-c…
Browse files Browse the repository at this point in the history
…ircuit-breaker

Allow configuring managed tags and deployment circuit breaker
  • Loading branch information
ahobson authored Aug 4, 2023
2 parents ef9b075 + 74d59b6 commit af7050c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,13 @@ No modules.
| ec2\_create\_task\_execution\_role | Set to true to create ecs task execution role to ECS EC2 Tasks. | `bool` | `false` | no |
| ecr\_repo\_arns | The ARNs of the ECR repos. By default, allows all repositories. | `list(string)` | ```[ "*" ]``` | no |
| ecs\_cluster | ECS cluster object for this task. | ```object({ arn = string name = string })``` | n/a | yes |
| ecs\_deployment\_circuit\_breaker | Configure the ECS deployment circuit breaker | ```object({ enable = bool rollback = bool })``` | ```{ "enable": false, "rollback": false }``` | no |
| ecs\_exec\_enable | Enable the ability to execute commands on the containers via Amazon ECS Exec | `bool` | `false` | no |
| ecs\_instance\_role | The name of the ECS instance role. | `string` | `""` | no |
| ecs\_subnet\_ids | Subnet IDs for the ECS tasks. | `list(string)` | n/a | yes |
| ecs\_use\_fargate | Whether to use Fargate for the task definition. | `bool` | `false` | no |
| ecs\_vpc\_id | VPC ID to be used by ECS. | `string` | n/a | yes |
| enable\_ecs\_managed\_tags | Specifies whether to enable Amazon ECS managed tags for the tasks within the service | `bool` | `false` | no |
| environment | Environment tag, e.g prod. | `string` | n/a | yes |
| fargate\_platform\_version | The platform version on which to run your service. Only applicable when using Fargate launch type. | `string` | `"LATEST"` | no |
| fargate\_task\_cpu | Number of cpu units used in initial task definition. Default is minimum. | `number` | `256` | no |
Expand Down
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,10 @@ resource "aws_ecs_service" "main" {

health_check_grace_period_seconds = var.associate_alb || var.associate_nlb ? var.health_check_grace_period_seconds : null

enable_ecs_managed_tags = var.enable_ecs_managed_tags

deployment_circuit_breaker = var.deployment_circuit_breaker

dynamic "service_registries" {
for_each = var.service_registries
content {
Expand Down
18 changes: 18 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,21 @@ variable "ecs_exec_enable" {
default = false
type = bool
}

variable "enable_ecs_managed_tags" {
description = "Specifies whether to enable Amazon ECS managed tags for the tasks within the service"
default = false
type = bool
}

variable "ecs_deployment_circuit_breaker" {
description = "Configure the ECS deployment circuit breaker"
type = object({
enable = bool
rollback = bool
})
default = {
enable = false
rollback = false
}
}

0 comments on commit af7050c

Please sign in to comment.