HealthCheckArgs

data class HealthCheckArgs(val checkIntervalSec: Output<Int>? = null, val description: Output<String>? = null, val grpcHealthCheck: Output<HealthCheckGrpcHealthCheckArgs>? = null, val healthyThreshold: Output<Int>? = null, val http2HealthCheck: Output<HealthCheckHttp2HealthCheckArgs>? = null, val httpHealthCheck: Output<HealthCheckHttpHealthCheckArgs>? = null, val httpsHealthCheck: Output<HealthCheckHttpsHealthCheckArgs>? = null, val logConfig: Output<HealthCheckLogConfigArgs>? = null, val name: Output<String>? = null, val project: Output<String>? = null, val sourceRegions: Output<List<String>>? = null, val sslHealthCheck: Output<HealthCheckSslHealthCheckArgs>? = null, val tcpHealthCheck: Output<HealthCheckTcpHealthCheckArgs>? = null, val timeoutSec: Output<Int>? = null, val unhealthyThreshold: Output<Int>? = null) : ConvertibleToJava<HealthCheckArgs>

Health Checks determine whether instances are responsive and able to do work. They are an important part of a comprehensive load balancing configuration, as they enable monitoring instances behind load balancers. Health Checks poll instances at a specified interval. Instances that do not respond successfully to some number of probes in a row are marked as unhealthy. No new connections are sent to unhealthy instances, though existing connections will continue. The health check will continue to poll unhealthy instances. If an instance later responds successfully to some number of consecutive probes, it is marked healthy again and can receive new connections. ~>NOTE: Legacy HTTP(S) health checks must be used for target pool-based network load balancers. See the official guide for choosing a type of health check. To get more information about HealthCheck, see:

Example Usage

