google_compute_http_health_check

An HttpHealthCheck resource. This resource defines a template for how individual VMs should be checked for health, via HTTP.

To get more information about HttpHealthCheck, see:

Open in Cloud Shell

Example Usage - Http Health Check Basic

resource "google_compute_http_health_check" "default" {
  name         = "authentication-health-check"
  request_path = "/health_check"

  timeout_sec        = 1
  check_interval_sec = 1
}

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

HttpHealthCheck can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import HttpHealthCheck using one of the formats above. For example:

import {
  id = "projects/{{project}}/global/httpHealthChecks/{{name}}"
  to = google_compute_http_health_check.default
}

When using the terraform import command, HttpHealthCheck can be imported using one of the formats above. For example:

$ terraform import google_compute_http_health_check.default projects/{{project}}/global/httpHealthChecks/{{name}}
$ terraform import google_compute_http_health_check.default {{project}}/{{name}}
$ terraform import google_compute_http_health_check.default {{name}}

User Project Overrides

This resource supports User Project Overrides.