Expand description
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.
To get more information about RegionHealthCheck, see:
- API documentation
- How-to Guides
§Example Usage
§Region Health Check Tcp
resources:
tcp-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: tcp-region-health-check
timeoutSec: 1
checkIntervalSec: 1
tcpHealthCheck:
port: '80'
§Region Health Check Tcp Full
resources:
tcp-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: tcp-region-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
§Region Health Check Ssl
resources:
ssl-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: ssl-region-health-check
timeoutSec: 1
checkIntervalSec: 1
sslHealthCheck:
port: '443'
§Region Health Check Ssl Full
resources:
ssl-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: ssl-region-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
§Region Health Check Http
resources:
http-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: http-region-health-check
timeoutSec: 1
checkIntervalSec: 1
httpHealthCheck:
port: '80'
§Region Health Check Http Logs
resources:
http-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: http-region-health-check
timeoutSec: 1
checkIntervalSec: 1
httpHealthCheck:
port: '80'
logConfig:
enable: true
§Region Health Check Http Full
resources:
http-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: http-region-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
§Region Health Check Https
resources:
https-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: https-region-health-check
timeoutSec: 1
checkIntervalSec: 1
httpsHealthCheck:
port: '443'
§Region Health Check Https Full
resources:
https-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: https-region-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
§Region Health Check Http2
resources:
http2-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: http2-region-health-check
timeoutSec: 1
checkIntervalSec: 1
http2HealthCheck:
port: '443'
§Region Health Check Http2 Full
resources:
http2-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: http2-region-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
§Region Health Check Grpc
resources:
grpc-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: grpc-region-health-check
timeoutSec: 1
checkIntervalSec: 1
grpcHealthCheck:
port: '443'
§Region Health Check Grpc Full
resources:
grpc-region-health-check:
type: gcp:compute:RegionHealthCheck
properties:
name: grpc-region-health-check
timeoutSec: 1
checkIntervalSec: 1
grpcHealthCheck:
portName: health-check-port
portSpecification: USE_NAMED_PORT
grpcServiceName: testservice
§Import
RegionHealthCheck can be imported using any of these accepted formats:
-
projects/{{project}}/regions/{{region}}/healthChecks/{{name}}
-
{{project}}/{{region}}/{{name}}
-
{{region}}/{{name}}
-
{{name}}
When using the pulumi import
command, RegionHealthCheck can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/regionHealthCheck:RegionHealthCheck default projects/{{project}}/regions/{{region}}/healthChecks/{{name}}
$ pulumi import gcp:compute/regionHealthCheck:RegionHealthCheck default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/regionHealthCheck:RegionHealthCheck default {{region}}/{{name}}
$ pulumi import gcp:compute/regionHealthCheck:RegionHealthCheck default {{name}}
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments