gcp.compute.HealthCheck
Explore with Pulumi AI
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:
- API documentation
- How-to Guides
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,
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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,
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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,
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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,
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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,
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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,
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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",
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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,
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
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 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
Compute Health Check Http Source Regions
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const http_health_check_with_source_regions = new gcp.compute.HealthCheck("http-health-check-with-source-regions", {
name: "http-health-check",
checkIntervalSec: 30,
httpHealthCheck: {
port: 80,
portSpecification: "USE_FIXED_PORT",
},
sourceRegions: [
"us-west1",
"us-central1",
"us-east5",
],
});
import pulumi
import pulumi_gcp as gcp
http_health_check_with_source_regions = gcp.compute.HealthCheck("http-health-check-with-source-regions",
name="http-health-check",
check_interval_sec=30,
http_health_check={
"port": 80,
"port_specification": "USE_FIXED_PORT",
},
source_regions=[
"us-west1",
"us-central1",
"us-east5",
])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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-with-source-regions", &compute.HealthCheckArgs{
Name: pulumi.String("http-health-check"),
CheckIntervalSec: pulumi.Int(30),
HttpHealthCheck: &compute.HealthCheckHttpHealthCheckArgs{
Port: pulumi.Int(80),
PortSpecification: pulumi.String("USE_FIXED_PORT"),
},
SourceRegions: pulumi.StringArray{
pulumi.String("us-west1"),
pulumi.String("us-central1"),
pulumi.String("us-east5"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var http_health_check_with_source_regions = new Gcp.Compute.HealthCheck("http-health-check-with-source-regions", new()
{
Name = "http-health-check",
CheckIntervalSec = 30,
HttpHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpHealthCheckArgs
{
Port = 80,
PortSpecification = "USE_FIXED_PORT",
},
SourceRegions = new[]
{
"us-west1",
"us-central1",
"us-east5",
},
});
});
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_with_source_regions = new HealthCheck("http-health-check-with-source-regions", HealthCheckArgs.builder()
.name("http-health-check")
.checkIntervalSec(30)
.httpHealthCheck(HealthCheckHttpHealthCheckArgs.builder()
.port(80)
.portSpecification("USE_FIXED_PORT")
.build())
.sourceRegions(
"us-west1",
"us-central1",
"us-east5")
.build());
}
}
resources:
http-health-check-with-source-regions:
type: gcp:compute:HealthCheck
properties:
name: http-health-check
checkIntervalSec: 30
httpHealthCheck:
port: 80
portSpecification: USE_FIXED_PORT
sourceRegions:
- us-west1
- us-central1
- us-east5
Compute Health Check Https Source Regions
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const https_health_check_with_source_regions = new gcp.compute.HealthCheck("https-health-check-with-source-regions", {
name: "https-health-check",
checkIntervalSec: 30,
httpsHealthCheck: {
port: 80,
portSpecification: "USE_FIXED_PORT",
},
sourceRegions: [
"us-west1",
"us-central1",
"us-east5",
],
});
import pulumi
import pulumi_gcp as gcp
https_health_check_with_source_regions = gcp.compute.HealthCheck("https-health-check-with-source-regions",
name="https-health-check",
check_interval_sec=30,
https_health_check={
"port": 80,
"port_specification": "USE_FIXED_PORT",
},
source_regions=[
"us-west1",
"us-central1",
"us-east5",
])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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-with-source-regions", &compute.HealthCheckArgs{
Name: pulumi.String("https-health-check"),
CheckIntervalSec: pulumi.Int(30),
HttpsHealthCheck: &compute.HealthCheckHttpsHealthCheckArgs{
Port: pulumi.Int(80),
PortSpecification: pulumi.String("USE_FIXED_PORT"),
},
SourceRegions: pulumi.StringArray{
pulumi.String("us-west1"),
pulumi.String("us-central1"),
pulumi.String("us-east5"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var https_health_check_with_source_regions = new Gcp.Compute.HealthCheck("https-health-check-with-source-regions", new()
{
Name = "https-health-check",
CheckIntervalSec = 30,
HttpsHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpsHealthCheckArgs
{
Port = 80,
PortSpecification = "USE_FIXED_PORT",
},
SourceRegions = new[]
{
"us-west1",
"us-central1",
"us-east5",
},
});
});
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_with_source_regions = new HealthCheck("https-health-check-with-source-regions", HealthCheckArgs.builder()
.name("https-health-check")
.checkIntervalSec(30)
.httpsHealthCheck(HealthCheckHttpsHealthCheckArgs.builder()
.port(80)
.portSpecification("USE_FIXED_PORT")
.build())
.sourceRegions(
"us-west1",
"us-central1",
"us-east5")
.build());
}
}
resources:
https-health-check-with-source-regions:
type: gcp:compute:HealthCheck
properties:
name: https-health-check
checkIntervalSec: 30
httpsHealthCheck:
port: 80
portSpecification: USE_FIXED_PORT
sourceRegions:
- us-west1
- us-central1
- us-east5
Compute Health Check Tcp Source Regions
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const tcp_health_check_with_source_regions = new gcp.compute.HealthCheck("tcp-health-check-with-source-regions", {
name: "tcp-health-check",
checkIntervalSec: 30,
tcpHealthCheck: {
port: 80,
portSpecification: "USE_FIXED_PORT",
},
sourceRegions: [
"us-west1",
"us-central1",
"us-east5",
],
});
import pulumi
import pulumi_gcp as gcp
tcp_health_check_with_source_regions = gcp.compute.HealthCheck("tcp-health-check-with-source-regions",
name="tcp-health-check",
check_interval_sec=30,
tcp_health_check={
"port": 80,
"port_specification": "USE_FIXED_PORT",
},
source_regions=[
"us-west1",
"us-central1",
"us-east5",
])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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-with-source-regions", &compute.HealthCheckArgs{
Name: pulumi.String("tcp-health-check"),
CheckIntervalSec: pulumi.Int(30),
TcpHealthCheck: &compute.HealthCheckTcpHealthCheckArgs{
Port: pulumi.Int(80),
PortSpecification: pulumi.String("USE_FIXED_PORT"),
},
SourceRegions: pulumi.StringArray{
pulumi.String("us-west1"),
pulumi.String("us-central1"),
pulumi.String("us-east5"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var tcp_health_check_with_source_regions = new Gcp.Compute.HealthCheck("tcp-health-check-with-source-regions", new()
{
Name = "tcp-health-check",
CheckIntervalSec = 30,
TcpHealthCheck = new Gcp.Compute.Inputs.HealthCheckTcpHealthCheckArgs
{
Port = 80,
PortSpecification = "USE_FIXED_PORT",
},
SourceRegions = new[]
{
"us-west1",
"us-central1",
"us-east5",
},
});
});
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_with_source_regions = new HealthCheck("tcp-health-check-with-source-regions", HealthCheckArgs.builder()
.name("tcp-health-check")
.checkIntervalSec(30)
.tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
.port(80)
.portSpecification("USE_FIXED_PORT")
.build())
.sourceRegions(
"us-west1",
"us-central1",
"us-east5")
.build());
}
}
resources:
tcp-health-check-with-source-regions:
type: gcp:compute:HealthCheck
properties:
name: tcp-health-check
checkIntervalSec: 30
tcpHealthCheck:
port: 80
portSpecification: USE_FIXED_PORT
sourceRegions:
- us-west1
- us-central1
- us-east5
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: Optional[HealthCheckArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def HealthCheck(resource_name: str,
opts: Optional[ResourceOptions] = None,
check_interval_sec: Optional[int] = None,
description: Optional[str] = None,
grpc_health_check: Optional[HealthCheckGrpcHealthCheckArgs] = None,
healthy_threshold: Optional[int] = None,
http2_health_check: Optional[HealthCheckHttp2HealthCheckArgs] = None,
http_health_check: Optional[HealthCheckHttpHealthCheckArgs] = None,
https_health_check: Optional[HealthCheckHttpsHealthCheckArgs] = None,
log_config: Optional[HealthCheckLogConfigArgs] = None,
name: Optional[str] = None,
project: Optional[str] = None,
source_regions: Optional[Sequence[str]] = None,
ssl_health_check: Optional[HealthCheckSslHealthCheckArgs] = None,
tcp_health_check: Optional[HealthCheckTcpHealthCheckArgs] = None,
timeout_sec: Optional[int] = None,
unhealthy_threshold: Optional[int] = None)
func NewHealthCheck(ctx *Context, name string, args *HealthCheckArgs, opts ...ResourceOption) (*HealthCheck, error)
public HealthCheck(string name, HealthCheckArgs? args = null, CustomResourceOptions? opts = null)
public HealthCheck(String name, HealthCheckArgs args)
public HealthCheck(String name, HealthCheckArgs args, CustomResourceOptions options)
type: gcp:compute: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 Gcp.Compute.HealthCheck("healthCheckResource", new()
{
CheckIntervalSec = 0,
Description = "string",
GrpcHealthCheck = new Gcp.Compute.Inputs.HealthCheckGrpcHealthCheckArgs
{
GrpcServiceName = "string",
Port = 0,
PortName = "string",
PortSpecification = "string",
},
HealthyThreshold = 0,
Http2HealthCheck = new Gcp.Compute.Inputs.HealthCheckHttp2HealthCheckArgs
{
Host = "string",
Port = 0,
PortName = "string",
PortSpecification = "string",
ProxyHeader = "string",
RequestPath = "string",
Response = "string",
},
HttpHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpHealthCheckArgs
{
Host = "string",
Port = 0,
PortName = "string",
PortSpecification = "string",
ProxyHeader = "string",
RequestPath = "string",
Response = "string",
},
HttpsHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpsHealthCheckArgs
{
Host = "string",
Port = 0,
PortName = "string",
PortSpecification = "string",
ProxyHeader = "string",
RequestPath = "string",
Response = "string",
},
LogConfig = new Gcp.Compute.Inputs.HealthCheckLogConfigArgs
{
Enable = false,
},
Name = "string",
Project = "string",
SourceRegions = new[]
{
"string",
},
SslHealthCheck = new Gcp.Compute.Inputs.HealthCheckSslHealthCheckArgs
{
Port = 0,
PortName = "string",
PortSpecification = "string",
ProxyHeader = "string",
Request = "string",
Response = "string",
},
TcpHealthCheck = new Gcp.Compute.Inputs.HealthCheckTcpHealthCheckArgs
{
Port = 0,
PortName = "string",
PortSpecification = "string",
ProxyHeader = "string",
Request = "string",
Response = "string",
},
TimeoutSec = 0,
UnhealthyThreshold = 0,
});
example, err := compute.NewHealthCheck(ctx, "healthCheckResource", &compute.HealthCheckArgs{
CheckIntervalSec: pulumi.Int(0),
Description: pulumi.String("string"),
GrpcHealthCheck: &compute.HealthCheckGrpcHealthCheckArgs{
GrpcServiceName: pulumi.String("string"),
Port: pulumi.Int(0),
PortName: pulumi.String("string"),
PortSpecification: pulumi.String("string"),
},
HealthyThreshold: pulumi.Int(0),
Http2HealthCheck: &compute.HealthCheckHttp2HealthCheckArgs{
Host: pulumi.String("string"),
Port: pulumi.Int(0),
PortName: pulumi.String("string"),
PortSpecification: pulumi.String("string"),
ProxyHeader: pulumi.String("string"),
RequestPath: pulumi.String("string"),
Response: pulumi.String("string"),
},
HttpHealthCheck: &compute.HealthCheckHttpHealthCheckArgs{
Host: pulumi.String("string"),
Port: pulumi.Int(0),
PortName: pulumi.String("string"),
PortSpecification: pulumi.String("string"),
ProxyHeader: pulumi.String("string"),
RequestPath: pulumi.String("string"),
Response: pulumi.String("string"),
},
HttpsHealthCheck: &compute.HealthCheckHttpsHealthCheckArgs{
Host: pulumi.String("string"),
Port: pulumi.Int(0),
PortName: pulumi.String("string"),
PortSpecification: pulumi.String("string"),
ProxyHeader: pulumi.String("string"),
RequestPath: pulumi.String("string"),
Response: pulumi.String("string"),
},
LogConfig: &compute.HealthCheckLogConfigArgs{
Enable: pulumi.Bool(false),
},
Name: pulumi.String("string"),
Project: pulumi.String("string"),
SourceRegions: pulumi.StringArray{
pulumi.String("string"),
},
SslHealthCheck: &compute.HealthCheckSslHealthCheckArgs{
Port: pulumi.Int(0),
PortName: pulumi.String("string"),
PortSpecification: pulumi.String("string"),
ProxyHeader: pulumi.String("string"),
Request: pulumi.String("string"),
Response: pulumi.String("string"),
},
TcpHealthCheck: &compute.HealthCheckTcpHealthCheckArgs{
Port: pulumi.Int(0),
PortName: pulumi.String("string"),
PortSpecification: pulumi.String("string"),
ProxyHeader: pulumi.String("string"),
Request: pulumi.String("string"),
Response: pulumi.String("string"),
},
TimeoutSec: pulumi.Int(0),
UnhealthyThreshold: pulumi.Int(0),
})
var healthCheckResource = new HealthCheck("healthCheckResource", HealthCheckArgs.builder()
.checkIntervalSec(0)
.description("string")
.grpcHealthCheck(HealthCheckGrpcHealthCheckArgs.builder()
.grpcServiceName("string")
.port(0)
.portName("string")
.portSpecification("string")
.build())
.healthyThreshold(0)
.http2HealthCheck(HealthCheckHttp2HealthCheckArgs.builder()
.host("string")
.port(0)
.portName("string")
.portSpecification("string")
.proxyHeader("string")
.requestPath("string")
.response("string")
.build())
.httpHealthCheck(HealthCheckHttpHealthCheckArgs.builder()
.host("string")
.port(0)
.portName("string")
.portSpecification("string")
.proxyHeader("string")
.requestPath("string")
.response("string")
.build())
.httpsHealthCheck(HealthCheckHttpsHealthCheckArgs.builder()
.host("string")
.port(0)
.portName("string")
.portSpecification("string")
.proxyHeader("string")
.requestPath("string")
.response("string")
.build())
.logConfig(HealthCheckLogConfigArgs.builder()
.enable(false)
.build())
.name("string")
.project("string")
.sourceRegions("string")
.sslHealthCheck(HealthCheckSslHealthCheckArgs.builder()
.port(0)
.portName("string")
.portSpecification("string")
.proxyHeader("string")
.request("string")
.response("string")
.build())
.tcpHealthCheck(HealthCheckTcpHealthCheckArgs.builder()
.port(0)
.portName("string")
.portSpecification("string")
.proxyHeader("string")
.request("string")
.response("string")
.build())
.timeoutSec(0)
.unhealthyThreshold(0)
.build());
health_check_resource = gcp.compute.HealthCheck("healthCheckResource",
check_interval_sec=0,
description="string",
grpc_health_check={
"grpc_service_name": "string",
"port": 0,
"port_name": "string",
"port_specification": "string",
},
healthy_threshold=0,
http2_health_check={
"host": "string",
"port": 0,
"port_name": "string",
"port_specification": "string",
"proxy_header": "string",
"request_path": "string",
"response": "string",
},
http_health_check={
"host": "string",
"port": 0,
"port_name": "string",
"port_specification": "string",
"proxy_header": "string",
"request_path": "string",
"response": "string",
},
https_health_check={
"host": "string",
"port": 0,
"port_name": "string",
"port_specification": "string",
"proxy_header": "string",
"request_path": "string",
"response": "string",
},
log_config={
"enable": False,
},
name="string",
project="string",
source_regions=["string"],
ssl_health_check={
"port": 0,
"port_name": "string",
"port_specification": "string",
"proxy_header": "string",
"request": "string",
"response": "string",
},
tcp_health_check={
"port": 0,
"port_name": "string",
"port_specification": "string",
"proxy_header": "string",
"request": "string",
"response": "string",
},
timeout_sec=0,
unhealthy_threshold=0)
const healthCheckResource = new gcp.compute.HealthCheck("healthCheckResource", {
checkIntervalSec: 0,
description: "string",
grpcHealthCheck: {
grpcServiceName: "string",
port: 0,
portName: "string",
portSpecification: "string",
},
healthyThreshold: 0,
http2HealthCheck: {
host: "string",
port: 0,
portName: "string",
portSpecification: "string",
proxyHeader: "string",
requestPath: "string",
response: "string",
},
httpHealthCheck: {
host: "string",
port: 0,
portName: "string",
portSpecification: "string",
proxyHeader: "string",
requestPath: "string",
response: "string",
},
httpsHealthCheck: {
host: "string",
port: 0,
portName: "string",
portSpecification: "string",
proxyHeader: "string",
requestPath: "string",
response: "string",
},
logConfig: {
enable: false,
},
name: "string",
project: "string",
sourceRegions: ["string"],
sslHealthCheck: {
port: 0,
portName: "string",
portSpecification: "string",
proxyHeader: "string",
request: "string",
response: "string",
},
tcpHealthCheck: {
port: 0,
portName: "string",
portSpecification: "string",
proxyHeader: "string",
request: "string",
response: "string",
},
timeoutSec: 0,
unhealthyThreshold: 0,
});
type: gcp:compute:HealthCheck
properties:
checkIntervalSec: 0
description: string
grpcHealthCheck:
grpcServiceName: string
port: 0
portName: string
portSpecification: string
healthyThreshold: 0
http2HealthCheck:
host: string
port: 0
portName: string
portSpecification: string
proxyHeader: string
requestPath: string
response: string
httpHealthCheck:
host: string
port: 0
portName: string
portSpecification: string
proxyHeader: string
requestPath: string
response: string
httpsHealthCheck:
host: string
port: 0
portName: string
portSpecification: string
proxyHeader: string
requestPath: string
response: string
logConfig:
enable: false
name: string
project: string
sourceRegions:
- string
sslHealthCheck:
port: 0
portName: string
portSpecification: string
proxyHeader: string
request: string
response: string
tcpHealthCheck:
port: 0
portName: string
portSpecification: string
proxyHeader: string
request: string
response: string
timeoutSec: 0
unhealthyThreshold: 0
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:
- Check
Interval intSec - How often (in seconds) to send a health check. The default value is 5 seconds.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Grpc
Health HealthCheck Check Grpc Health Check - A nested object resource. Structure is documented below.
- Healthy
Threshold int - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- Http2Health
Check HealthCheck Http2Health Check - A nested object resource. Structure is documented below.
- Http
Health HealthCheck Check Http Health Check - A nested object resource. Structure is documented below.
- Https
Health HealthCheck Check Https Health Check - A nested object resource. Structure is documented below.
- Log
Config HealthCheck Log Config - Configure logging on this health check. Structure is documented below.
- Name string
- 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. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Source
Regions List<string> - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- Ssl
Health HealthCheck Check Ssl Health Check - A nested object resource. Structure is documented below.
- Tcp
Health HealthCheck Check Tcp Health Check - A nested object resource. Structure is documented below.
- Timeout
Sec int - 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.
- Unhealthy
Threshold int - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- Check
Interval intSec - How often (in seconds) to send a health check. The default value is 5 seconds.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Grpc
Health HealthCheck Check Grpc Health Check Args - A nested object resource. Structure is documented below.
- Healthy
Threshold int - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- Http2Health
Check HealthCheck Http2Health Check Args - A nested object resource. Structure is documented below.
- Http
Health HealthCheck Check Http Health Check Args - A nested object resource. Structure is documented below.
- Https
Health HealthCheck Check Https Health Check Args - A nested object resource. Structure is documented below.
- Log
Config HealthCheck Log Config Args - Configure logging on this health check. Structure is documented below.
- Name string
- 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. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Source
Regions []string - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- Ssl
Health HealthCheck Check Ssl Health Check Args - A nested object resource. Structure is documented below.
- Tcp
Health HealthCheck Check Tcp Health Check Args - A nested object resource. Structure is documented below.
- Timeout
Sec int - 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.
- Unhealthy
Threshold int - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- check
Interval IntegerSec - How often (in seconds) to send a health check. The default value is 5 seconds.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- grpc
Health HealthCheck Check Grpc Health Check - A nested object resource. Structure is documented below.
- healthy
Threshold Integer - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- http2Health
Check HealthCheck Http2Health Check - A nested object resource. Structure is documented below.
- http
Health HealthCheck Check Http Health Check - A nested object resource. Structure is documented below.
- https
Health HealthCheck Check Https Health Check - A nested object resource. Structure is documented below.
- log
Config HealthCheck Log Config - Configure logging on this health check. Structure is documented below.
- name String
- 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. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- source
Regions List<String> - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- ssl
Health HealthCheck Check Ssl Health Check - A nested object resource. Structure is documented below.
- tcp
Health HealthCheck Check Tcp Health Check - A nested object resource. Structure is documented below.
- timeout
Sec Integer - 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.
- unhealthy
Threshold Integer - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- check
Interval numberSec - How often (in seconds) to send a health check. The default value is 5 seconds.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- grpc
Health HealthCheck Check Grpc Health Check - A nested object resource. Structure is documented below.
- healthy
Threshold number - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- http2Health
Check HealthCheck Http2Health Check - A nested object resource. Structure is documented below.
- http
Health HealthCheck Check Http Health Check - A nested object resource. Structure is documented below.
- https
Health HealthCheck Check Https Health Check - A nested object resource. Structure is documented below.
- log
Config HealthCheck Log Config - Configure logging on this health check. Structure is documented below.
- name string
- 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. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- source
Regions string[] - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- ssl
Health HealthCheck Check Ssl Health Check - A nested object resource. Structure is documented below.
- tcp
Health HealthCheck Check Tcp Health Check - A nested object resource. Structure is documented below.
- timeout
Sec number - 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.
- unhealthy
Threshold number - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- check_
interval_ intsec - How often (in seconds) to send a health check. The default value is 5 seconds.
- description str
- An optional description of this resource. Provide this property when you create the resource.
- grpc_
health_ Healthcheck Check Grpc Health Check Args - A nested object resource. Structure is documented below.
- healthy_
threshold int - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- http2_
health_ Healthcheck Check Http2Health Check Args - A nested object resource. Structure is documented below.
- http_
health_ Healthcheck Check Http Health Check Args - A nested object resource. Structure is documented below.
- https_
health_ Healthcheck Check Https Health Check Args - A nested object resource. Structure is documented below.
- log_
config HealthCheck Log Config Args - Configure logging on this health check. Structure is documented below.
- name str
- 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. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- source_
regions Sequence[str] - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- ssl_
health_ Healthcheck Check Ssl Health Check Args - A nested object resource. Structure is documented below.
- tcp_
health_ Healthcheck Check Tcp Health Check Args - A nested object resource. Structure is documented below.
- timeout_
sec int - 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.
- unhealthy_
threshold int - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- check
Interval NumberSec - How often (in seconds) to send a health check. The default value is 5 seconds.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- grpc
Health Property MapCheck - A nested object resource. Structure is documented below.
- healthy
Threshold Number - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- http2Health
Check Property Map - A nested object resource. Structure is documented below.
- http
Health Property MapCheck - A nested object resource. Structure is documented below.
- https
Health Property MapCheck - A nested object resource. Structure is documented below.
- log
Config Property Map - Configure logging on this health check. Structure is documented below.
- name String
- 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. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- source
Regions List<String> - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- ssl
Health Property MapCheck - A nested object resource. Structure is documented below.
- tcp
Health Property MapCheck - A nested object resource. Structure is documented below.
- timeout
Sec Number - 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.
- unhealthy
Threshold Number - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
Outputs
All input properties are implicitly available as output properties. Additionally, the HealthCheck resource produces the following output properties:
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Link string - The URI of the created resource.
- Type string
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Self
Link string - The URI of the created resource.
- Type string
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- self
Link String - The URI of the created resource.
- type String
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- id string
- The provider-assigned unique ID for this managed resource.
- self
Link string - The URI of the created resource.
- type string
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
- creation_
timestamp str - Creation timestamp in RFC3339 text format.
- id str
- The provider-assigned unique ID for this managed resource.
- self_
link str - The URI of the created resource.
- type str
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- self
Link String - The URI of the created resource.
- type String
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
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,
check_interval_sec: Optional[int] = None,
creation_timestamp: Optional[str] = None,
description: Optional[str] = None,
grpc_health_check: Optional[HealthCheckGrpcHealthCheckArgs] = None,
healthy_threshold: Optional[int] = None,
http2_health_check: Optional[HealthCheckHttp2HealthCheckArgs] = None,
http_health_check: Optional[HealthCheckHttpHealthCheckArgs] = None,
https_health_check: Optional[HealthCheckHttpsHealthCheckArgs] = None,
log_config: Optional[HealthCheckLogConfigArgs] = None,
name: Optional[str] = None,
project: Optional[str] = None,
self_link: Optional[str] = None,
source_regions: Optional[Sequence[str]] = None,
ssl_health_check: Optional[HealthCheckSslHealthCheckArgs] = None,
tcp_health_check: Optional[HealthCheckTcpHealthCheckArgs] = None,
timeout_sec: Optional[int] = None,
type: Optional[str] = None,
unhealthy_threshold: Optional[int] = 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)
Resource lookup is not supported in YAML
- 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.
- Check
Interval intSec - How often (in seconds) to send a health check. The default value is 5 seconds.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Grpc
Health HealthCheck Check Grpc Health Check - A nested object resource. Structure is documented below.
- Healthy
Threshold int - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- Http2Health
Check HealthCheck Http2Health Check - A nested object resource. Structure is documented below.
- Http
Health HealthCheck Check Http Health Check - A nested object resource. Structure is documented below.
- Https
Health HealthCheck Check Https Health Check - A nested object resource. Structure is documented below.
- Log
Config HealthCheck Log Config - Configure logging on this health check. Structure is documented below.
- Name string
- 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. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Self
Link string - The URI of the created resource.
- Source
Regions List<string> - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- Ssl
Health HealthCheck Check Ssl Health Check - A nested object resource. Structure is documented below.
- Tcp
Health HealthCheck Check Tcp Health Check - A nested object resource. Structure is documented below.
- Timeout
Sec int - 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.
- Type string
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
- Unhealthy
Threshold int - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- Check
Interval intSec - How often (in seconds) to send a health check. The default value is 5 seconds.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Grpc
Health HealthCheck Check Grpc Health Check Args - A nested object resource. Structure is documented below.
- Healthy
Threshold int - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- Http2Health
Check HealthCheck Http2Health Check Args - A nested object resource. Structure is documented below.
- Http
Health HealthCheck Check Http Health Check Args - A nested object resource. Structure is documented below.
- Https
Health HealthCheck Check Https Health Check Args - A nested object resource. Structure is documented below.
- Log
Config HealthCheck Log Config Args - Configure logging on this health check. Structure is documented below.
- Name string
- 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. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Self
Link string - The URI of the created resource.
- Source
Regions []string - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- Ssl
Health HealthCheck Check Ssl Health Check Args - A nested object resource. Structure is documented below.
- Tcp
Health HealthCheck Check Tcp Health Check Args - A nested object resource. Structure is documented below.
- Timeout
Sec int - 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.
- Type string
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
- Unhealthy
Threshold int - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- check
Interval IntegerSec - How often (in seconds) to send a health check. The default value is 5 seconds.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- grpc
Health HealthCheck Check Grpc Health Check - A nested object resource. Structure is documented below.
- healthy
Threshold Integer - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- http2Health
Check HealthCheck Http2Health Check - A nested object resource. Structure is documented below.
- http
Health HealthCheck Check Http Health Check - A nested object resource. Structure is documented below.
- https
Health HealthCheck Check Https Health Check - A nested object resource. Structure is documented below.
- log
Config HealthCheck Log Config - Configure logging on this health check. Structure is documented below.
- name String
- 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. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self
Link String - The URI of the created resource.
- source
Regions List<String> - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- ssl
Health HealthCheck Check Ssl Health Check - A nested object resource. Structure is documented below.
- tcp
Health HealthCheck Check Tcp Health Check - A nested object resource. Structure is documented below.
- timeout
Sec Integer - 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.
- type String
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
- unhealthy
Threshold Integer - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- check
Interval numberSec - How often (in seconds) to send a health check. The default value is 5 seconds.
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- grpc
Health HealthCheck Check Grpc Health Check - A nested object resource. Structure is documented below.
- healthy
Threshold number - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- http2Health
Check HealthCheck Http2Health Check - A nested object resource. Structure is documented below.
- http
Health HealthCheck Check Http Health Check - A nested object resource. Structure is documented below.
- https
Health HealthCheck Check Https Health Check - A nested object resource. Structure is documented below.
- log
Config HealthCheck Log Config - Configure logging on this health check. Structure is documented below.
- name string
- 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. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self
Link string - The URI of the created resource.
- source
Regions string[] - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- ssl
Health HealthCheck Check Ssl Health Check - A nested object resource. Structure is documented below.
- tcp
Health HealthCheck Check Tcp Health Check - A nested object resource. Structure is documented below.
- timeout
Sec number - 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.
- type string
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
- unhealthy
Threshold number - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- check_
interval_ intsec - How often (in seconds) to send a health check. The default value is 5 seconds.
- creation_
timestamp str - Creation timestamp in RFC3339 text format.
- description str
- An optional description of this resource. Provide this property when you create the resource.
- grpc_
health_ Healthcheck Check Grpc Health Check Args - A nested object resource. Structure is documented below.
- healthy_
threshold int - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- http2_
health_ Healthcheck Check Http2Health Check Args - A nested object resource. Structure is documented below.
- http_
health_ Healthcheck Check Http Health Check Args - A nested object resource. Structure is documented below.
- https_
health_ Healthcheck Check Https Health Check Args - A nested object resource. Structure is documented below.
- log_
config HealthCheck Log Config Args - Configure logging on this health check. Structure is documented below.
- name str
- 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. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self_
link str - The URI of the created resource.
- source_
regions Sequence[str] - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- ssl_
health_ Healthcheck Check Ssl Health Check Args - A nested object resource. Structure is documented below.
- tcp_
health_ Healthcheck Check Tcp Health Check Args - A nested object resource. Structure is documented below.
- timeout_
sec int - 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.
- type str
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
- unhealthy_
threshold int - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
- check
Interval NumberSec - How often (in seconds) to send a health check. The default value is 5 seconds.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- grpc
Health Property MapCheck - A nested object resource. Structure is documented below.
- healthy
Threshold Number - A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
- http2Health
Check Property Map - A nested object resource. Structure is documented below.
- http
Health Property MapCheck - A nested object resource. Structure is documented below.
- https
Health Property MapCheck - A nested object resource. Structure is documented below.
- log
Config Property Map - Configure logging on this health check. Structure is documented below.
- name String
- 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. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self
Link String - The URI of the created resource.
- source
Regions List<String> - 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:
- SSL, HTTP2, and GRPC protocols are not supported.
- The TCP request field is not supported.
- The proxyHeader field for HTTP, HTTPS, and TCP is not supported.
- The checkIntervalSec field must be at least 30.
- The health check cannot be used with BackendService nor with managed instance group auto-healing.
- ssl
Health Property MapCheck - A nested object resource. Structure is documented below.
- tcp
Health Property MapCheck - A nested object resource. Structure is documented below.
- timeout
Sec Number - 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.
- type String
- The type of the health check. One of HTTP, HTTPS, TCP, or SSL.
- unhealthy
Threshold Number - A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
Supporting Types
HealthCheckGrpcHealthCheck, HealthCheckGrpcHealthCheckArgs
- Grpc
Service stringName - The gRPC service name for the health check.
The value of grpcServiceName has the following meanings by convention:
- Empty serviceName means the overall status of all services at the backend.
- Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII.
- Port int
- The port number for the health check request. Must be specified if portName and portSpecification are not set or if port_specification is USE_FIXED_PORT. Valid values are 1 through 65535.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- Grpc
Service stringName - The gRPC service name for the health check.
The value of grpcServiceName has the following meanings by convention:
- Empty serviceName means the overall status of all services at the backend.
- Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII.
- Port int
- The port number for the health check request. Must be specified if portName and portSpecification are not set or if port_specification is USE_FIXED_PORT. Valid values are 1 through 65535.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- grpc
Service StringName - The gRPC service name for the health check.
The value of grpcServiceName has the following meanings by convention:
- Empty serviceName means the overall status of all services at the backend.
- Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII.
- port Integer
- The port number for the health check request. Must be specified if portName and portSpecification are not set or if port_specification is USE_FIXED_PORT. Valid values are 1 through 65535.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- grpc
Service stringName - The gRPC service name for the health check.
The value of grpcServiceName has the following meanings by convention:
- Empty serviceName means the overall status of all services at the backend.
- Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII.
- port number
- The port number for the health check request. Must be specified if portName and portSpecification are not set or if port_specification is USE_FIXED_PORT. Valid values are 1 through 65535.
- port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- grpc_
service_ strname - The gRPC service name for the health check.
The value of grpcServiceName has the following meanings by convention:
- Empty serviceName means the overall status of all services at the backend.
- Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII.
- port int
- The port number for the health check request. Must be specified if portName and portSpecification are not set or if port_specification is USE_FIXED_PORT. Valid values are 1 through 65535.
- port_
name str - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port_
specification str - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- grpc
Service StringName - The gRPC service name for the health check.
The value of grpcServiceName has the following meanings by convention:
- Empty serviceName means the overall status of all services at the backend.
- Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII.
- port Number
- The port number for the health check request. Must be specified if portName and portSpecification are not set or if port_specification is USE_FIXED_PORT. Valid values are 1 through 65535.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
HealthCheckHttp2HealthCheck, HealthCheckHttp2HealthCheckArgs
- Host string
- The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- Port int
- The TCP port number for the HTTP2 health check request. The default value is 443.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string Specifies how port is selected for health checking, can be one of the following values:
'USE_FIXED_PORT': The port number in 'port' is used for health checking.
'USE_NAMED_PORT': The 'portName' is used for health checking.
'USE_SERVING_PORT': For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking.
If not specified, HTTP2 health check follows behavior specified in 'port' and 'portName' fields. Possible values: ["USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"]
- Proxy
Header string - Specifies the type of proxy header to append before sending data to the backend. Default value: "NONE" Possible values: ["NONE", "PROXY_V1"]
- Request
Path string - The request path of the HTTP2 health check request. The default value is /.
- Response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- Host string
- The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- Port int
- The TCP port number for the HTTP2 health check request. The default value is 443.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string Specifies how port is selected for health checking, can be one of the following values:
'USE_FIXED_PORT': The port number in 'port' is used for health checking.
'USE_NAMED_PORT': The 'portName' is used for health checking.
'USE_SERVING_PORT': For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking.
If not specified, HTTP2 health check follows behavior specified in 'port' and 'portName' fields. Possible values: ["USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"]
- Proxy
Header string - Specifies the type of proxy header to append before sending data to the backend. Default value: "NONE" Possible values: ["NONE", "PROXY_V1"]
- Request
Path string - The request path of the HTTP2 health check request. The default value is /.
- Response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host String
- The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port Integer
- The TCP port number for the HTTP2 health check request. The default value is 443.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String Specifies how port is selected for health checking, can be one of the following values:
'USE_FIXED_PORT': The port number in 'port' is used for health checking.
'USE_NAMED_PORT': The 'portName' is used for health checking.
'USE_SERVING_PORT': For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking.
If not specified, HTTP2 health check follows behavior specified in 'port' and 'portName' fields. Possible values: ["USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"]
- proxy
Header String - Specifies the type of proxy header to append before sending data to the backend. Default value: "NONE" Possible values: ["NONE", "PROXY_V1"]
- request
Path String - The request path of the HTTP2 health check request. The default value is /.
- response String
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host string
- The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port number
- The TCP port number for the HTTP2 health check request. The default value is 443.
- port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification string Specifies how port is selected for health checking, can be one of the following values:
'USE_FIXED_PORT': The port number in 'port' is used for health checking.
'USE_NAMED_PORT': The 'portName' is used for health checking.
'USE_SERVING_PORT': For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking.
If not specified, HTTP2 health check follows behavior specified in 'port' and 'portName' fields. Possible values: ["USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"]
- proxy
Header string - Specifies the type of proxy header to append before sending data to the backend. Default value: "NONE" Possible values: ["NONE", "PROXY_V1"]
- request
Path string - The request path of the HTTP2 health check request. The default value is /.
- response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host str
- The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port int
- The TCP port number for the HTTP2 health check request. The default value is 443.
- port_
name str - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port_
specification str Specifies how port is selected for health checking, can be one of the following values:
'USE_FIXED_PORT': The port number in 'port' is used for health checking.
'USE_NAMED_PORT': The 'portName' is used for health checking.
'USE_SERVING_PORT': For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking.
If not specified, HTTP2 health check follows behavior specified in 'port' and 'portName' fields. Possible values: ["USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"]
- proxy_
header str - Specifies the type of proxy header to append before sending data to the backend. Default value: "NONE" Possible values: ["NONE", "PROXY_V1"]
- request_
path str - The request path of the HTTP2 health check request. The default value is /.
- response str
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host String
- The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port Number
- The TCP port number for the HTTP2 health check request. The default value is 443.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String Specifies how port is selected for health checking, can be one of the following values:
'USE_FIXED_PORT': The port number in 'port' is used for health checking.
'USE_NAMED_PORT': The 'portName' is used for health checking.
'USE_SERVING_PORT': For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking.
If not specified, HTTP2 health check follows behavior specified in 'port' and 'portName' fields. Possible values: ["USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"]
- proxy
Header String - Specifies the type of proxy header to append before sending data to the backend. Default value: "NONE" Possible values: ["NONE", "PROXY_V1"]
- request
Path String - The request path of the HTTP2 health check request. The default value is /.
- response String
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
HealthCheckHttpHealthCheck, HealthCheckHttpHealthCheckArgs
- Host string
- The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- Port int
- The TCP port number for the HTTP health check request. The default value is 80.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- Proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - Request
Path string - The request path of the HTTP health check request. The default value is /.
- Response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- Host string
- The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- Port int
- The TCP port number for the HTTP health check request. The default value is 80.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- Proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - Request
Path string - The request path of the HTTP health check request. The default value is /.
- Response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host String
- The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port Integer
- The TCP port number for the HTTP health check request. The default value is 80.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header String - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request
Path String - The request path of the HTTP health check request. The default value is /.
- response String
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host string
- The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port number
- The TCP port number for the HTTP health check request. The default value is 80.
- port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request
Path string - The request path of the HTTP health check request. The default value is /.
- response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host str
- The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port int
- The TCP port number for the HTTP health check request. The default value is 80.
- port_
name str - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port_
specification str - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy_
header str - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request_
path str - The request path of the HTTP health check request. The default value is /.
- response str
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host String
- The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port Number
- The TCP port number for the HTTP health check request. The default value is 80.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header String - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request
Path String - The request path of the HTTP health check request. The default value is /.
- response String
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
HealthCheckHttpsHealthCheck, HealthCheckHttpsHealthCheckArgs
- Host string
- The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- Port int
- The TCP port number for the HTTPS health check request. The default value is 443.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- Proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - Request
Path string - The request path of the HTTPS health check request. The default value is /.
- Response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- Host string
- The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- Port int
- The TCP port number for the HTTPS health check request. The default value is 443.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- Proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - Request
Path string - The request path of the HTTPS health check request. The default value is /.
- Response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host String
- The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port Integer
- The TCP port number for the HTTPS health check request. The default value is 443.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header String - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request
Path String - The request path of the HTTPS health check request. The default value is /.
- response String
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host string
- The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port number
- The TCP port number for the HTTPS health check request. The default value is 443.
- port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request
Path string - The request path of the HTTPS health check request. The default value is /.
- response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host str
- The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port int
- The TCP port number for the HTTPS health check request. The default value is 443.
- port_
name str - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port_
specification str - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy_
header str - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request_
path str - The request path of the HTTPS health check request. The default value is /.
- response str
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- host String
- The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
- port Number
- The TCP port number for the HTTPS health check request. The default value is 443.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header String - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request
Path String - The request path of the HTTPS health check request. The default value is /.
- response String
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
HealthCheckLogConfig, HealthCheckLogConfigArgs
- Enable bool
- Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
- Enable bool
- Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
- enable Boolean
- Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
- enable boolean
- Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
- enable bool
- Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
- enable Boolean
- Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
HealthCheckSslHealthCheck, HealthCheckSslHealthCheckArgs
- Port int
- The TCP port number for the HTTP2 health check request. The default value is 443.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- Proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - Request string
- The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- Response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- Port int
- The TCP port number for the HTTP2 health check request. The default value is 443.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- Proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - Request string
- The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- Response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- port Integer
- The TCP port number for the HTTP2 health check request. The default value is 443.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header String - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request String
- The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- response String
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- port number
- The TCP port number for the HTTP2 health check request. The default value is 443.
- port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request string
- The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- port int
- The TCP port number for the HTTP2 health check request. The default value is 443.
- port_
name str - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port_
specification str - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy_
header str - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request str
- The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- response str
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- port Number
- The TCP port number for the HTTP2 health check request. The default value is 443.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header String - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request String
- The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- response String
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
HealthCheckTcpHealthCheck, HealthCheckTcpHealthCheckArgs
- Port int
- The TCP port number for the TCP health check request. The default value is 443.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- Proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - Request string
- The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- Response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- Port int
- The TCP port number for the TCP health check request. The default value is 443.
- Port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- Port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- Proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - Request string
- The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- Response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- port Integer
- The TCP port number for the TCP health check request. The default value is 443.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header String - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request String
- The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- response String
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- port number
- The TCP port number for the TCP health check request. The default value is 443.
- port
Name string - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification string - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header string - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request string
- The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- response string
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- port int
- The TCP port number for the TCP health check request. The default value is 443.
- port_
name str - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port_
specification str - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy_
header str - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request str
- The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- response str
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
- port Number
- The TCP port number for the TCP health check request. The default value is 443.
- port
Name String - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name are defined, port takes precedence.
- port
Specification String - Specifies how port is selected for health checking, can be one of the
following values:
USE_FIXED_PORT
: The port number inport
is used for health checking.USE_NAMED_PORT
: TheportName
is used for health checking.USE_SERVING_PORT
: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified inport
andportName
fields. Possible values are:USE_FIXED_PORT
,USE_NAMED_PORT
,USE_SERVING_PORT
.
- proxy
Header String - Specifies the type of proxy header to append before sending data to the
backend.
Default value is
NONE
. Possible values are:NONE
,PROXY_V1
. - request String
- The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII.
- response String
- The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII.
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}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.