Skip to content

Commit

Permalink
add docs for load balancer monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
benjvi committed Mar 2, 2018
1 parent f7b15bf commit 78caa3a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
3 changes: 3 additions & 0 deletions website/cloudflare.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
<li<%= sidebar_current("docs-cloudflare-resource-record") %>>
<a href="/docs/providers/cloudflare/r/record.html">cloudflare_record</a>
</li>
<li<%= sidebar_current("docs-cloudflare-resource-load-balancer-monitor") %>>
<a href="/docs/providers/cloudflare/r/load_balancer_monitor.html">cloudflare_load_balancer_monitor</a>
</li>
</ul>
</li>
</ul>
Expand Down
58 changes: 58 additions & 0 deletions website/docs/r/load_balancer_monitor.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
layout: "cloudflare"
page_title: "Cloudflare: cloudflare_load_balancer_monitor"
sidebar_current: "docs-cloudflare-resource-load-balancer-monitor"
description: |-
Provides a Cloudflare Load Balancer Monitor resource.
---

# cloudflare_load_balancer_monitor

If you're using Cloudflare's Load Balancing to load-balance across multiple origin servers or data centers, you configure one of these Monitors to actively check the availability of those servers over HTTP(S).

## Example Usage

```hcl
resource "cloudflare_load_balancer_monitor" "test" {
expected_body = "alive"
expected_codes = "2xx"
method = "GET"
timeout = 7
path = "/health"
interval = 55
retries = 5
description = "example load balancer"
header {
header = "Host"
values = ["example.com"]
}
}
```

## Argument Reference

The following arguments are supported:

* `expected_body` - (Required) A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.
* `expected_codes` - (Required) The expected HTTP response code or code range of the health check. Eg `2xx`
* `method` - (Optional) The HTTP method to use for the health check. Default: "GET".
* `timeout` - (Optional) The timeout (in seconds) before marking the health check as failed. Default: 5.
* `path` - (Optional) The endpoint path to health check against. Default: "/".
* `interval` - (Optional) The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations. Default: 60.
* `retries` - (Optional) The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. Default: 2.
* `header` - (Optional) The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Fields documented below.
* `type` - (Optional) The protocol to use for the healthcheck. Currently supported protocols are 'HTTP' and 'HTTPS'. Default: "http".
* `description` - (Optional) Free text description.

**header** requires the following:

* `header` - (Required) The header name.
* `values` - (Required) A list of string values for the header.

## Attributes Reference

The following attributes are exported:

* `id` - Load balancer monitor ID.
* `created_on` - The RFC3339 timestamp of when the load balancer monitor was created.
* `modified_on` - The RFC3339 timestamp of when the load balancer monitor was last modified.

0 comments on commit 78caa3a

Please sign in to comment.