github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/google/r/compute_health_check.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Google: google_compute_health_check" 4 sidebar_current: "docs-google-compute-health-check" 5 description: |- 6 Manages a Health Check within GCE. 7 --- 8 9 # google\_compute\_health\_check 10 11 Manages a health check within GCE. This is used to monitor instances 12 behind load balancers. Timeouts or HTTP errors cause the instance to be 13 removed from the pool. For more information, see [the official 14 documentation](https://cloud.google.com/compute/docs/load-balancing/health-checks) 15 and 16 [API](https://cloud.google.com/compute/docs/reference/latest/healthChecks). 17 18 ## Example Usage 19 20 ```tf 21 resource "google_compute_health_check" "default" { 22 name = "test" 23 24 timeout_sec = 1 25 check_interval_sec = 1 26 27 tcp_health_check { 28 port = "80" 29 } 30 } 31 ``` 32 33 ## Argument Reference 34 35 The following arguments are supported: 36 37 * `name` - (Required) A unique name for the resource, required by GCE. 38 Changing this forces a new resource to be created. 39 40 - - - 41 42 * `check_interval_sec` - (Optional) The number of seconds between each poll of 43 the instance instance (default 5). 44 45 * `description` - (Optional) Textual description field. 46 47 * `healthy_threshold` - (Optional) Consecutive successes required (default 2). 48 49 * `http_health_check` - (Optional) An HTTP Health Check. 50 See *HTTP Health Check* below. 51 52 * `https_health_check` - (Optional) An HTTPS Health Check. 53 See *HTTPS Health Check* below. 54 55 * `ssl_health_check` - (Optional) An SSL Health Check. 56 See *SSL Health Check* below. 57 58 * `tcp_health_check` - (Optional) A TCP Health Check. 59 See *TCP Health Check* below. 60 61 * `project` - (Optional) The project in which the resource belongs. If it 62 is not provided, the provider project is used. 63 64 * `timeout_sec` - (Optional) The number of seconds to wait before declaring 65 failure (default 5). 66 67 * `unhealthy_threshold` - (Optional) Consecutive failures required (default 2). 68 69 70 **HTTP Health Check** supports the following attributes: 71 72 * `host` - (Optional) HTTP host header field (default instance's public ip). 73 74 * `port` - (Optional) TCP port to connect to (default 80). 75 76 * `proxy_header` - (Optional) Type of proxy header to append before sending 77 data to the backend, either NONE or PROXY_V1 (default NONE). 78 79 * `request_path` - (Optional) URL path to query (default /). 80 81 82 **HTTPS Health Check** supports the following attributes: 83 84 * `host` - (Optional) HTTPS host header field (default instance's public ip). 85 86 * `port` - (Optional) TCP port to connect to (default 443). 87 88 * `proxy_header` - (Optional) Type of proxy header to append before sending 89 data to the backend, either NONE or PROXY_V1 (default NONE). 90 91 * `request_path` - (Optional) URL path to query (default /). 92 93 94 **SSL Health Check** supports the following attributes: 95 96 * `port` - (Optional) TCP port to connect to (default 443). 97 98 * `proxy_header` - (Optional) Type of proxy header to append before sending 99 data to the backend, either NONE or PROXY_V1 (default NONE). 100 101 * `request` - (Optional) Application data to send once the SSL connection has 102 been established (default ""). 103 104 * `response` - (Optional) The response that indicates health (default "") 105 106 107 **TCP Health Check** supports the following attributes: 108 109 * `port` - (Optional) TCP port to connect to (default 80). 110 111 * `proxy_header` - (Optional) Type of proxy header to append before sending 112 data to the backend, either NONE or PROXY_V1 (default NONE). 113 114 * `request` - (Optional) Application data to send once the TCP connection has 115 been established (default ""). 116 117 * `response` - (Optional) The response that indicates health (default "") 118 119 120 ## Attributes Reference 121 122 In addition to the arguments listed above, the following computed attributes are 123 exported: 124 125 * `self_link` - The URI of the created resource.