Files
threshold/enos/modules/docker_check_health/main.tf
T
Michael Li b0127116f3 test(e2e): Add test for worker-led worker registration (#4014)
* refact(e2e): Create module to run boundary commands

* test(e2e): Add worker-led registration test
2023-11-09 09:55:47 -05:00

19 lines
462 B
Terraform

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
terraform {
required_providers {
enos = {
source = "app.terraform.io/hashicorp-qti/enos"
}
}
}
variable "container_name" {
description = "Name of docker container to inspect"
}
resource "enos_local_exec" "check_health" {
inline = ["timeout 10s bash -c 'until docker inspect ${var.container_name} --format={{.State.Health}} worker | grep {healthy; do sleep 2; done'"]
}