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
.- Zone
Id string 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
orfalse
(Default:false
).- Check
Regions 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
.- 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 string
A human-readable description of the health check.
- Expected
Body 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.
- Expected
Codes 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"]
)- Follow
Redirects bool Follow redirects if the origin returns a 3xx status code. Valid values:
true
orfalse
(Default:false
).- Headers
List<Healthcheck
Header Args> 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
).- Notification
Email List<string>Addresses 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
orfalse
(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
orfalse
(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
.- Zone
Id string 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
orfalse
(Default:false
).- Check
Regions []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
.- 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 string
A human-readable description of the health check.
- Expected
Body 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.
- Expected
Codes []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"]
)- Follow
Redirects bool Follow redirects if the origin returns a 3xx status code. Valid values:
true
orfalse
(Default:false
).- Headers
[]Healthcheck
Header 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
).- Notification
Email []stringAddresses 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
orfalse
(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
orfalse
(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
.- zone
Id string The DNS zone ID to which apply settings.
- allow
Insecure boolean Do not validate the certificate when the health check uses HTTPS. Valid values:
true
orfalse
(Default:false
).- check
Regions 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
.- consecutive
Fails number The number of consecutive fails required from a health check before changing the health to unhealthy. (Default:
1
)- consecutive
Successes 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.
- expected
Body 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.
- expected
Codes 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"]
)- follow
Redirects boolean Follow redirects if the origin returns a 3xx status code. Valid values:
true
orfalse
(Default:false
).- headers
Healthcheck
Header[] 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
).- notification
Email string[]Addresses A list of email addresses we want to send the notifications to.
- notification
Suspended boolean Whether the notifications are suspended or not. Useful for maintenance periods. Valid values:
true
orfalse
(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
orfalse
(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
orfalse
(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
orfalse
(Default:false
).- headers
Sequence[Healthcheck
Header Args] 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_ Sequence[str]addresses 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
orfalse
(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
orfalse
(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:
- Created
On string - Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string
- Created
On string - Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string
- created
On string - id string
- The provider-assigned unique ID for this managed resource.
- modified
On 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.
- Allow
Insecure bool Do not validate the certificate when the health check uses HTTPS. Valid values:
true
orfalse
(Default:false
).- Check
Regions 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
.- 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 string - Description string
A human-readable description of the health check.
- Expected
Body 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.
- Expected
Codes 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"]
)- Follow
Redirects bool Follow redirects if the origin returns a 3xx status code. Valid values:
true
orfalse
(Default:false
).- Headers
List<Healthcheck
Header Args> 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
).- Modified
On string - Name string
A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- Notification
Email List<string>Addresses 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
orfalse
(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
orfalse
(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
.- Zone
Id 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.
- Allow
Insecure bool Do not validate the certificate when the health check uses HTTPS. Valid values:
true
orfalse
(Default:false
).- Check
Regions []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
.- 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 string - Description string
A human-readable description of the health check.
- Expected
Body 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.
- Expected
Codes []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"]
)- Follow
Redirects bool Follow redirects if the origin returns a 3xx status code. Valid values:
true
orfalse
(Default:false
).- Headers
[]Healthcheck
Header 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
).- Modified
On string - Name string
A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- Notification
Email []stringAddresses 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
orfalse
(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
orfalse
(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
.- Zone
Id 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.
- allow
Insecure boolean Do not validate the certificate when the health check uses HTTPS. Valid values:
true
orfalse
(Default:false
).- check
Regions 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
.- consecutive
Fails number The number of consecutive fails required from a health check before changing the health to unhealthy. (Default:
1
)- consecutive
Successes number The number of consecutive successes required from a health check before changing the health to healthy. (Default:
1
)- created
On string - description string
A human-readable description of the health check.
- expected
Body 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.
- expected
Codes 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"]
)- follow
Redirects boolean Follow redirects if the origin returns a 3xx status code. Valid values:
true
orfalse
(Default:false
).- headers
Healthcheck
Header[] 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
).- modified
On string - name string
A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
- notification
Email string[]Addresses A list of email addresses we want to send the notifications to.
- notification
Suspended boolean Whether the notifications are suspended or not. Useful for maintenance periods. Valid values:
true
orfalse
(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
orfalse
(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
.- zone
Id 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
orfalse
(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
orfalse
(Default:false
).- headers
Sequence[Healthcheck
Header Args] 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_ Sequence[str]addresses 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
orfalse
(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
orfalse
(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
Package Details
- Repository
- https://github.com/pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.