# Reference for the teleport\_health\_check\_config Terraform resource

This page describes the supported values of the teleport\_health\_check\_config resource of the Teleport Terraform provider.

## Example Usage

```
resource "teleport_health_check_config" "example" {
  metadata = {
    name        = "example"
    description = "Example health check config"
    labels = {
      foo = "bar"
    }
  }
  version = "v1"
  spec = {
    interval            = "60s"
    timeout             = "5s"
    healthy_threshold   = 3
    unhealthy_threshold = 2
    match = {
      db_labels = [{
        name = "env"
        values = [
          "foo",
          "bar",
        ]
      }]
      db_labels_expression = "labels.foo == `bar`"
    }
  }
}

```

## Schema

### Required

- `metadata` (Attributes) Metadata is the health check config resource's metadata. (see [below for nested schema](#nested-schema-for-metadata))
- `spec` (Attributes) Spec is the health check config specification. (see [below for nested schema](#nested-schema-for-spec))
- `version` (String) Version is the health check config version.

### Optional

- `sub_kind` (String) SubKind is an optional resource sub kind.

### Nested Schema for `metadata`

Required:

- `name` (String) name is an object name.

Optional:

- `description` (String) description is object description.
- `expires` (String) expires is a global expiry time header can be set on any resource in the system.
- `labels` (Map of String) labels is a set of labels.

### Nested Schema for `spec`

Required:

- `match` (Attributes) Match is used to select resources that these settings apply to. (see [below for nested schema](#nested-schema-for-specmatch))

Optional:

- `healthy_threshold` (Number) HealthyThreshold is the number of consecutive passing health checks after which a target's health status becomes "healthy".
- `interval` (String) Interval is the time between each health check.
- `timeout` (String) Timeout is the health check connection establishment timeout. An attempt that times out is a failed attempt.
- `unhealthy_threshold` (Number) UnhealthyThreshold is the number of consecutive failing health checks after which a target's health status becomes "unhealthy".

### Nested Schema for `spec.match`

Optional:

- `db_labels` (Attributes List) DBLabels matches database labels. An empty value is ignored. The match result is logically ANDed with DBLabelsExpression, if both are non-empty. (see [below for nested schema](#nested-schema-for-specmatchdb_labels))
- `db_labels_expression` (String) DBLabelsExpression is a label predicate expression to match databases. An empty value is ignored. The match result is logically ANDed with DBLabels, if both are non-empty.
- `disabled` (Boolean) Disabled disables matches for all labels and expressions.
- `kubernetes_labels` (Attributes List) KubernetesLabels matches Kubernetes labels. An empty value is ignored. The match result is logically ANDed with KubernetesLabelsExpression, if both are non-empty. (see [below for nested schema](#nested-schema-for-specmatchkubernetes_labels))
- `kubernetes_labels_expression` (String) KubernetesLabelsExpression is a label predicate expression to match Kubernetes. An empty value is ignored. The match result is logically ANDed with KubernetesLabels, if both are non-empty.

### Nested Schema for `spec.match.db_labels`

Optional:

- `name` (String) The name of the label.
- `values` (List of String) The values associated with the label.

### Nested Schema for `spec.match.kubernetes_labels`

Optional:

- `name` (String) The name of the label.
- `values` (List of String) The values associated with the label.
