2014-11-20 17:40:17 +00:00
|
|
|
---
|
2018-04-30 21:27:45 +00:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
|
|
|
|
#
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# This file is automatically generated by Magic Modules and manual
|
|
|
|
# changes will be clobbered when the file is regenerated.
|
|
|
|
#
|
|
|
|
# Please read more about how to change this file in
|
|
|
|
# .github/CONTRIBUTING.md.
|
|
|
|
#
|
|
|
|
# ----------------------------------------------------------------------------
|
2014-11-20 17:40:17 +00:00
|
|
|
layout: "google"
|
|
|
|
page_title: "Google: google_compute_http_health_check"
|
2015-10-23 14:10:41 +00:00
|
|
|
sidebar_current: "docs-google-compute-http-health-check"
|
2014-11-20 17:40:17 +00:00
|
|
|
description: |-
|
2018-04-19 22:48:25 +00:00
|
|
|
An HttpHealthCheck resource.
|
2014-11-20 17:40:17 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# google\_compute\_http\_health\_check
|
|
|
|
|
2018-04-11 20:41:12 +00:00
|
|
|
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](/docs/providers/google/r/compute_health_check.html)
|
|
|
|
should be preferred for all uses except
|
|
|
|
[Network Load Balancers](https://cloud.google.com/compute/docs/load-balancing/network/)
|
|
|
|
which still require the legacy version.
|
2014-11-20 17:40:17 +00:00
|
|
|
|
2018-04-11 20:41:12 +00:00
|
|
|
To get more information about HttpHealthCheck, see:
|
|
|
|
|
|
|
|
* [API documentation](https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks)
|
|
|
|
* How-to Guides
|
|
|
|
* [Adding Health Checks](https://cloud.google.com/compute/docs/load-balancing/health-checks#legacy_health_checks)
|
2017-10-21 11:17:40 +00:00
|
|
|
|
2014-11-20 17:40:17 +00:00
|
|
|
## Example Usage
|
|
|
|
|
2017-04-17 10:17:54 +00:00
|
|
|
```hcl
|
2014-11-20 17:40:17 +00:00
|
|
|
resource "google_compute_http_health_check" "default" {
|
2017-06-16 17:53:36 +00:00
|
|
|
name = "authentication-health-check"
|
2016-04-10 21:34:15 +00:00
|
|
|
request_path = "/health_check"
|
|
|
|
|
|
|
|
timeout_sec = 1
|
|
|
|
check_interval_sec = 1
|
2014-11-20 17:40:17 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
2018-04-11 20:41:12 +00:00
|
|
|
* `name` -
|
|
|
|
(Required)
|
|
|
|
Name of the resource. Provided by the client when the resource is
|
2018-05-11 22:25:06 +00:00
|
|
|
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]([-a-z0-9]*[a-z0-9])?` 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.
|
2014-11-20 17:40:17 +00:00
|
|
|
|
|
|
|
|
2018-04-11 20:41:12 +00:00
|
|
|
- - -
|
2014-11-20 17:40:17 +00:00
|
|
|
|
2018-04-11 20:41:12 +00:00
|
|
|
* `check_interval_sec` -
|
|
|
|
(Optional)
|
|
|
|
How often (in seconds) to send a health check. The default value is 5
|
2018-05-11 22:25:06 +00:00
|
|
|
seconds.
|
2018-04-11 20:41:12 +00:00
|
|
|
* `description` -
|
|
|
|
(Optional)
|
|
|
|
An optional description of this resource. Provide this property when
|
2018-05-11 22:25:06 +00:00
|
|
|
you create the resource.
|
2018-04-11 20:41:12 +00:00
|
|
|
* `healthy_threshold` -
|
|
|
|
(Optional)
|
|
|
|
A so-far unhealthy instance will be marked healthy after this many
|
2018-05-11 22:25:06 +00:00
|
|
|
consecutive successes. The default value is 2.
|
2018-04-11 20:41:12 +00:00
|
|
|
* `host` -
|
|
|
|
(Optional)
|
|
|
|
The value of the host header in the HTTP health check request. If
|
2018-05-11 22:25:06 +00:00
|
|
|
left empty (default value), the public IP on behalf of which this
|
|
|
|
health check is performed will be used.
|
2018-04-11 20:41:12 +00:00
|
|
|
* `port` -
|
|
|
|
(Optional)
|
|
|
|
The TCP port number for the HTTP health check request.
|
2018-05-11 22:25:06 +00:00
|
|
|
The default value is 80.
|
2018-04-11 20:41:12 +00:00
|
|
|
* `request_path` -
|
|
|
|
(Optional)
|
|
|
|
The request path of the HTTP health check request.
|
2018-05-11 22:25:06 +00:00
|
|
|
The default value is /.
|
2018-04-11 20:41:12 +00:00
|
|
|
* `timeout_sec` -
|
|
|
|
(Optional)
|
|
|
|
How long (in seconds) to wait before claiming failure.
|
2018-05-11 22:25:06 +00:00
|
|
|
The default value is 5 seconds. It is invalid for timeoutSec to have
|
|
|
|
greater value than checkIntervalSec.
|
2018-04-11 20:41:12 +00:00
|
|
|
* `unhealthy_threshold` -
|
|
|
|
(Optional)
|
|
|
|
A so-far healthy instance will be marked unhealthy after this many
|
2018-05-11 22:25:06 +00:00
|
|
|
consecutive failures. The default value is 2.
|
2018-04-11 20:41:12 +00:00
|
|
|
* `project` (Optional) The ID of the project in which the resource belongs.
|
|
|
|
If it is not provided, the provider project is used.
|
2014-11-20 17:40:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
2018-04-11 20:41:12 +00:00
|
|
|
In addition to the arguments listed above, the following computed attributes are exported:
|
2018-03-10 01:14:32 +00:00
|
|
|
|
2018-04-11 20:41:12 +00:00
|
|
|
* `creation_timestamp` -
|
|
|
|
Creation timestamp in RFC3339 text format.
|
2016-04-10 21:34:15 +00:00
|
|
|
* `self_link` - The URI of the created resource.
|
2017-06-16 17:53:36 +00:00
|
|
|
|
2018-04-11 20:41:12 +00:00
|
|
|
|
2018-03-10 01:14:32 +00:00
|
|
|
## Timeouts
|
|
|
|
|
|
|
|
This resource provides the following
|
|
|
|
[Timeouts](/docs/configuration/resources.html#timeouts) configuration options:
|
|
|
|
|
|
|
|
- `create` - Default is 4 minutes.
|
|
|
|
- `update` - Default is 4 minutes.
|
|
|
|
- `delete` - Default is 4 minutes.
|
|
|
|
|
2017-06-16 17:53:36 +00:00
|
|
|
## Import
|
|
|
|
|
2018-04-11 20:41:12 +00:00
|
|
|
HttpHealthCheck can be imported using any of these accepted formats:
|
2017-06-16 17:53:36 +00:00
|
|
|
|
|
|
|
```
|
2018-04-11 20:41:12 +00:00
|
|
|
$ 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}}
|
2017-06-16 17:53:36 +00:00
|
|
|
```
|