github.com/pbthorste/terraform@v0.8.6-0.20170127005045-deb56bd93da2/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 tcp_health_check { 27 port = "80" 28 } 29 } 30 ``` 31 32 ## Argument Reference 33 34 The following arguments are supported: 35 36 * `name` - (Required) A unique name for the resource, required by GCE. 37 Changing this forces a new resource to be created. 38 39 - - - 40 41 * `check_interval_sec` - (Optional) The number of seconds between each poll of 42 the instance instance (default 5). 43 44 * `description` - (Optional) Textual description field. 45 46 * `healthy_threshold` - (Optional) Consecutive successes required (default 2). 47 48 * `http_health_check` - (Optional) An HTTP Health Check. 49 See *HTTP Health Check* below. 50 51 * `https_health_check` - (Optional) An HTTPS Health Check. 52 See *HTTPS Health Check* below. 53 54 * `ssl_health_check` - (Optional) An SSL Health Check. 55 See *SSL Health Check* below. 56 57 * `tcp_health_check` - (Optional) A TCP Health Check. 58 See *TCP Health Check* below. 59 60 * `project` - (Optional) The project in which the resource belongs. If it 61 is not provided, the provider project is used. 62 63 * `timeout_sec` - (Optional) The number of seconds to wait before declaring 64 failure (default 5). 65 66 * `unhealthy_threshold` - (Optional) Consecutive failures required (default 2). 67 68 69 **HTTP Health Check** supports the following attributes: 70 71 * `host` - (Optional) HTTP host header field (default instance's public ip). 72 73 * `port` - (Optional) TCP port to connect to (default 80). 74 75 * `proxy_header` - (Optional) Type of proxy header to append before sending 76 data to the backend, either NONE or PROXY_V1 (default NONE). 77 78 * `request_path` - (Optional) URL path to query (default /). 79 80 81 **HTTPS Health Check** supports the following attributes: 82 83 * `host` - (Optional) HTTPS host header field (default instance's public ip). 84 85 * `port` - (Optional) TCP port to connect to (default 443). 86 87 * `proxy_header` - (Optional) Type of proxy header to append before sending 88 data to the backend, either NONE or PROXY_V1 (default NONE). 89 90 * `request_path` - (Optional) URL path to query (default /). 91 92 93 **SSL Health Check** supports the following attributes: 94 95 * `port` - (Optional) TCP port to connect to (default 443). 96 97 * `proxy_header` - (Optional) Type of proxy header to append before sending 98 data to the backend, either NONE or PROXY_V1 (default NONE). 99 100 * `request` - (Optional) Application data to send once the SSL connection has 101 been established (default ""). 102 103 * `response` - (Optional) The response that indicates health (default "") 104 105 106 **TCP Health Check** supports the following attributes: 107 108 * `port` - (Optional) TCP port to connect to (default 80). 109 110 * `proxy_header` - (Optional) Type of proxy header to append before sending 111 data to the backend, either NONE or PROXY_V1 (default NONE). 112 113 * `request` - (Optional) Application data to send once the TCP connection has 114 been established (default ""). 115 116 * `response` - (Optional) The response that indicates health (default "") 117 118 119 ## Attributes Reference 120 121 In addition to the arguments listed above, the following computed attributes are 122 exported: 123 124 * `self_link` - The URI of the created resource.