Skip to content

Commit 7abcf65

Browse files
committed
Revert "fix: Adding a health_check generates a new task definition revision on every terraform apply (terraform-aws-modules#149)"
This reverts commit 492e323.
1 parent feb6e7f commit 7abcf65

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

examples/complete/main.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ module "ecs" {
6969
memory = 1024
7070
essential = true
7171
image = "public.ecr.aws/aws-containers/ecsdemo-frontend:776fd50"
72-
73-
health_check = {
74-
command = ["CMD-SHELL", "curl -f http://localhost:${local.container_port}/health || exit 1"]
75-
}
76-
7772
port_mappings = [
7873
{
7974
name = local.container_name

modules/container-definition/main.tf

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ locals {
1919

2020
linux_parameters = var.enable_execute_command ? merge({ "initProcessEnabled" : true }, var.linux_parameters) : merge({ "initProcessEnabled" : false }, var.linux_parameters)
2121

22-
health_check = length(var.health_check) > 0 ? merge({
23-
interval = 30,
24-
retries = 3,
25-
timeout = 5
26-
}, var.health_check) : null
27-
2822
definition = {
2923
command = length(var.command) > 0 ? var.command : null
3024
cpu = var.cpu
@@ -40,7 +34,7 @@ locals {
4034
essential = var.essential
4135
extraHosts = local.is_not_windows && length(var.extra_hosts) > 0 ? var.extra_hosts : null
4236
firelensConfiguration = length(var.firelens_configuration) > 0 ? var.firelens_configuration : null
43-
healthCheck = local.health_check
37+
healthCheck = length(var.health_check) > 0 ? var.health_check : null
4438
hostname = var.hostname
4539
image = var.image
4640
interactive = var.interactive

0 commit comments

Comments
 (0)