Health Check Tcp

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const tcp_health_check = new gcp.compute.HealthCheck("tcp-health-check", {
name: "tcp-health-check",
timeoutSec: 1,
checkIntervalSec: 1,
tcpHealthCheck: {
port: 80,
},
});
import pulumi
import pulumi_gcp as gcp
tcp_health_check = gcp.compute.HealthCheck("tcp-health-check",
name="tcp-health-check",
timeout_sec=1,
check_interval_sec=1,
tcp_health_check={
"port": 80,
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var tcp_health_check = new Gcp.Compute.HealthCheck("tcp-health-check", new()
{
Name = "tcp-health-check",
TimeoutSec = 1,
CheckIntervalSec = 1,
TcpHealthCheck = new Gcp.Compute.Inputs.HealthCheckTcpHealthCheckArgs
{
Port = 80,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "tcp-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("tcp-health-check"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
TcpHealthCheck: &compute.HealthCheckTcpHealthCheckArgs{
Port: pulumi.Int(80),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckTcpHealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tcp_health_check = new HealthCheck("tcp-health-check", HealthCheckArgs.builder()
.name("tcp-health-check")
.timeoutSec(1)
.checkIntervalSec(1)
.tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
.port("80")
.build())
.build());
}
}
resources:
tcp-health-check:
type: gcp:compute:HealthCheck
properties:
name: tcp-health-check
timeoutSec: 1
checkIntervalSec: 1
tcpHealthCheck:
port: '80'

Health Check Tcp Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const tcp_health_check = new gcp.compute.HealthCheck("tcp-health-check", {
name: "tcp-health-check",
description: "Health check via tcp",
timeoutSec: 1,
checkIntervalSec: 1,
healthyThreshold: 4,
unhealthyThreshold: 5,
tcpHealthCheck: {
portName: "health-check-port",
portSpecification: "USE_NAMED_PORT",
request: "ARE YOU HEALTHY?",
proxyHeader: "NONE",
response: "I AM HEALTHY",
},
});
import pulumi
import pulumi_gcp as gcp
tcp_health_check = gcp.compute.HealthCheck("tcp-health-check",
name="tcp-health-check",
description="Health check via tcp",
timeout_sec=1,
check_interval_sec=1,
healthy_threshold=4,
unhealthy_threshold=5,
tcp_health_check={
"port_name": "health-check-port",
"port_specification": "USE_NAMED_PORT",
"request": "ARE YOU HEALTHY?",
"proxy_header": "NONE",
"response": "I AM HEALTHY",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var tcp_health_check = new Gcp.Compute.HealthCheck("tcp-health-check", new()
{
Name = "tcp-health-check",
Description = "Health check via tcp",
TimeoutSec = 1,
CheckIntervalSec = 1,
HealthyThreshold = 4,
UnhealthyThreshold = 5,
TcpHealthCheck = new Gcp.Compute.Inputs.HealthCheckTcpHealthCheckArgs
{
PortName = "health-check-port",
PortSpecification = "USE_NAMED_PORT",
Request = "ARE YOU HEALTHY?",
ProxyHeader = "NONE",
Response = "I AM HEALTHY",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "tcp-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("tcp-health-check"),
Description: pulumi.String("Health check via tcp"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
HealthyThreshold: pulumi.Int(4),
UnhealthyThreshold: pulumi.Int(5),
TcpHealthCheck: &compute.HealthCheckTcpHealthCheckArgs{
PortName: pulumi.String("health-check-port"),
PortSpecification: pulumi.String("USE_NAMED_PORT"),
Request: pulumi.String("ARE YOU HEALTHY?"),
ProxyHeader: pulumi.String("NONE"),
Response: pulumi.String("I AM HEALTHY"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckTcpHealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tcp_health_check = new HealthCheck("tcp-health-check", HealthCheckArgs.builder()
.name("tcp-health-check")
.description("Health check via tcp")
.timeoutSec(1)
.checkIntervalSec(1)
.healthyThreshold(4)
.unhealthyThreshold(5)
.tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
.portName("health-check-port")
.portSpecification("USE_NAMED_PORT")
.request("ARE YOU HEALTHY?")
.proxyHeader("NONE")
.response("I AM HEALTHY")
.build())
.build());
}
}
resources:
tcp-health-check:
type: gcp:compute:HealthCheck
properties:
name: tcp-health-check
description: Health check via tcp
timeoutSec: 1
checkIntervalSec: 1
healthyThreshold: 4
unhealthyThreshold: 5
tcpHealthCheck:
portName: health-check-port
portSpecification: USE_NAMED_PORT
request: ARE YOU HEALTHY?
proxyHeader: NONE
response: I AM HEALTHY

Health Check Ssl

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const ssl_health_check = new gcp.compute.HealthCheck("ssl-health-check", {
name: "ssl-health-check",
timeoutSec: 1,
checkIntervalSec: 1,
sslHealthCheck: {
port: 443,
},
});
import pulumi
import pulumi_gcp as gcp
ssl_health_check = gcp.compute.HealthCheck("ssl-health-check",
name="ssl-health-check",
timeout_sec=1,
check_interval_sec=1,
ssl_health_check={
"port": 443,
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var ssl_health_check = new Gcp.Compute.HealthCheck("ssl-health-check", new()
{
Name = "ssl-health-check",
TimeoutSec = 1,
CheckIntervalSec = 1,
SslHealthCheck = new Gcp.Compute.Inputs.HealthCheckSslHealthCheckArgs
{
Port = 443,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "ssl-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("ssl-health-check"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
SslHealthCheck: &compute.HealthCheckSslHealthCheckArgs{
Port: pulumi.Int(443),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckSslHealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var ssl_health_check = new HealthCheck("ssl-health-check", HealthCheckArgs.builder()
.name("ssl-health-check")
.timeoutSec(1)
.checkIntervalSec(1)
.sslHealthCheck(HealthCheckSslHealthCheckArgs.builder()
.port("443")
.build())
.build());
}
}
resources:
ssl-health-check:
type: gcp:compute:HealthCheck
properties:
name: ssl-health-check
timeoutSec: 1
checkIntervalSec: 1
sslHealthCheck:
port: '443'

Health Check Ssl Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const ssl_health_check = new gcp.compute.HealthCheck("ssl-health-check", {
name: "ssl-health-check",
description: "Health check via ssl",
timeoutSec: 1,
checkIntervalSec: 1,
healthyThreshold: 4,
unhealthyThreshold: 5,
sslHealthCheck: {
portName: "health-check-port",
portSpecification: "USE_NAMED_PORT",
request: "ARE YOU HEALTHY?",
proxyHeader: "NONE",
response: "I AM HEALTHY",
},
});
import pulumi
import pulumi_gcp as gcp
ssl_health_check = gcp.compute.HealthCheck("ssl-health-check",
name="ssl-health-check",
description="Health check via ssl",
timeout_sec=1,
check_interval_sec=1,
healthy_threshold=4,
unhealthy_threshold=5,
ssl_health_check={
"port_name": "health-check-port",
"port_specification": "USE_NAMED_PORT",
"request": "ARE YOU HEALTHY?",
"proxy_header": "NONE",
"response": "I AM HEALTHY",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var ssl_health_check = new Gcp.Compute.HealthCheck("ssl-health-check", new()
{
Name = "ssl-health-check",
Description = "Health check via ssl",
TimeoutSec = 1,
CheckIntervalSec = 1,
HealthyThreshold = 4,
UnhealthyThreshold = 5,
SslHealthCheck = new Gcp.Compute.Inputs.HealthCheckSslHealthCheckArgs
{
PortName = "health-check-port",
PortSpecification = "USE_NAMED_PORT",
Request = "ARE YOU HEALTHY?",
ProxyHeader = "NONE",
Response = "I AM HEALTHY",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "ssl-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("ssl-health-check"),
Description: pulumi.String("Health check via ssl"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
HealthyThreshold: pulumi.Int(4),
UnhealthyThreshold: pulumi.Int(5),
SslHealthCheck: &compute.HealthCheckSslHealthCheckArgs{
PortName: pulumi.String("health-check-port"),
PortSpecification: pulumi.String("USE_NAMED_PORT"),
Request: pulumi.String("ARE YOU HEALTHY?"),
ProxyHeader: pulumi.String("NONE"),
Response: pulumi.String("I AM HEALTHY"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckSslHealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var ssl_health_check = new HealthCheck("ssl-health-check", HealthCheckArgs.builder()
.name("ssl-health-check")
.description("Health check via ssl")
.timeoutSec(1)
.checkIntervalSec(1)
.healthyThreshold(4)
.unhealthyThreshold(5)
.sslHealthCheck(HealthCheckSslHealthCheckArgs.builder()
.portName("health-check-port")
.portSpecification("USE_NAMED_PORT")
.request("ARE YOU HEALTHY?")
.proxyHeader("NONE")
.response("I AM HEALTHY")
.build())
.build());
}
}
resources:
ssl-health-check:
type: gcp:compute:HealthCheck
properties:
name: ssl-health-check
description: Health check via ssl
timeoutSec: 1
checkIntervalSec: 1
healthyThreshold: 4
unhealthyThreshold: 5
sslHealthCheck:
portName: health-check-port
portSpecification: USE_NAMED_PORT
request: ARE YOU HEALTHY?
proxyHeader: NONE
response: I AM HEALTHY

Health Check Http

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const http_health_check = new gcp.compute.HealthCheck("http-health-check", {
name: "http-health-check",
timeoutSec: 1,
checkIntervalSec: 1,
httpHealthCheck: {
port: 80,
},
});
import pulumi
import pulumi_gcp as gcp
http_health_check = gcp.compute.HealthCheck("http-health-check",
name="http-health-check",
timeout_sec=1,
check_interval_sec=1,
http_health_check={
"port": 80,
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var http_health_check = new Gcp.Compute.HealthCheck("http-health-check", new()
{
Name = "http-health-check",
TimeoutSec = 1,
CheckIntervalSec = 1,
HttpHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpHealthCheckArgs
{
Port = 80,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "http-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("http-health-check"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
HttpHealthCheck: &compute.HealthCheckHttpHealthCheckArgs{
Port: pulumi.Int(80),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckHttpHealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var http_health_check = new HealthCheck("http-health-check", HealthCheckArgs.builder()
.name("http-health-check")
.timeoutSec(1)
.checkIntervalSec(1)
.httpHealthCheck(HealthCheckHttpHealthCheckArgs.builder()
.port(80)
.build())
.build());
}
}
resources:
http-health-check:
type: gcp:compute:HealthCheck
properties:
name: http-health-check
timeoutSec: 1
checkIntervalSec: 1
httpHealthCheck:
port: 80

Health Check Http Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const http_health_check = new gcp.compute.HealthCheck("http-health-check", {
name: "http-health-check",
description: "Health check via http",
timeoutSec: 1,
checkIntervalSec: 1,
healthyThreshold: 4,
unhealthyThreshold: 5,
httpHealthCheck: {
portName: "health-check-port",
portSpecification: "USE_NAMED_PORT",
host: "1.2.3.4",
requestPath: "/mypath",
proxyHeader: "NONE",
response: "I AM HEALTHY",
},
});
import pulumi
import pulumi_gcp as gcp
http_health_check = gcp.compute.HealthCheck("http-health-check",
name="http-health-check",
description="Health check via http",
timeout_sec=1,
check_interval_sec=1,
healthy_threshold=4,
unhealthy_threshold=5,
http_health_check={
"port_name": "health-check-port",
"port_specification": "USE_NAMED_PORT",
"host": "1.2.3.4",
"request_path": "/mypath",
"proxy_header": "NONE",
"response": "I AM HEALTHY",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var http_health_check = new Gcp.Compute.HealthCheck("http-health-check", new()
{
Name = "http-health-check",
Description = "Health check via http",
TimeoutSec = 1,
CheckIntervalSec = 1,
HealthyThreshold = 4,
UnhealthyThreshold = 5,
HttpHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpHealthCheckArgs
{
PortName = "health-check-port",
PortSpecification = "USE_NAMED_PORT",
Host = "1.2.3.4",
RequestPath = "/mypath",
ProxyHeader = "NONE",
Response = "I AM HEALTHY",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "http-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("http-health-check"),
Description: pulumi.String("Health check via http"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
HealthyThreshold: pulumi.Int(4),
UnhealthyThreshold: pulumi.Int(5),
HttpHealthCheck: &compute.HealthCheckHttpHealthCheckArgs{
PortName: pulumi.String("health-check-port"),
PortSpecification: pulumi.String("USE_NAMED_PORT"),
Host: pulumi.String("1.2.3.4"),
RequestPath: pulumi.String("/mypath"),
ProxyHeader: pulumi.String("NONE"),
Response: pulumi.String("I AM HEALTHY"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckHttpHealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var http_health_check = new HealthCheck("http-health-check", HealthCheckArgs.builder()
.name("http-health-check")
.description("Health check via http")
.timeoutSec(1)
.checkIntervalSec(1)
.healthyThreshold(4)
.unhealthyThreshold(5)
.httpHealthCheck(HealthCheckHttpHealthCheckArgs.builder()
.portName("health-check-port")
.portSpecification("USE_NAMED_PORT")
.host("1.2.3.4")
.requestPath("/mypath")
.proxyHeader("NONE")
.response("I AM HEALTHY")
.build())
.build());
}
}
resources:
http-health-check:
type: gcp:compute:HealthCheck
properties:
name: http-health-check
description: Health check via http
timeoutSec: 1
checkIntervalSec: 1
healthyThreshold: 4
unhealthyThreshold: 5
httpHealthCheck:
portName: health-check-port
portSpecification: USE_NAMED_PORT
host: 1.2.3.4
requestPath: /mypath
proxyHeader: NONE
response: I AM HEALTHY

Health Check Https

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const https_health_check = new gcp.compute.HealthCheck("https-health-check", {
name: "https-health-check",
timeoutSec: 1,
checkIntervalSec: 1,
httpsHealthCheck: {
port: 443,
},
});
import pulumi
import pulumi_gcp as gcp
https_health_check = gcp.compute.HealthCheck("https-health-check",
name="https-health-check",
timeout_sec=1,
check_interval_sec=1,
https_health_check={
"port": 443,
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var https_health_check = new Gcp.Compute.HealthCheck("https-health-check", new()
{
Name = "https-health-check",
TimeoutSec = 1,
CheckIntervalSec = 1,
HttpsHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpsHealthCheckArgs
{
Port = 443,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "https-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("https-health-check"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
HttpsHealthCheck: &compute.HealthCheckHttpsHealthCheckArgs{
Port: pulumi.Int(443),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckHttpsHealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var https_health_check = new HealthCheck("https-health-check", HealthCheckArgs.builder()
.name("https-health-check")
.timeoutSec(1)
.checkIntervalSec(1)
.httpsHealthCheck(HealthCheckHttpsHealthCheckArgs.builder()
.port("443")
.build())
.build());
}
}
resources:
https-health-check:
type: gcp:compute:HealthCheck
properties:
name: https-health-check
timeoutSec: 1
checkIntervalSec: 1
httpsHealthCheck:
port: '443'

Health Check Https Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const https_health_check = new gcp.compute.HealthCheck("https-health-check", {
name: "https-health-check",
description: "Health check via https",
timeoutSec: 1,
checkIntervalSec: 1,
healthyThreshold: 4,
unhealthyThreshold: 5,
httpsHealthCheck: {
portName: "health-check-port",
portSpecification: "USE_NAMED_PORT",
host: "1.2.3.4",
requestPath: "/mypath",
proxyHeader: "NONE",
response: "I AM HEALTHY",
},
});
import pulumi
import pulumi_gcp as gcp
https_health_check = gcp.compute.HealthCheck("https-health-check",
name="https-health-check",
description="Health check via https",
timeout_sec=1,
check_interval_sec=1,
healthy_threshold=4,
unhealthy_threshold=5,
https_health_check={
"port_name": "health-check-port",
"port_specification": "USE_NAMED_PORT",
"host": "1.2.3.4",
"request_path": "/mypath",
"proxy_header": "NONE",
"response": "I AM HEALTHY",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var https_health_check = new Gcp.Compute.HealthCheck("https-health-check", new()
{
Name = "https-health-check",
Description = "Health check via https",
TimeoutSec = 1,
CheckIntervalSec = 1,
HealthyThreshold = 4,
UnhealthyThreshold = 5,
HttpsHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpsHealthCheckArgs
{
PortName = "health-check-port",
PortSpecification = "USE_NAMED_PORT",
Host = "1.2.3.4",
RequestPath = "/mypath",
ProxyHeader = "NONE",
Response = "I AM HEALTHY",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "https-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("https-health-check"),
Description: pulumi.String("Health check via https"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
HealthyThreshold: pulumi.Int(4),
UnhealthyThreshold: pulumi.Int(5),
HttpsHealthCheck: &compute.HealthCheckHttpsHealthCheckArgs{
PortName: pulumi.String("health-check-port"),
PortSpecification: pulumi.String("USE_NAMED_PORT"),
Host: pulumi.String("1.2.3.4"),
RequestPath: pulumi.String("/mypath"),
ProxyHeader: pulumi.String("NONE"),
Response: pulumi.String("I AM HEALTHY"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckHttpsHealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var https_health_check = new HealthCheck("https-health-check", HealthCheckArgs.builder()
.name("https-health-check")
.description("Health check via https")
.timeoutSec(1)
.checkIntervalSec(1)
.healthyThreshold(4)
.unhealthyThreshold(5)
.httpsHealthCheck(HealthCheckHttpsHealthCheckArgs.builder()
.portName("health-check-port")
.portSpecification("USE_NAMED_PORT")
.host("1.2.3.4")
.requestPath("/mypath")
.proxyHeader("NONE")
.response("I AM HEALTHY")
.build())
.build());
}
}
resources:
https-health-check:
type: gcp:compute:HealthCheck
properties:
name: https-health-check
description: Health check via https
timeoutSec: 1
checkIntervalSec: 1
healthyThreshold: 4
unhealthyThreshold: 5
httpsHealthCheck:
portName: health-check-port
portSpecification: USE_NAMED_PORT
host: 1.2.3.4
requestPath: /mypath
proxyHeader: NONE
response: I AM HEALTHY

Health Check Http2

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const http2_health_check = new gcp.compute.HealthCheck("http2-health-check", {
name: "http2-health-check",
timeoutSec: 1,
checkIntervalSec: 1,
http2HealthCheck: {
port: 443,
},
});
import pulumi
import pulumi_gcp as gcp
http2_health_check = gcp.compute.HealthCheck("http2-health-check",
name="http2-health-check",
timeout_sec=1,
check_interval_sec=1,
http2_health_check={
"port": 443,
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var http2_health_check = new Gcp.Compute.HealthCheck("http2-health-check", new()
{
Name = "http2-health-check",
TimeoutSec = 1,
CheckIntervalSec = 1,
Http2HealthCheck = new Gcp.Compute.Inputs.HealthCheckHttp2HealthCheckArgs
{
Port = 443,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "http2-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("http2-health-check"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
Http2HealthCheck: &compute.HealthCheckHttp2HealthCheckArgs{
Port: pulumi.Int(443),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckHttp2HealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var http2_health_check = new HealthCheck("http2-health-check", HealthCheckArgs.builder()
.name("http2-health-check")
.timeoutSec(1)
.checkIntervalSec(1)
.http2HealthCheck(HealthCheckHttp2HealthCheckArgs.builder()
.port("443")
.build())
.build());
}
}
resources:
http2-health-check:
type: gcp:compute:HealthCheck
properties:
name: http2-health-check
timeoutSec: 1
checkIntervalSec: 1
http2HealthCheck:
port: '443'

Health Check Http2 Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const http2_health_check = new gcp.compute.HealthCheck("http2-health-check", {
name: "http2-health-check",
description: "Health check via http2",
timeoutSec: 1,
checkIntervalSec: 1,
healthyThreshold: 4,
unhealthyThreshold: 5,
http2HealthCheck: {
portName: "health-check-port",
portSpecification: "USE_NAMED_PORT",
host: "1.2.3.4",
requestPath: "/mypath",
proxyHeader: "NONE",
response: "I AM HEALTHY",
},
});
import pulumi
import pulumi_gcp as gcp
http2_health_check = gcp.compute.HealthCheck("http2-health-check",
name="http2-health-check",
description="Health check via http2",
timeout_sec=1,
check_interval_sec=1,
healthy_threshold=4,
unhealthy_threshold=5,
http2_health_check={
"port_name": "health-check-port",
"port_specification": "USE_NAMED_PORT",
"host": "1.2.3.4",
"request_path": "/mypath",
"proxy_header": "NONE",
"response": "I AM HEALTHY",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var http2_health_check = new Gcp.Compute.HealthCheck("http2-health-check", new()
{
Name = "http2-health-check",
Description = "Health check via http2",
TimeoutSec = 1,
CheckIntervalSec = 1,
HealthyThreshold = 4,
UnhealthyThreshold = 5,
Http2HealthCheck = new Gcp.Compute.Inputs.HealthCheckHttp2HealthCheckArgs
{
PortName = "health-check-port",
PortSpecification = "USE_NAMED_PORT",
Host = "1.2.3.4",
RequestPath = "/mypath",
ProxyHeader = "NONE",
Response = "I AM HEALTHY",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "http2-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("http2-health-check"),
Description: pulumi.String("Health check via http2"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
HealthyThreshold: pulumi.Int(4),
UnhealthyThreshold: pulumi.Int(5),
Http2HealthCheck: &compute.HealthCheckHttp2HealthCheckArgs{
PortName: pulumi.String("health-check-port"),
PortSpecification: pulumi.String("USE_NAMED_PORT"),
Host: pulumi.String("1.2.3.4"),
RequestPath: pulumi.String("/mypath"),
ProxyHeader: pulumi.String("NONE"),
Response: pulumi.String("I AM HEALTHY"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckHttp2HealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var http2_health_check = new HealthCheck("http2-health-check", HealthCheckArgs.builder()
.name("http2-health-check")
.description("Health check via http2")
.timeoutSec(1)
.checkIntervalSec(1)
.healthyThreshold(4)
.unhealthyThreshold(5)
.http2HealthCheck(HealthCheckHttp2HealthCheckArgs.builder()
.portName("health-check-port")
.portSpecification("USE_NAMED_PORT")
.host("1.2.3.4")
.requestPath("/mypath")
.proxyHeader("NONE")
.response("I AM HEALTHY")
.build())
.build());
}
}
resources:
http2-health-check:
type: gcp:compute:HealthCheck
properties:
name: http2-health-check
description: Health check via http2
timeoutSec: 1
checkIntervalSec: 1
healthyThreshold: 4
unhealthyThreshold: 5
http2HealthCheck:
portName: health-check-port
portSpecification: USE_NAMED_PORT
host: 1.2.3.4
requestPath: /mypath
proxyHeader: NONE
response: I AM HEALTHY

Health Check Grpc

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const grpc_health_check = new gcp.compute.HealthCheck("grpc-health-check", {
name: "grpc-health-check",
timeoutSec: 1,
checkIntervalSec: 1,
grpcHealthCheck: {
port: 443,
},
});
import pulumi
import pulumi_gcp as gcp
grpc_health_check = gcp.compute.HealthCheck("grpc-health-check",
name="grpc-health-check",
timeout_sec=1,
check_interval_sec=1,
grpc_health_check={
"port": 443,
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var grpc_health_check = new Gcp.Compute.HealthCheck("grpc-health-check", new()
{
Name = "grpc-health-check",
TimeoutSec = 1,
CheckIntervalSec = 1,
GrpcHealthCheck = new Gcp.Compute.Inputs.HealthCheckGrpcHealthCheckArgs
{
Port = 443,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "grpc-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("grpc-health-check"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
GrpcHealthCheck: &compute.HealthCheckGrpcHealthCheckArgs{
Port: pulumi.Int(443),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckGrpcHealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var grpc_health_check = new HealthCheck("grpc-health-check", HealthCheckArgs.builder()
.name("grpc-health-check")
.timeoutSec(1)
.checkIntervalSec(1)
.grpcHealthCheck(HealthCheckGrpcHealthCheckArgs.builder()
.port("443")
.build())
.build());
}
}
resources:
grpc-health-check:
type: gcp:compute:HealthCheck
properties:
name: grpc-health-check
timeoutSec: 1
checkIntervalSec: 1
grpcHealthCheck:
port: '443'

Health Check Grpc Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const grpc_health_check = new gcp.compute.HealthCheck("grpc-health-check", {
name: "grpc-health-check",
timeoutSec: 1,
checkIntervalSec: 1,
grpcHealthCheck: {
portName: "health-check-port",
portSpecification: "USE_NAMED_PORT",
grpcServiceName: "testservice",
},
});
import pulumi
import pulumi_gcp as gcp
grpc_health_check = gcp.compute.HealthCheck("grpc-health-check",
name="grpc-health-check",
timeout_sec=1,
check_interval_sec=1,
grpc_health_check={
"port_name": "health-check-port",
"port_specification": "USE_NAMED_PORT",
"grpc_service_name": "testservice",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var grpc_health_check = new Gcp.Compute.HealthCheck("grpc-health-check", new()
{
Name = "grpc-health-check",
TimeoutSec = 1,
CheckIntervalSec = 1,
GrpcHealthCheck = new Gcp.Compute.Inputs.HealthCheckGrpcHealthCheckArgs
{
PortName = "health-check-port",
PortSpecification = "USE_NAMED_PORT",
GrpcServiceName = "testservice",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "grpc-health-check", &compute.HealthCheckArgs{
Name: pulumi.String("grpc-health-check"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
GrpcHealthCheck: &compute.HealthCheckGrpcHealthCheckArgs{
PortName: pulumi.String("health-check-port"),
PortSpecification: pulumi.String("USE_NAMED_PORT"),
GrpcServiceName: pulumi.String("testservice"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckGrpcHealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var grpc_health_check = new HealthCheck("grpc-health-check", HealthCheckArgs.builder()
.name("grpc-health-check")
.timeoutSec(1)
.checkIntervalSec(1)
.grpcHealthCheck(HealthCheckGrpcHealthCheckArgs.builder()
.portName("health-check-port")
.portSpecification("USE_NAMED_PORT")
.grpcServiceName("testservice")
.build())
.build());
}
}
resources:
grpc-health-check:
type: gcp:compute:HealthCheck
properties:
name: grpc-health-check
timeoutSec: 1
checkIntervalSec: 1
grpcHealthCheck:
portName: health-check-port
portSpecification: USE_NAMED_PORT
grpcServiceName: testservice

Health Check With Logging

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const health_check_with_logging = new gcp.compute.HealthCheck("health-check-with-logging", {
name: "tcp-health-check",
timeoutSec: 1,
checkIntervalSec: 1,
tcpHealthCheck: {
port: 22,
},
logConfig: {
enable: true,
},
});
import pulumi
import pulumi_gcp as gcp
health_check_with_logging = gcp.compute.HealthCheck("health-check-with-logging",
name="tcp-health-check",
timeout_sec=1,
check_interval_sec=1,
tcp_health_check={
"port": 22,
},
log_config={
"enable": True,
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var health_check_with_logging = new Gcp.Compute.HealthCheck("health-check-with-logging", new()
{
Name = "tcp-health-check",
TimeoutSec = 1,
CheckIntervalSec = 1,
TcpHealthCheck = new Gcp.Compute.Inputs.HealthCheckTcpHealthCheckArgs
{
Port = 22,
},
LogConfig = new Gcp.Compute.Inputs.HealthCheckLogConfigArgs
{
Enable = true,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewHealthCheck(ctx, "health-check-with-logging", &compute.HealthCheckArgs{
Name: pulumi.String("tcp-health-check"),
TimeoutSec: pulumi.Int(1),
CheckIntervalSec: pulumi.Int(1),
TcpHealthCheck: &compute.HealthCheckTcpHealthCheckArgs{
Port: pulumi.Int(22),
},
LogConfig: &compute.HealthCheckLogConfigArgs{
Enable: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckTcpHealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckLogConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var health_check_with_logging = new HealthCheck("health-check-with-logging", HealthCheckArgs.builder()
.name("tcp-health-check")
.timeoutSec(1)
.checkIntervalSec(1)
.tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
.port("22")
.build())
.logConfig(HealthCheckLogConfigArgs.builder()
.enable(true)
.build())
.build());
}
}
resources:
health-check-with-logging:
type: gcp:compute:HealthCheck
properties:
name: tcp-health-check
timeoutSec: 1
checkIntervalSec: 1
tcpHealthCheck:
port: '22'
logConfig:
enable: true

Import

HealthCheck can be imported using any of these accepted formats:

  • projects/{{project}}/global/healthChecks/{{name}}

  • {{project}}/{{name}}

  • {{name}} When using the pulumi import command, HealthCheck can be imported using one of the formats above. For example:

$ pulumi import gcp:compute/healthCheck:HealthCheck default projects/{{project}}/global/healthChecks/{{name}}
$ pulumi import gcp:compute/healthCheck:HealthCheck default {{project}}/{{name}}
$ pulumi import gcp:compute/healthCheck:HealthCheck default {{name}}

Constructors

Link copied to clipboard
constructor(checkIntervalSec: Output<Int>? = null, description: Output<String>? = null, grpcHealthCheck: Output<HealthCheckGrpcHealthCheckArgs>? = null, healthyThreshold: Output<Int>? = null, http2HealthCheck: Output<HealthCheckHttp2HealthCheckArgs>? = null, httpHealthCheck: Output<HealthCheckHttpHealthCheckArgs>? = null, httpsHealthCheck: Output<HealthCheckHttpsHealthCheckArgs>? = null, logConfig: Output<HealthCheckLogConfigArgs>? = null, name: Output<String>? = null, project: Output<String>? = null, sourceRegions: Output<List<String>>? = null, sslHealthCheck: Output<HealthCheckSslHealthCheckArgs>? = null, tcpHealthCheck: Output<HealthCheckTcpHealthCheckArgs>? = null, timeoutSec: Output<Int>? = null, unhealthyThreshold: Output<Int>? = null)

Properties

Link copied to clipboard
val checkIntervalSec: Output<Int>? = null

How often (in seconds) to send a health check. The default value is 5 seconds.

Link copied to clipboard
val description: Output<String>? = null

An optional description of this resource. Provide this property when you create the resource.

Link copied to clipboard

A nested object resource Structure is documented below.

Link copied to clipboard
val healthyThreshold: Output<Int>? = null

A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.

Link copied to clipboard

A nested object resource Structure is documented below.

Link copied to clipboard

A nested object resource Structure is documented below.

Link copied to clipboard

A nested object resource Structure is documented below.

Link copied to clipboard
val logConfig: Output<HealthCheckLogConfigArgs>? = null

Configure logging on this health check. Structure is documented below.

Link copied to clipboard
val name: Output<String>? = null

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val sourceRegions: Output<List<String>>? = null

The list of cloud regions from which health checks are performed. If any regions are specified, then exactly 3 regions should be specified. The region names must be valid names of Google Cloud regions. This can only be set for global health check. If this list is non-empty, then there are restrictions on what other health check fields are supported and what other resources can use this health check:

Link copied to clipboard

A nested object resource Structure is documented below.

Link copied to clipboard

A nested object resource Structure is documented below.

Link copied to clipboard
val timeoutSec: Output<Int>? = null

How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.

Link copied to clipboard
val unhealthyThreshold: Output<Int>? = null

A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.

Functions

Link copied to clipboard
open override fun toJava(): HealthCheckArgs