Skip to content

Commit 2d3a019

Browse files
author
Abdul Wahid
authored
1 parent 9fab57f commit 2d3a019

File tree

9 files changed

+75
-4
lines changed

9 files changed

+75
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
args: ['--allow-missing-credentials']
1919
- id: trailing-whitespace
2020
- repo: https://github.com/antonbabenko/pre-commit-terraform
21-
rev: v1.74.1
21+
rev: v1.76.0
2222
hooks:
2323
- id: terraform_fmt
2424
- id: terraform_docs

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ All notable changes to this project will be documented in this file.
77

88

99

10+
<a name="6.5.2"></a>
11+
## [6.5.2] - 2022-08-04
12+
13+
- Add entrypoint to task definition parameters ([#61](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/61))
14+
15+
16+
<a name="6.5.1"></a>
17+
## [6.5.1] - 2022-07-13
18+
19+
- Fix typo ([#57](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/57))
20+
21+
1022
<a name="6.5.0"></a>
1123
## [6.5.0] - 2022-05-12
1224

@@ -238,7 +250,9 @@ All notable changes to this project will be documented in this file.
238250
- Initial commit
239251

240252

241-
[Unreleased]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.5.0...HEAD
253+
[Unreleased]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.5.2...HEAD
254+
[6.5.2]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.5.1...6.5.2
255+
[6.5.1]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.5.0...6.5.1
242256
[6.5.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.4.2...6.5.0
243257
[6.4.2]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.4.1...6.4.2
244258
[6.4.1]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.4.0...6.4.1

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ No modules.
137137
| <a name="input_deployment_maximum_percent"></a> [deployment\_maximum\_percent](#input\_deployment\_maximum\_percent) | The upper limit of the number of running tasks that can be running in a service during a deployment | `number` | `200` | no |
138138
| <a name="input_deployment_minimum_healthy_percent"></a> [deployment\_minimum\_healthy\_percent](#input\_deployment\_minimum\_healthy\_percent) | The lower limit of the number of running tasks that must remain running and healthy in a service during a deployment | `number` | `50` | no |
139139
| <a name="input_desired_count"></a> [desired\_count](#input\_desired\_count) | The number of instances of the task definitions to place and keep running. | `number` | `1` | no |
140+
| <a name="input_enable_deployment_circuit_breaker"></a> [enable\_deployment\_circuit\_breaker](#input\_enable\_deployment\_circuit\_breaker) | Whether to enable the deployment circuit breaker logic for the service. | `bool` | `"false"` | no |
141+
| <a name="input_enable_deployment_circuit_breaker_rollback"></a> [enable\_deployment\_circuit\_breaker\_rollback](#input\_enable\_deployment\_circuit\_breaker\_rollback) | Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully. | `bool` | `"false"` | no |
140142
| <a name="input_enable_execute_command"></a> [enable\_execute\_command](#input\_enable\_execute\_command) | Specifies whether to enable Amazon ECS Exec for the tasks within the service. | `bool` | `true` | no |
141143
| <a name="input_force_new_deployment"></a> [force\_new\_deployment](#input\_force\_new\_deployment) | Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version. | `bool` | `false` | no |
142144
| <a name="input_health_check"></a> [health\_check](#input\_health\_check) | A health block containing health check settings for the target group. Overrides the defaults. | `map(string)` | n/a | yes |
@@ -149,7 +151,7 @@ No modules.
149151
| <a name="input_placement_constraints"></a> [placement\_constraints](#input\_placement\_constraints) | (Optional) A set of placement constraints rules that are taken into consideration during task placement. Maximum number of placement\_constraints is 10. This is a list of maps, where each map should contain "type" and "expression" | `list(any)` | `[]` | no |
150152
| <a name="input_platform_version"></a> [platform\_version](#input\_platform\_version) | The platform version on which to run your service. Only applicable for launch\_type set to FARGATE. | `string` | `"LATEST"` | no |
151153
| <a name="input_private_subnet_ids"></a> [private\_subnet\_ids](#input\_private\_subnet\_ids) | A list of private subnets inside the VPC | `list(string)` | n/a | yes |
152-
| <a name="input_propogate_tags"></a> [propogate\_tags](#input\_propogate\_tags) | Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK\_DEFINITION. | `string` | `"TASK_DEFINITION"` | no |
154+
| <a name="input_propagate_tags"></a> [propagate\_tags](#input\_propagate\_tags) | Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK\_DEFINITION. | `string` | `"TASK_DEFINITION"` | no |
153155
| <a name="input_proxy_configuration"></a> [proxy\_configuration](#input\_proxy\_configuration) | (Optional) The proxy configuration details for the App Mesh proxy. This is a list of maps, where each map should contain "container\_name", "properties" and "type" | `list(any)` | `[]` | no |
154156
| <a name="input_repository_credentials"></a> [repository\_credentials](#input\_repository\_credentials) | name or ARN of a secrets manager secret (arn:aws:secretsmanager:region:aws\_account\_id:secret:secret\_name) | `string` | `""` | no |
155157
| <a name="input_repository_credentials_kms_key"></a> [repository\_credentials\_kms\_key](#input\_repository\_credentials\_kms\_key) | key id, key ARN, alias name or alias ARN of the key that encrypted the repository credentials | `string` | `"alias/aws/secretsmanager"` | no |
@@ -180,7 +182,7 @@ No modules.
180182
| <a name="input_task_pseudo_terminal"></a> [task\_pseudo\_terminal](#input\_task\_pseudo\_terminal) | Allocate TTY in the container | `bool` | `null` | no |
181183
| <a name="input_task_start_timeout"></a> [task\_start\_timeout](#input\_task\_start\_timeout) | Time duration (in seconds) to wait before giving up on resolving dependencies for a container. If this parameter is not specified, the default value of 3 minutes is used (fargate). | `number` | `null` | no |
182184
| <a name="input_task_stop_timeout"></a> [task\_stop\_timeout](#input\_task\_stop\_timeout) | Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. The max stop timeout value is 120 seconds and if the parameter is not specified, the default value of 30 seconds is used. | `number` | `null` | no |
183-
| <a name="input_volume"></a> [volume](#input\_volume) | (Optional) A set of volume blocks that containers in your task may use. This is a list of maps, where each map should contain "name", "host\_path", "docker\_volume\_configuration" and "efs\_volume\_configuration". Full set of options can be found at https://www.terraform.io/docs/providers/aws/r/ecs_task_definition.html | `list` | `[]` | no |
185+
| <a name="input_volume"></a> [volume](#input\_volume) | (Optional) A set of volume blocks that containers in your task may use. This is a list of maps, where each map should contain "name", "host\_path", "docker\_volume\_configuration" and "efs\_volume\_configuration". Full set of options can be found at https://www.terraform.io/docs/providers/aws/r/ecs_task_definition.html | `list(any)` | `[]` | no |
184186
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The VPC ID. | `string` | n/a | yes |
185187
| <a name="input_wait_for_steady_state"></a> [wait\_for\_steady\_state](#input\_wait\_for\_steady\_state) | If true, Terraform will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. | `bool` | `false` | no |
186188

examples/core/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
terraform {
2+
required_version = ">= 1.0.11"
3+
4+
required_providers {
5+
aws = ">= 4.0.0"
6+
}
7+
}
8+
19
provider "aws" {
210
region = "eu-west-1"
311
}

examples/fargate-efs/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
terraform {
2+
required_version = ">= 1.0.11"
3+
4+
required_providers {
5+
aws = ">= 4.0.0"
6+
}
7+
}
8+
19
provider "aws" {
210
region = "eu-west-1"
311
}

examples/fargate-spot/main.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
terraform {
2+
required_version = ">= 1.0.11"
3+
4+
required_providers {
5+
aws = ">= 4.0.0"
6+
}
7+
}
8+
19
provider "aws" {
210
region = "eu-west-1"
311
}
@@ -120,6 +128,9 @@ module "fargate" {
120128
}
121129
]
122130

131+
enable_deployment_circuit_breaker = true
132+
enable_deployment_circuit_breaker_rollback = true
133+
123134
depends_on = [
124135
module.alb
125136
]

examples/multiple-target-groups/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
terraform {
2+
required_version = ">= 1.0.11"
3+
4+
required_providers {
5+
aws = ">= 4.0.0"
6+
}
7+
}
8+
19
provider "aws" {
210
region = "eu-west-1"
311
}

main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,11 @@ resource "aws_ecs_service" "service" {
371371
}
372372
}
373373

374+
deployment_circuit_breaker {
375+
enable = var.enable_deployment_circuit_breaker
376+
rollback = var.enable_deployment_circuit_breaker_rollback
377+
}
378+
374379
deployment_controller {
375380
type = var.deployment_controller_type # CODE_DEPLOY or ECS or EXTERNAL
376381
}

variables.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ variable "cluster_id" {
3333
variable "platform_version" {
3434
description = "The platform version on which to run your service. Only applicable for launch_type set to FARGATE."
3535
default = "LATEST"
36+
type = string
3637
}
3738

3839
variable "task_container_image" {
@@ -158,6 +159,18 @@ variable "deployment_controller_type" {
158159
description = "Type of deployment controller. Valid values: CODE_DEPLOY, ECS, EXTERNAL. Default: ECS."
159160
}
160161

162+
variable "enable_deployment_circuit_breaker" {
163+
default = "false"
164+
type = bool
165+
description = "Whether to enable the deployment circuit breaker logic for the service."
166+
}
167+
168+
variable "enable_deployment_circuit_breaker_rollback" {
169+
default = "false"
170+
type = bool
171+
description = "Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully."
172+
}
173+
161174
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/private-auth.html
162175
variable "repository_credentials" {
163176
default = ""
@@ -174,6 +187,7 @@ variable "repository_credentials_kms_key" {
174187
variable "create_repository_credentials_iam_policy" {
175188
default = false
176189
description = "Set to true if you are specifying `repository_credentials` variable, it will attach IAM policy with necessary permissions to task role."
190+
type = bool
177191
}
178192

179193
variable "service_registry_arn" {
@@ -227,6 +241,7 @@ variable "proxy_configuration" {
227241
variable "volume" {
228242
description = "(Optional) A set of volume blocks that containers in your task may use. This is a list of maps, where each map should contain \"name\", \"host_path\", \"docker_volume_configuration\" and \"efs_volume_configuration\". Full set of options can be found at https://www.terraform.io/docs/providers/aws/r/ecs_task_definition.html"
229243
default = []
244+
type = list(any)
230245
}
231246

232247
variable "task_health_command" {

0 commit comments

Comments
 (0)