Skip to content

Commit 4a0689d

Browse files
authored
Make deregistration_delay attribute customizable for ALB Target Groups (#42)
* Make deregistration_delay attribute customizable for ALB Target Groups The `deregistration_delay` attribute of a Target Group is set to 300 seconds by default as a conservatively safe value. However, if a service owner knows that their connections stop faster it makes sense to reduce the delay to speed up the deployments. This PR makes the customization possible via the module. * Ensure README.md and CHANGELOG.md are up to date
1 parent 0a6aff8 commit 4a0689d

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

CHANGELOG.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
55
<a name="unreleased"></a>
66
## [Unreleased]
77

8+
- Make deregistration_delay attribute customizable for ALB Target Groups
9+
10+
11+
<a name="6.2.1"></a>
12+
## [6.2.1] - 2021-07-30
13+
14+
- Add support to pick latest task definition ([#41](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/41))
15+
16+
17+
<a name="6.2.0"></a>
18+
## [6.2.0] - 2021-06-04
19+
20+
- add tags iam role ([#34](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/34))
21+
22+
23+
<a name="6.1.0"></a>
24+
## [6.1.0] - 2021-05-10
25+
26+
- Add support for enable_execute_command ([#33](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/33))
827

928

1029
<a name="6.0.0"></a>
@@ -181,7 +200,10 @@ All notable changes to this project will be documented in this file.
181200
- Initial commit
182201

183202

184-
[Unreleased]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.0.0...HEAD
203+
[Unreleased]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.2.1...HEAD
204+
[6.2.1]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.2.0...6.2.1
205+
[6.2.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.1.0...6.2.0
206+
[6.1.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.0.0...6.1.0
185207
[6.0.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/5.1.0...6.0.0
186208
[5.1.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/5.0.1...5.1.0
187209
[5.0.1]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/5.0.0...5.0.1

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ No modules.
110110
| [aws_lb_target_group.task](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group) | resource |
111111
| [aws_security_group.ecs_service](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
112112
| [aws_security_group_rule.egress_service](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
113+
| [aws_ecs_task_definition.task](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecs_task_definition) | data source |
113114
| [aws_iam_policy_document.read_repository_credentials](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
114115
| [aws_iam_policy_document.task_assume](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
115116
| [aws_iam_policy_document.task_ecs_exec_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |

main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,12 @@ resource "aws_security_group_rule" "egress_service" {
9595
resource "aws_lb_target_group" "task" {
9696
for_each = var.load_balanced ? { for tg in var.target_groups : tg.target_group_name => tg } : {}
9797

98-
name = lookup(each.value, "target_group_name")
99-
vpc_id = var.vpc_id
100-
protocol = var.task_container_protocol
101-
port = lookup(each.value, "container_port", var.task_container_port)
102-
target_type = "ip"
98+
name = lookup(each.value, "target_group_name")
99+
vpc_id = var.vpc_id
100+
protocol = var.task_container_protocol
101+
port = lookup(each.value, "container_port", var.task_container_port)
102+
deregistration_delay = lookup(each.value, "deregistration_delay", null)
103+
target_type = "ip"
103104

104105

105106
dynamic "health_check" {

0 commit comments

Comments
 (0)