Closed v-rosa closed 1 year ago
defaulted_check_containers
healthCheck
Not ideal but this can be tested with this snippet:
locals { container_defs_with_depends_on = [{ name = "x" essential = true healthCheck = null }, { name = "y" essential = true healthCheck = { command = "" } }, { name = "z" essential = true } ] defaulted_check_containers_before = [for def in local.container_defs_with_depends_on : def.name if contains(keys(def), "essential") && contains(keys(def), "healthCheck")] defaulted_check_containers_now = [for def in local.container_defs_with_depends_on : def.name if contains(keys(def), "essential") && contains(keys(def), "healthCheck") && (try(def.healthCheck, null) != null)] } output "defaulted_check_containers_before" { value = local.defaulted_check_containers_before description = "should contain 'x' and 'y'" depends_on = [] } output "defaulted_check_containers_now" { value = local.defaulted_check_containers_now description = "should contain only 'y'" depends_on = [] }
tf plan output:
Changes to Outputs: + defaulted_check_containers_before = [ + "x", + "y", ] + defaulted_check_containers_now = [ + "y", ]
Changes proposed in this PR:
defaulted_check_containers
if thehealthCheck
property is present but its null. https://github.com/hashicorp/terraform-aws-consul-ecs/pull/153How I've tested this PR:
How I expect reviewers to test this PR:
Not ideal but this can be tested with this snippet:
tf plan output:
Checklist: