Files
threshold/enos/modules/docker_check_health/main.tf
T
Michael Li 333b9e855d chore(e2e): Use public version of enos (#4872)
* chore(e2e): Use public version of enos

* chore(e2e): Move vault module to this repo

terraform-enos-aws-vault is no longer supported
2024-06-10 11:13:09 -04:00

19 lines
469 B
Terraform

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
terraform {
required_providers {
enos = {
source = "registry.terraform.io/hashicorp-forge/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'"]
}