Expand description
An HttpHealthCheck resource. This resource defines a template for how individual VMs should be checked for health, via HTTP.
Note: gcp.compute.HttpHealthCheck is a legacy health check. The newer gcp.compute.HealthCheck should be preferred for all uses except Network Load Balancers which still require the legacy version.
To get more information about HttpHealthCheck, see:
- API documentation
- How-to Guides
§Example Usage
§Http Health Check Basic
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let default = http_health_check::create(
"default",
HttpHealthCheckArgs::builder()
.check_interval_sec(1)
.name("authentication-health-check")
.request_path("/health_check")
.timeout_sec(1)
.build_struct(),
);
}
§Import
HttpHealthCheck can be imported using any of these accepted formats:
-
projects/{{project}}/global/httpHealthChecks/{{name}}
-
{{project}}/{{name}}
-
{{name}}
When using the pulumi import
command, HttpHealthCheck can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/httpHealthCheck:HttpHealthCheck default projects/{{project}}/global/httpHealthChecks/{{name}}
$ pulumi import gcp:compute/httpHealthCheck:HttpHealthCheck default {{project}}/{{name}}
$ pulumi import gcp:compute/httpHealthCheck:HttpHealthCheck 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