Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

Healthcheck

Standalone Health Checks provide a way to monitor origin servers without needing a Cloudflare Load Balancer.

Example Usage

HTTPS Health Check

using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

class MyStack : Stack
{
    public MyStack()
    {
        var httpHealthCheck = new Cloudflare.Healthcheck("httpHealthCheck", new Cloudflare.HealthcheckArgs
        {
            ZoneId = @var.Cloudflare_zone_id,
            Name = "http-health-check",
            Description = "example http health check",
            Address = "example.com",
            Suspended = false,
            CheckRegions = 
            {
                "WEU",
                "EEU",
            },
            NotificationSuspended = false,
            NotificationEmailAddresses = 
            {
                "hostmaster@example.com",
            },
            Type = "HTTPS",
            Port = 443,
            Method = "GET",
            Path = "/health",
            ExpectedBody = "alive",
            ExpectedCodes = 
            {
                "2xx",
                "301",
            },
            FollowRedirects = true,
            AllowInsecure = false,
            Headers = 
            {
                new Cloudflare.Inputs.HealthcheckHeaderArgs
                {
                    Header = "Host",
                    Values = 
                    {
                        "example.com",
                    },
                },
            },
            Timeout = 10,
            Retries = 2,
            Interval = 60,
            ConsecutiveFails = 3,
            ConsecutiveSuccesses = 2,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-cloudflare/sdk/v2/go/cloudflare"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := cloudflare.NewHealthcheck(ctx, "httpHealthCheck", &cloudflare.HealthcheckArgs{
            ZoneId:      pulumi.Any(_var.Cloudflare_zone_id),
            Name:        pulumi.String("http-health-check"),
            Description: pulumi.String("example http health check"),
            Address:     pulumi.String("example.com"),
            Suspended:   pulumi.Bool(false),
            CheckRegions: pulumi.StringArray{
                pulumi.String("WEU"),
                pulumi.String("EEU"),
            },
            NotificationSuspended: pulumi.Bool(false),
            NotificationEmailAddresses: pulumi.StringArray{
                pulumi.String("hostmaster@example.com"),
            },
            Type:         pulumi.String("HTTPS"),
            Port:         pulumi.Int(443),
            Method:       pulumi.String("GET"),
            Path:         pulumi.String("/health"),
            ExpectedBody: pulumi.String("alive"),
            ExpectedCodes: pulumi.StringArray{
                pulumi.String("2xx"),
                pulumi.String("301"),
            },
            FollowRedirects: pulumi.Bool(true),
            AllowInsecure:   pulumi.Bool(false),
            Headers: cloudflare.HealthcheckHeaderArray{
                &cloudflare.HealthcheckHeaderArgs{
                    Header: pulumi.String("Host"),
                    Values: pulumi.StringArray{
                        pulumi.String("example.com"),
                    },
                },
            },
            Timeout:              pulumi.Int(10),
            Retries:              pulumi.Int(2),
            Interval:             pulumi.Int(60),
            ConsecutiveFails:     pulumi.Int(3),
            ConsecutiveSuccesses: pulumi.Int(2),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_cloudflare as cloudflare

http_health_check = cloudflare.Healthcheck("httpHealthCheck",
    zone_id=var["cloudflare_zone_id"],
    name="http-health-check",
    description="example http health check",
    address="example.com",
    suspended=False,
    check_regions=[
        "WEU",
        "EEU",
    ],
    notification_suspended=False,
    notification_email_addresses=["hostmaster@example.com"],
    type="HTTPS",
    port=443,
    method="GET",
    path="/health",
    expected_body="alive",
    expected_codes=[
        "2xx",
        "301",
    ],
    follow_redirects=True,
    allow_insecure=False,
    headers=[cloudflare.HealthcheckHeaderArgs(
        header="Host",
        values=["example.com"],
    )],
    timeout=10,
    retries=2,
    interval=60,
    consecutive_fails=3,
    consecutive_successes=2)
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const httpHealthCheck = new cloudflare.Healthcheck("httpHealthCheck", {
    zoneId: _var.cloudflare_zone_id,
    name: "http-health-check",
    description: "example http health check",
    address: "example.com",
    suspended: false,
    checkRegions: [
        "WEU",
        "EEU",
    ],
    notificationSuspended: false,
    notificationEmailAddresses: ["hostmaster@example.com"],
    type: "HTTPS",
    port: "443",
    method: "GET",
    path: "/health",
    expectedBody: "alive",
    expectedCodes: [
        "2xx",
        "301",
    ],
    followRedirects: true,
    allowInsecure: false,
    headers: [{
        header: "Host",
        values: ["example.com"],
    }],
    timeout: 10,
    retries: 2,
    interval: 60,
    consecutiveFails: 3,
    consecutiveSuccesses: 2,
});

TCP Monitor

using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

class MyStack : Stack
{
    public MyStack()
    {
        var tcpHealthCheck = new Cloudflare.Healthcheck("tcpHealthCheck", new Cloudflare.HealthcheckArgs
        {
            ZoneId = @var.Cloudflare_zone_id,
            Name = "tcp-health-check",
            Description = "example tcp health check",
            Address = "example.com",
            Suspended = false,
            CheckRegions = 
            {
                "WEU",
                "EEU",
            },
            NotificationSuspended = false,
            NotificationEmailAddresses = 
            {
                "hostmaster@example.com",
            },
            Type = "TCP",
            Port = 22,
            Method = "connection_established",
            Timeout = 10,
            Retries = 2,
            Interval = 60,
            ConsecutiveFails = 3,
            ConsecutiveSuccesses = 2,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-cloudflare/sdk/v2/go/cloudflare"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := cloudflare.NewHealthcheck(ctx, "tcpHealthCheck", &cloudflare.HealthcheckArgs{
            ZoneId:      pulumi.Any(_var.Cloudflare_zone_id),
            Name:        pulumi.String("tcp-health-check"),
            Description: pulumi.String("example tcp health check"),
            Address:     pulumi.String("example.com"),
            Suspended:   pulumi.Bool(false),
            CheckRegions: pulumi.StringArray{
                pulumi.String("WEU"),
                pulumi.String("EEU"),
            },
            NotificationSuspended: pulumi.Bool(false),
            NotificationEmailAddresses: pulumi.StringArray{
                pulumi.String("hostmaster@example.com"),
            },
            Type:                 pulumi.String("TCP"),
            Port:                 pulumi.Int(22),
            Method:               pulumi.String("connection_established"),
            Timeout:              pulumi.Int(10),
            Retries:              pulumi.Int(2),
            Interval:             pulumi.Int(60),
            ConsecutiveFails:     pulumi.Int(3),
            ConsecutiveSuccesses: pulumi.Int(2),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_cloudflare as cloudflare

tcp_health_check = cloudflare.Healthcheck("tcpHealthCheck",
    zone_id=var["cloudflare_zone_id"],
    name="tcp-health-check",
    description="example tcp health check",
    address="example.com",
    suspended=False,
    check_regions=[
        "WEU",
        "EEU",
    ],
    notification_suspended=False,
    notification_email_addresses=["hostmaster@example.com"],
    type="TCP",
    port=22,
    method="connection_established",
    timeout=10,
    retries=2,
    interval=60,
    consecutive_fails=3,
    consecutive_successes=2)
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const tcpHealthCheck = new cloudflare.Healthcheck("tcpHealthCheck", {
    zoneId: _var.cloudflare_zone_id,
    name: "tcp-health-check",
    description: "example tcp health check",
    address: "example.com",
    suspended: false,
    checkRegions: [
        "WEU",
        "EEU",
    ],
    notificationSuspended: false,
    notificationEmailAddresses: ["hostmaster@example.com"],
    type: "TCP",
    port: "22",
    method: "connection_established",
    timeout: 10,
    retries: 2,
    interval: 60,
    consecutiveFails: 3,
    consecutiveSuccesses: 2,
});

Create a Healthcheck Resource

new Healthcheck(name: string, args: HealthcheckArgs, opts?: CustomResourceOptions);
def Healthcheck(resource_name: str, opts: Optional[ResourceOptions] = None, address: Optional[str] = None, allow_insecure: Optional[bool] = None, check_regions: Optional[Sequence[str]] = None, consecutive_fails: Optional[int] = None, consecutive_successes: Optional[int] = None, description: Optional[str] = None, expected_body: Optional[str] = None, expected_codes: Optional[Sequence[str]] = None, follow_redirects: Optional[bool] = None, headers: Optional[Sequence[HealthcheckHeaderArgs]] = None, interval: Optional[int] = None, method: Optional[str] = None, name: Optional[str] = None, notification_email_addresses: Optional[Sequence[str]] = None, notification_suspended: Optional[bool] = None, path: Optional[str] = None, port: Optional[int] = None, retries: Optional[int] = None, suspended: Optional[bool] = None, timeout: Optional[int] = None, type: Optional[str] = None, zone_id: Optional[str] = None)
func NewHealthcheck(ctx *Context, name string, args HealthcheckArgs, opts ...ResourceOption) (*Healthcheck, error)
public Healthcheck(string name, HealthcheckArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args HealthcheckArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args HealthcheckArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args HealthcheckArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Healthcheck Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Healthcheck resource accepts the following input properties:

Address string

The hostname or IP address of the origin server to run health checks on.

Name string

A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.

Type string

The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.

ZoneId string

The DNS zone ID to which apply settings.

AllowInsecure bool

Do not validate the certificate when the health check uses HTTPS. Valid values: true or false (Default: false).

CheckRegions List<string>

A list of regions from which to run health checks. If not set Cloudflare will pick a default region. Valid values: WNAM, ENAM, WEU, EEU, NSAM, SSAM, OC, ME, NAF, SAF, IN, SEAS, NEAS, ALL_REGIONS.

ConsecutiveFails int

The number of consecutive fails required from a health check before changing the health to unhealthy. (Default: 1)

ConsecutiveSuccesses int

The number of consecutive successes required from a health check before changing the health to healthy. (Default: 1)

Description string

A human-readable description of the health check.

ExpectedBody string

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.

ExpectedCodes List<string>

The expected HTTP response codes (e.g. “200”) or code ranges (e.g. “2xx” for all codes starting with 2) of the health check. (Default: ["200"])

FollowRedirects bool

Follow redirects if the origin returns a 3xx status code. Valid values: true or false (Default: false).

Headers List<HealthcheckHeaderArgs>

The header name.

Interval int

The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations. (Default: 60)

Method string

The TCP connection method to use for the health check. Valid values: connection_established (Default: connection_established).

NotificationEmailAddresses List<string>

A list of email addresses we want to send the notifications to.

NotificationSuspended bool

Whether the notifications are suspended or not. Useful for maintenance periods. Valid values: true or false (Default: false).

Path string

The endpoint path to health check against. (Default: /)

Port int

Port number to connect to for the health check. Valid values are in the range 0-65535 (Default: 80).

Retries int

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. (Default: 2)

Suspended bool

If suspended, no health checks are sent to the origin. Valid values: true or false (Default: false).

Timeout int

The timeout (in seconds) before marking the health check as failed. (Default: 5)

Address string

The hostname or IP address of the origin server to run health checks on.

Name string

A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.

Type string

The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.

ZoneId string

The DNS zone ID to which apply settings.

AllowInsecure bool

Do not validate the certificate when the health check uses HTTPS. Valid values: true or false (Default: false).

CheckRegions []string

A list of regions from which to run health checks. If not set Cloudflare will pick a default region. Valid values: WNAM, ENAM, WEU, EEU, NSAM, SSAM, OC, ME, NAF, SAF, IN, SEAS, NEAS, ALL_REGIONS.

ConsecutiveFails int

The number of consecutive fails required from a health check before changing the health to unhealthy. (Default: 1)

ConsecutiveSuccesses int

The number of consecutive successes required from a health check before changing the health to healthy. (Default: 1)

Description string

A human-readable description of the health check.

ExpectedBody string

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.

ExpectedCodes []string

The expected HTTP response codes (e.g. “200”) or code ranges (e.g. “2xx” for all codes starting with 2) of the health check. (Default: ["200"])

FollowRedirects bool

Follow redirects if the origin returns a 3xx status code. Valid values: true or false (Default: false).

Headers []HealthcheckHeader

The header name.

Interval int

The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations. (Default: 60)

Method string

The TCP connection method to use for the health check. Valid values: connection_established (Default: connection_established).

NotificationEmailAddresses []string

A list of email addresses we want to send the notifications to.

NotificationSuspended bool

Whether the notifications are suspended or not. Useful for maintenance periods. Valid values: true or false (Default: false).

Path string

The endpoint path to health check against. (Default: /)

Port int

Port number to connect to for the health check. Valid values are in the range 0-65535 (Default: 80).

Retries int

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. (Default: 2)

Suspended bool

If suspended, no health checks are sent to the origin. Valid values: true or false (Default: false).

Timeout int

The timeout (in seconds) before marking the health check as failed. (Default: 5)

address string

The hostname or IP address of the origin server to run health checks on.

name string

A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.

type string

The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.

zoneId string

The DNS zone ID to which apply settings.

allowInsecure boolean

Do not validate the certificate when the health check uses HTTPS. Valid values: true or false (Default: false).

checkRegions string[]

A list of regions from which to run health checks. If not set Cloudflare will pick a default region. Valid values: WNAM, ENAM, WEU, EEU, NSAM, SSAM, OC, ME, NAF, SAF, IN, SEAS, NEAS, ALL_REGIONS.

consecutiveFails number

The number of consecutive fails required from a health check before changing the health to unhealthy. (Default: 1)

consecutiveSuccesses number

The number of consecutive successes required from a health check before changing the health to healthy. (Default: 1)

description string

A human-readable description of the health check.

expectedBody string

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.

expectedCodes string[]

The expected HTTP response codes (e.g. “200”) or code ranges (e.g. “2xx” for all codes starting with 2) of the health check. (Default: ["200"])

followRedirects boolean

Follow redirects if the origin returns a 3xx status code. Valid values: true or false (Default: false).

headers HealthcheckHeader[]

The header name.

interval number

The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations. (Default: 60)

method string

The TCP connection method to use for the health check. Valid values: connection_established (Default: connection_established).

notificationEmailAddresses string[]

A list of email addresses we want to send the notifications to.

notificationSuspended boolean

Whether the notifications are suspended or not. Useful for maintenance periods. Valid values: true or false (Default: false).

path string

The endpoint path to health check against. (Default: /)

port number

Port number to connect to for the health check. Valid values are in the range 0-65535 (Default: 80).

retries number

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. (Default: 2)

suspended boolean

If suspended, no health checks are sent to the origin. Valid values: true or false (Default: false).

timeout number

The timeout (in seconds) before marking the health check as failed. (Default: 5)

address str

The hostname or IP address of the origin server to run health checks on.

name str

A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.

type str

The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.

zone_id str

The DNS zone ID to which apply settings.

allow_insecure bool

Do not validate the certificate when the health check uses HTTPS. Valid values: true or false (Default: false).

check_regions Sequence[str]

A list of regions from which to run health checks. If not set Cloudflare will pick a default region. Valid values: WNAM, ENAM, WEU, EEU, NSAM, SSAM, OC, ME, NAF, SAF, IN, SEAS, NEAS, ALL_REGIONS.

consecutive_fails int

The number of consecutive fails required from a health check before changing the health to unhealthy. (Default: 1)

consecutive_successes int

The number of consecutive successes required from a health check before changing the health to healthy. (Default: 1)

description str

A human-readable description of the health check.

expected_body str

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 Sequence[str]

The expected HTTP response codes (e.g. “200”) or code ranges (e.g. “2xx” for all codes starting with 2) of the health check. (Default: ["200"])

follow_redirects bool

Follow redirects if the origin returns a 3xx status code. Valid values: true or false (Default: false).

headers Sequence[HealthcheckHeaderArgs]

The header name.

interval int

The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations. (Default: 60)

method str

The TCP connection method to use for the health check. Valid values: connection_established (Default: connection_established).

notification_email_addresses Sequence[str]

A list of email addresses we want to send the notifications to.

notification_suspended bool

Whether the notifications are suspended or not. Useful for maintenance periods. Valid values: true or false (Default: false).

path str

The endpoint path to health check against. (Default: /)

port int

Port number to connect to for the health check. Valid values are in the range 0-65535 (Default: 80).

retries int

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. (Default: 2)

suspended bool

If suspended, no health checks are sent to the origin. Valid values: true or false (Default: false).

timeout int

The timeout (in seconds) before marking the health check as failed. (Default: 5)

Outputs

All input properties are implicitly available as output properties. Additionally, the Healthcheck resource produces the following output properties:

CreatedOn string
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
CreatedOn string
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
createdOn string
id string
The provider-assigned unique ID for this managed resource.
modifiedOn string
created_on str
id str
The provider-assigned unique ID for this managed resource.
modified_on str

Look up an Existing Healthcheck Resource

Get an existing Healthcheck resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: HealthcheckState, opts?: CustomResourceOptions): Healthcheck
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, address: Optional[str] = None, allow_insecure: Optional[bool] = None, check_regions: Optional[Sequence[str]] = None, consecutive_fails: Optional[int] = None, consecutive_successes: Optional[int] = None, created_on: Optional[str] = None, description: Optional[str] = None, expected_body: Optional[str] = None, expected_codes: Optional[Sequence[str]] = None, follow_redirects: Optional[bool] = None, headers: Optional[Sequence[HealthcheckHeaderArgs]] = None, interval: Optional[int] = None, method: Optional[str] = None, modified_on: Optional[str] = None, name: Optional[str] = None, notification_email_addresses: Optional[Sequence[str]] = None, notification_suspended: Optional[bool] = None, path: Optional[str] = None, port: Optional[int] = None, retries: Optional[int] = None, suspended: Optional[bool] = None, timeout: Optional[int] = None, type: Optional[str] = None, zone_id: Optional[str] = None) -> Healthcheck
func GetHealthcheck(ctx *Context, name string, id IDInput, state *HealthcheckState, opts ...ResourceOption) (*Healthcheck, error)
public static Healthcheck Get(string name, Input<string> id, HealthcheckState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Address string

The hostname or IP address of the origin server to run health checks on.

AllowInsecure bool

Do not validate the certificate when the health check uses HTTPS. Valid values: true or false (Default: false).

CheckRegions List<string>

A list of regions from which to run health checks. If not set Cloudflare will pick a default region. Valid values: WNAM, ENAM, WEU, EEU, NSAM, SSAM, OC, ME, NAF, SAF, IN, SEAS, NEAS, ALL_REGIONS.

ConsecutiveFails int

The number of consecutive fails required from a health check before changing the health to unhealthy. (Default: 1)

ConsecutiveSuccesses int

The number of consecutive successes required from a health check before changing the health to healthy. (Default: 1)

CreatedOn string
Description string

A human-readable description of the health check.

ExpectedBody string

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.

ExpectedCodes List<string>

The expected HTTP response codes (e.g. “200”) or code ranges (e.g. “2xx” for all codes starting with 2) of the health check. (Default: ["200"])

FollowRedirects bool

Follow redirects if the origin returns a 3xx status code. Valid values: true or false (Default: false).

Headers List<HealthcheckHeaderArgs>

The header name.

Interval int

The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations. (Default: 60)

Method string

The TCP connection method to use for the health check. Valid values: connection_established (Default: connection_established).

ModifiedOn string
Name string

A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.

NotificationEmailAddresses List<string>

A list of email addresses we want to send the notifications to.

NotificationSuspended bool

Whether the notifications are suspended or not. Useful for maintenance periods. Valid values: true or false (Default: false).

Path string

The endpoint path to health check against. (Default: /)

Port int

Port number to connect to for the health check. Valid values are in the range 0-65535 (Default: 80).

Retries int

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. (Default: 2)

Suspended bool

If suspended, no health checks are sent to the origin. Valid values: true or false (Default: false).

Timeout int

The timeout (in seconds) before marking the health check as failed. (Default: 5)

Type string

The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.

ZoneId string

The DNS zone ID to which apply settings.

Address string

The hostname or IP address of the origin server to run health checks on.

AllowInsecure bool

Do not validate the certificate when the health check uses HTTPS. Valid values: true or false (Default: false).

CheckRegions []string

A list of regions from which to run health checks. If not set Cloudflare will pick a default region. Valid values: WNAM, ENAM, WEU, EEU, NSAM, SSAM, OC, ME, NAF, SAF, IN, SEAS, NEAS, ALL_REGIONS.

ConsecutiveFails int

The number of consecutive fails required from a health check before changing the health to unhealthy. (Default: 1)

ConsecutiveSuccesses int

The number of consecutive successes required from a health check before changing the health to healthy. (Default: 1)

CreatedOn string
Description string

A human-readable description of the health check.

ExpectedBody string

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.

ExpectedCodes []string

The expected HTTP response codes (e.g. “200”) or code ranges (e.g. “2xx” for all codes starting with 2) of the health check. (Default: ["200"])

FollowRedirects bool

Follow redirects if the origin returns a 3xx status code. Valid values: true or false (Default: false).

Headers []HealthcheckHeader

The header name.

Interval int

The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations. (Default: 60)

Method string

The TCP connection method to use for the health check. Valid values: connection_established (Default: connection_established).

ModifiedOn string
Name string

A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.

NotificationEmailAddresses []string

A list of email addresses we want to send the notifications to.

NotificationSuspended bool

Whether the notifications are suspended or not. Useful for maintenance periods. Valid values: true or false (Default: false).

Path string

The endpoint path to health check against. (Default: /)

Port int

Port number to connect to for the health check. Valid values are in the range 0-65535 (Default: 80).

Retries int

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. (Default: 2)

Suspended bool

If suspended, no health checks are sent to the origin. Valid values: true or false (Default: false).

Timeout int

The timeout (in seconds) before marking the health check as failed. (Default: 5)

Type string

The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.

ZoneId string

The DNS zone ID to which apply settings.

address string

The hostname or IP address of the origin server to run health checks on.

allowInsecure boolean

Do not validate the certificate when the health check uses HTTPS. Valid values: true or false (Default: false).

checkRegions string[]

A list of regions from which to run health checks. If not set Cloudflare will pick a default region. Valid values: WNAM, ENAM, WEU, EEU, NSAM, SSAM, OC, ME, NAF, SAF, IN, SEAS, NEAS, ALL_REGIONS.

consecutiveFails number

The number of consecutive fails required from a health check before changing the health to unhealthy. (Default: 1)

consecutiveSuccesses number

The number of consecutive successes required from a health check before changing the health to healthy. (Default: 1)

createdOn string
description string

A human-readable description of the health check.

expectedBody string

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.

expectedCodes string[]

The expected HTTP response codes (e.g. “200”) or code ranges (e.g. “2xx” for all codes starting with 2) of the health check. (Default: ["200"])

followRedirects boolean

Follow redirects if the origin returns a 3xx status code. Valid values: true or false (Default: false).

headers HealthcheckHeader[]

The header name.

interval number

The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations. (Default: 60)

method string

The TCP connection method to use for the health check. Valid values: connection_established (Default: connection_established).

modifiedOn string
name string

A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.

notificationEmailAddresses string[]

A list of email addresses we want to send the notifications to.

notificationSuspended boolean

Whether the notifications are suspended or not. Useful for maintenance periods. Valid values: true or false (Default: false).

path string

The endpoint path to health check against. (Default: /)

port number

Port number to connect to for the health check. Valid values are in the range 0-65535 (Default: 80).

retries number

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. (Default: 2)

suspended boolean

If suspended, no health checks are sent to the origin. Valid values: true or false (Default: false).

timeout number

The timeout (in seconds) before marking the health check as failed. (Default: 5)

type string

The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.

zoneId string

The DNS zone ID to which apply settings.

address str

The hostname or IP address of the origin server to run health checks on.

allow_insecure bool

Do not validate the certificate when the health check uses HTTPS. Valid values: true or false (Default: false).

check_regions Sequence[str]

A list of regions from which to run health checks. If not set Cloudflare will pick a default region. Valid values: WNAM, ENAM, WEU, EEU, NSAM, SSAM, OC, ME, NAF, SAF, IN, SEAS, NEAS, ALL_REGIONS.

consecutive_fails int

The number of consecutive fails required from a health check before changing the health to unhealthy. (Default: 1)

consecutive_successes int

The number of consecutive successes required from a health check before changing the health to healthy. (Default: 1)

created_on str
description str

A human-readable description of the health check.

expected_body str

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 Sequence[str]

The expected HTTP response codes (e.g. “200”) or code ranges (e.g. “2xx” for all codes starting with 2) of the health check. (Default: ["200"])

follow_redirects bool

Follow redirects if the origin returns a 3xx status code. Valid values: true or false (Default: false).

headers Sequence[HealthcheckHeaderArgs]

The header name.

interval int

The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations. (Default: 60)

method str

The TCP connection method to use for the health check. Valid values: connection_established (Default: connection_established).

modified_on str
name str

A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.

notification_email_addresses Sequence[str]

A list of email addresses we want to send the notifications to.

notification_suspended bool

Whether the notifications are suspended or not. Useful for maintenance periods. Valid values: true or false (Default: false).

path str

The endpoint path to health check against. (Default: /)

port int

Port number to connect to for the health check. Valid values are in the range 0-65535 (Default: 80).

retries int

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. (Default: 2)

suspended bool

If suspended, no health checks are sent to the origin. Valid values: true or false (Default: false).

timeout int

The timeout (in seconds) before marking the health check as failed. (Default: 5)

type str

The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.

zone_id str

The DNS zone ID to which apply settings.

Supporting Types

HealthcheckHeader

Header string

The header name.

Values List<string>

A list of string values for the header.

Header string

The header name.

Values []string

A list of string values for the header.

header string

The header name.

values string[]

A list of string values for the header.

header str

The header name.

values Sequence[str]

A list of string values for the header.

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.