Google Compute Engine HTTP Health Check

This page shows how to write Terraform for Compute Engine HTTP Health Check and write them securely.

code-icon

Fix issues in your cloud & app configurations

Test for misconfigurations of this resource in your cloud.

get-started-button

Terraform Example (google_compute_http_health_check)

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

Note: google_compute_http_health_check is a legacy health check. The newer google_compute_health_check should be preferred for all uses except Network Load Balancers which still require the legacy version. To get more information about HttpHealthCheck, see:

Parameters

  • check_interval_sec optional - number
    • How often (in seconds) to send a health check. The default value is 5 seconds.

  • creation_timestamp requiredcomputed - string
    • Creation timestamp in RFC3339 text format.

  • description optional - string
    • An optional description of this resource. Provide this property when you create the resource.

  • healthy_threshold optional - number
    • A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.

  • host optional - string
    • The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.

  • id optionalcomputed - string
  • name required - string
    • Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression 'a-z?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

  • port optional - number
    • The TCP port number for the HTTP health check request. The default value is 80.

  • project optionalcomputed - string
  • request_path optional - string
    • The request path of the HTTP health check request. The default value is /.

  • self_link requiredcomputed - string
  • timeout_sec optional - number
    • How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.

  • unhealthy_threshold optional - number
    • A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.

Example Usage (from GitHub)

An example could not be found in GitHub.

Frequently asked questions

What is Google Compute Engine HTTP Health Check?

Google Compute Engine HTTP Health Check is a resource for Compute Engine of Google Cloud Platform. Settings can be wrote in Terraform.