1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. Healthcheck
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.Healthcheck

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      exampleHealthcheck:
        type: cloudflare:Healthcheck
        name: example_healthcheck
        properties:
          zoneId: 023e105f4ecef8ad9ca31a8372d0c353
          address: www.example.com
          name: server-1
          checkRegions:
            - WEU
            - ENAM
          consecutiveFails: 0
          consecutiveSuccesses: 0
          description: Health check for www.example.com
          httpConfig:
            allow_insecure: true
            expected_body: success
            expected_codes:
              - 2xx
              - '302'
            follow_redirects: true
            header:
              host:
                - example.com
              x-App-ID:
                - abc123
            method: GET
            path: /health
            port: 0
          interval: 0
          retries: 0
          suspended: true
          tcpConfig:
            method: connection_established
            port: 0
          timeout: 0
          type: HTTPS
    

    Create Healthcheck Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Healthcheck(name: string, args: HealthcheckArgs, opts?: CustomResourceOptions);
    @overload
    def Healthcheck(resource_name: str,
                    args: HealthcheckArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Healthcheck(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    address: Optional[str] = None,
                    zone_id: Optional[str] = None,
                    name: Optional[str] = None,
                    interval: Optional[int] = None,
                    description: Optional[str] = None,
                    http_config: Optional[HealthcheckHttpConfigArgs] = None,
                    consecutive_successes: Optional[int] = None,
                    consecutive_fails: Optional[int] = None,
                    retries: Optional[int] = None,
                    suspended: Optional[bool] = None,
                    tcp_config: Optional[HealthcheckTcpConfigArgs] = None,
                    timeout: Optional[int] = None,
                    type: Optional[str] = None,
                    check_regions: Optional[Sequence[str]] = None)
    func NewHealthcheck(ctx *Context, name string, args HealthcheckArgs, opts ...ResourceOption) (*Healthcheck, error)
    public Healthcheck(string name, HealthcheckArgs args, CustomResourceOptions? opts = null)
    public Healthcheck(String name, HealthcheckArgs args)
    public Healthcheck(String name, HealthcheckArgs args, CustomResourceOptions options)
    
    type: cloudflare:Healthcheck
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    args HealthcheckArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control 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.
    name String
    The unique name of the resource.
    args HealthcheckArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var healthcheckResource = new Cloudflare.Healthcheck("healthcheckResource", new()
    {
        Address = "string",
        ZoneId = "string",
        Name = "string",
        Interval = 0,
        Description = "string",
        HttpConfig = new Cloudflare.Inputs.HealthcheckHttpConfigArgs
        {
            AllowInsecure = false,
            ExpectedBody = "string",
            ExpectedCodes = new[]
            {
                "string",
            },
            FollowRedirects = false,
            Header = 
            {
                { "string", new[]
                {
                    "string",
                } },
            },
            Method = "string",
            Path = "string",
            Port = 0,
        },
        ConsecutiveSuccesses = 0,
        ConsecutiveFails = 0,
        Retries = 0,
        Suspended = false,
        TcpConfig = new Cloudflare.Inputs.HealthcheckTcpConfigArgs
        {
            Method = "string",
            Port = 0,
        },
        Timeout = 0,
        Type = "string",
        CheckRegions = new[]
        {
            "string",
        },
    });
    
    example, err := cloudflare.NewHealthcheck(ctx, "healthcheckResource", &cloudflare.HealthcheckArgs{
    	Address:     pulumi.String("string"),
    	ZoneId:      pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Interval:    pulumi.Int(0),
    	Description: pulumi.String("string"),
    	HttpConfig: &cloudflare.HealthcheckHttpConfigArgs{
    		AllowInsecure: pulumi.Bool(false),
    		ExpectedBody:  pulumi.String("string"),
    		ExpectedCodes: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		FollowRedirects: pulumi.Bool(false),
    		Header: pulumi.StringArrayMap{
    			"string": pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		Method: pulumi.String("string"),
    		Path:   pulumi.String("string"),
    		Port:   pulumi.Int(0),
    	},
    	ConsecutiveSuccesses: pulumi.Int(0),
    	ConsecutiveFails:     pulumi.Int(0),
    	Retries:              pulumi.Int(0),
    	Suspended:            pulumi.Bool(false),
    	TcpConfig: &cloudflare.HealthcheckTcpConfigArgs{
    		Method: pulumi.String("string"),
    		Port:   pulumi.Int(0),
    	},
    	Timeout: pulumi.Int(0),
    	Type:    pulumi.String("string"),
    	CheckRegions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var healthcheckResource = new Healthcheck("healthcheckResource", HealthcheckArgs.builder()
        .address("string")
        .zoneId("string")
        .name("string")
        .interval(0)
        .description("string")
        .httpConfig(HealthcheckHttpConfigArgs.builder()
            .allowInsecure(false)
            .expectedBody("string")
            .expectedCodes("string")
            .followRedirects(false)
            .header(Map.of("string", "string"))
            .method("string")
            .path("string")
            .port(0)
            .build())
        .consecutiveSuccesses(0)
        .consecutiveFails(0)
        .retries(0)
        .suspended(false)
        .tcpConfig(HealthcheckTcpConfigArgs.builder()
            .method("string")
            .port(0)
            .build())
        .timeout(0)
        .type("string")
        .checkRegions("string")
        .build());
    
    healthcheck_resource = cloudflare.Healthcheck("healthcheckResource",
        address="string",
        zone_id="string",
        name="string",
        interval=0,
        description="string",
        http_config={
            "allow_insecure": False,
            "expected_body": "string",
            "expected_codes": ["string"],
            "follow_redirects": False,
            "header": {
                "string": ["string"],
            },
            "method": "string",
            "path": "string",
            "port": 0,
        },
        consecutive_successes=0,
        consecutive_fails=0,
        retries=0,
        suspended=False,
        tcp_config={
            "method": "string",
            "port": 0,
        },
        timeout=0,
        type="string",
        check_regions=["string"])
    
    const healthcheckResource = new cloudflare.Healthcheck("healthcheckResource", {
        address: "string",
        zoneId: "string",
        name: "string",
        interval: 0,
        description: "string",
        httpConfig: {
            allowInsecure: false,
            expectedBody: "string",
            expectedCodes: ["string"],
            followRedirects: false,
            header: {
                string: ["string"],
            },
            method: "string",
            path: "string",
            port: 0,
        },
        consecutiveSuccesses: 0,
        consecutiveFails: 0,
        retries: 0,
        suspended: false,
        tcpConfig: {
            method: "string",
            port: 0,
        },
        timeout: 0,
        type: "string",
        checkRegions: ["string"],
    });
    
    type: cloudflare:Healthcheck
    properties:
        address: string
        checkRegions:
            - string
        consecutiveFails: 0
        consecutiveSuccesses: 0
        description: string
        httpConfig:
            allowInsecure: false
            expectedBody: string
            expectedCodes:
                - string
            followRedirects: false
            header:
                string:
                    - string
            method: string
            path: string
            port: 0
        interval: 0
        name: string
        retries: 0
        suspended: false
        tcpConfig:
            method: string
            port: 0
        timeout: 0
        type: string
        zoneId: string
    

    Healthcheck Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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.
    ZoneId string
    Identifier
    CheckRegions List<string>
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    ConsecutiveFails int
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    ConsecutiveSuccesses int
    The number of consecutive successes required from a health check before changing the health to healthy.
    Description string
    A human-readable description of the health check.
    HttpConfig HealthcheckHttpConfig
    Parameters specific to an HTTP or HTTPS health check.
    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.
    Retries int
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    Suspended bool
    If suspended, no health checks are sent to the origin.
    TcpConfig HealthcheckTcpConfig
    Parameters specific to TCP health check.
    Timeout int
    The timeout (in seconds) before marking the health check as failed.
    Type string
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
    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.
    ZoneId string
    Identifier
    CheckRegions []string
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    ConsecutiveFails int
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    ConsecutiveSuccesses int
    The number of consecutive successes required from a health check before changing the health to healthy.
    Description string
    A human-readable description of the health check.
    HttpConfig HealthcheckHttpConfigArgs
    Parameters specific to an HTTP or HTTPS health check.
    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.
    Retries int
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    Suspended bool
    If suspended, no health checks are sent to the origin.
    TcpConfig HealthcheckTcpConfigArgs
    Parameters specific to TCP health check.
    Timeout int
    The timeout (in seconds) before marking the health check as failed.
    Type string
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
    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.
    zoneId String
    Identifier
    checkRegions List<String>
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    consecutiveFails Integer
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    consecutiveSuccesses Integer
    The number of consecutive successes required from a health check before changing the health to healthy.
    description String
    A human-readable description of the health check.
    httpConfig HealthcheckHttpConfig
    Parameters specific to an HTTP or HTTPS health check.
    interval Integer
    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.
    retries Integer
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    suspended Boolean
    If suspended, no health checks are sent to the origin.
    tcpConfig HealthcheckTcpConfig
    Parameters specific to TCP health check.
    timeout Integer
    The timeout (in seconds) before marking the health check as failed.
    type String
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
    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.
    zoneId string
    Identifier
    checkRegions string[]
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    consecutiveFails number
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    consecutiveSuccesses number
    The number of consecutive successes required from a health check before changing the health to healthy.
    description string
    A human-readable description of the health check.
    httpConfig HealthcheckHttpConfig
    Parameters specific to an HTTP or HTTPS health check.
    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.
    retries number
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    suspended boolean
    If suspended, no health checks are sent to the origin.
    tcpConfig HealthcheckTcpConfig
    Parameters specific to TCP health check.
    timeout number
    The timeout (in seconds) before marking the health check as failed.
    type string
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
    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.
    zone_id str
    Identifier
    check_regions Sequence[str]
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    consecutive_fails int
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    consecutive_successes int
    The number of consecutive successes required from a health check before changing the health to healthy.
    description str
    A human-readable description of the health check.
    http_config HealthcheckHttpConfigArgs
    Parameters specific to an HTTP or HTTPS health check.
    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.
    retries int
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    suspended bool
    If suspended, no health checks are sent to the origin.
    tcp_config HealthcheckTcpConfigArgs
    Parameters specific to TCP health check.
    timeout int
    The timeout (in seconds) before marking the health check as failed.
    type str
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
    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.
    zoneId String
    Identifier
    checkRegions List<String>
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    consecutiveFails Number
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    consecutiveSuccesses Number
    The number of consecutive successes required from a health check before changing the health to healthy.
    description String
    A human-readable description of the health check.
    httpConfig Property Map
    Parameters specific to an HTTP or HTTPS health check.
    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.
    retries Number
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    suspended Boolean
    If suspended, no health checks are sent to the origin.
    tcpConfig Property Map
    Parameters specific to TCP health check.
    timeout Number
    The timeout (in seconds) before marking the health check as failed.
    type String
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.

    Outputs

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

    CreatedOn string
    FailureReason string
    The current failure reason if status is unhealthy.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    Status string
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
    CreatedOn string
    FailureReason string
    The current failure reason if status is unhealthy.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    Status string
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
    createdOn String
    failureReason String
    The current failure reason if status is unhealthy.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    status String
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
    createdOn string
    failureReason string
    The current failure reason if status is unhealthy.
    id string
    The provider-assigned unique ID for this managed resource.
    modifiedOn string
    status string
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
    created_on str
    failure_reason str
    The current failure reason if status is unhealthy.
    id str
    The provider-assigned unique ID for this managed resource.
    modified_on str
    status str
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
    createdOn String
    failureReason String
    The current failure reason if status is unhealthy.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    status String
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".

    Look up 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,
            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,
            failure_reason: Optional[str] = None,
            http_config: Optional[HealthcheckHttpConfigArgs] = None,
            interval: Optional[int] = None,
            modified_on: Optional[str] = None,
            name: Optional[str] = None,
            retries: Optional[int] = None,
            status: Optional[str] = None,
            suspended: Optional[bool] = None,
            tcp_config: Optional[HealthcheckTcpConfigArgs] = 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)
    public static Healthcheck get(String name, Output<String> id, HealthcheckState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:Healthcheck    get:      id: ${id}
    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.
    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.
    CheckRegions List<string>
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    ConsecutiveFails int
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    ConsecutiveSuccesses int
    The number of consecutive successes required from a health check before changing the health to healthy.
    CreatedOn string
    Description string
    A human-readable description of the health check.
    FailureReason string
    The current failure reason if status is unhealthy.
    HttpConfig HealthcheckHttpConfig
    Parameters specific to an HTTP or HTTPS health check.
    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.
    ModifiedOn string
    Name string
    A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
    Retries int
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    Status string
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
    Suspended bool
    If suspended, no health checks are sent to the origin.
    TcpConfig HealthcheckTcpConfig
    Parameters specific to TCP health check.
    Timeout int
    The timeout (in seconds) before marking the health check as failed.
    Type string
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
    ZoneId string
    Identifier
    Address string
    The hostname or IP address of the origin server to run health checks on.
    CheckRegions []string
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    ConsecutiveFails int
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    ConsecutiveSuccesses int
    The number of consecutive successes required from a health check before changing the health to healthy.
    CreatedOn string
    Description string
    A human-readable description of the health check.
    FailureReason string
    The current failure reason if status is unhealthy.
    HttpConfig HealthcheckHttpConfigArgs
    Parameters specific to an HTTP or HTTPS health check.
    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.
    ModifiedOn string
    Name string
    A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
    Retries int
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    Status string
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
    Suspended bool
    If suspended, no health checks are sent to the origin.
    TcpConfig HealthcheckTcpConfigArgs
    Parameters specific to TCP health check.
    Timeout int
    The timeout (in seconds) before marking the health check as failed.
    Type string
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
    ZoneId string
    Identifier
    address String
    The hostname or IP address of the origin server to run health checks on.
    checkRegions List<String>
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    consecutiveFails Integer
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    consecutiveSuccesses Integer
    The number of consecutive successes required from a health check before changing the health to healthy.
    createdOn String
    description String
    A human-readable description of the health check.
    failureReason String
    The current failure reason if status is unhealthy.
    httpConfig HealthcheckHttpConfig
    Parameters specific to an HTTP or HTTPS health check.
    interval Integer
    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.
    modifiedOn String
    name String
    A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
    retries Integer
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    status String
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
    suspended Boolean
    If suspended, no health checks are sent to the origin.
    tcpConfig HealthcheckTcpConfig
    Parameters specific to TCP health check.
    timeout Integer
    The timeout (in seconds) before marking the health check as failed.
    type String
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
    zoneId String
    Identifier
    address string
    The hostname or IP address of the origin server to run health checks on.
    checkRegions string[]
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    consecutiveFails number
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    consecutiveSuccesses number
    The number of consecutive successes required from a health check before changing the health to healthy.
    createdOn string
    description string
    A human-readable description of the health check.
    failureReason string
    The current failure reason if status is unhealthy.
    httpConfig HealthcheckHttpConfig
    Parameters specific to an HTTP or HTTPS health check.
    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.
    modifiedOn string
    name string
    A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
    retries number
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    status string
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
    suspended boolean
    If suspended, no health checks are sent to the origin.
    tcpConfig HealthcheckTcpConfig
    Parameters specific to TCP health check.
    timeout number
    The timeout (in seconds) before marking the health check as failed.
    type string
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
    zoneId string
    Identifier
    address str
    The hostname or IP address of the origin server to run health checks on.
    check_regions Sequence[str]
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    consecutive_fails int
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    consecutive_successes int
    The number of consecutive successes required from a health check before changing the health to healthy.
    created_on str
    description str
    A human-readable description of the health check.
    failure_reason str
    The current failure reason if status is unhealthy.
    http_config HealthcheckHttpConfigArgs
    Parameters specific to an HTTP or HTTPS health check.
    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.
    modified_on str
    name str
    A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
    retries int
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    status str
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
    suspended bool
    If suspended, no health checks are sent to the origin.
    tcp_config HealthcheckTcpConfigArgs
    Parameters specific to TCP health check.
    timeout int
    The timeout (in seconds) before marking the health check as failed.
    type str
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
    zone_id str
    Identifier
    address String
    The hostname or IP address of the origin server to run health checks on.
    checkRegions List<String>
    A list of regions from which to run health checks. Null means Cloudflare will pick a default region.
    consecutiveFails Number
    The number of consecutive fails required from a health check before changing the health to unhealthy.
    consecutiveSuccesses Number
    The number of consecutive successes required from a health check before changing the health to healthy.
    createdOn String
    description String
    A human-readable description of the health check.
    failureReason String
    The current failure reason if status is unhealthy.
    httpConfig Property Map
    Parameters specific to an HTTP or HTTPS health check.
    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.
    modifiedOn String
    name String
    A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.
    retries Number
    The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.
    status String
    The current status of the origin server according to the health check. Available values: "unknown", "healthy", "unhealthy", "suspended".
    suspended Boolean
    If suspended, no health checks are sent to the origin.
    tcpConfig Property Map
    Parameters specific to TCP health check.
    timeout Number
    The timeout (in seconds) before marking the health check as failed.
    type String
    The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.
    zoneId String
    Identifier

    Supporting Types

    HealthcheckHttpConfig, HealthcheckHttpConfigArgs

    AllowInsecure bool
    Do not validate the certificate when the health check uses HTTPS.
    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.
    FollowRedirects bool
    Follow redirects if the origin returns a 3xx status code.
    Header Dictionary<string, ImmutableArray<string>>
    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.
    Method string
    The HTTP method to use for the health check. Available values: "GET", "HEAD".
    Path string
    The endpoint path to health check against.
    Port int
    Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
    AllowInsecure bool
    Do not validate the certificate when the health check uses HTTPS.
    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.
    FollowRedirects bool
    Follow redirects if the origin returns a 3xx status code.
    Header map[string][]string
    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.
    Method string
    The HTTP method to use for the health check. Available values: "GET", "HEAD".
    Path string
    The endpoint path to health check against.
    Port int
    Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
    allowInsecure Boolean
    Do not validate the certificate when the health check uses HTTPS.
    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.
    followRedirects Boolean
    Follow redirects if the origin returns a 3xx status code.
    header Map<String,List<String>>
    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.
    method String
    The HTTP method to use for the health check. Available values: "GET", "HEAD".
    path String
    The endpoint path to health check against.
    port Integer
    Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
    allowInsecure boolean
    Do not validate the certificate when the health check uses HTTPS.
    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.
    followRedirects boolean
    Follow redirects if the origin returns a 3xx status code.
    header {[key: string]: string[]}
    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.
    method string
    The HTTP method to use for the health check. Available values: "GET", "HEAD".
    path string
    The endpoint path to health check against.
    port number
    Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
    allow_insecure bool
    Do not validate the certificate when the health check uses HTTPS.
    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.
    follow_redirects bool
    Follow redirects if the origin returns a 3xx status code.
    header Mapping[str, Sequence[str]]
    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.
    method str
    The HTTP method to use for the health check. Available values: "GET", "HEAD".
    path str
    The endpoint path to health check against.
    port int
    Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.
    allowInsecure Boolean
    Do not validate the certificate when the health check uses HTTPS.
    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.
    followRedirects Boolean
    Follow redirects if the origin returns a 3xx status code.
    header Map<List<String>>
    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.
    method String
    The HTTP method to use for the health check. Available values: "GET", "HEAD".
    path String
    The endpoint path to health check against.
    port Number
    Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.

    HealthcheckTcpConfig, HealthcheckTcpConfigArgs

    Method string
    The TCP connection method to use for the health check. Available values: "connection_established".
    Port int
    Port number to connect to for the health check. Defaults to 80.
    Method string
    The TCP connection method to use for the health check. Available values: "connection_established".
    Port int
    Port number to connect to for the health check. Defaults to 80.
    method String
    The TCP connection method to use for the health check. Available values: "connection_established".
    port Integer
    Port number to connect to for the health check. Defaults to 80.
    method string
    The TCP connection method to use for the health check. Available values: "connection_established".
    port number
    Port number to connect to for the health check. Defaults to 80.
    method str
    The TCP connection method to use for the health check. Available values: "connection_established".
    port int
    Port number to connect to for the health check. Defaults to 80.
    method String
    The TCP connection method to use for the health check. Available values: "connection_established".
    port Number
    Port number to connect to for the health check. Defaults to 80.

    Import

    $ pulumi import cloudflare:index/healthcheck:Healthcheck example '<zone_id>/<healthcheck_id>'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi