Expand description
Manages a Target Pool within GCE. This is a collection of instances used as target of a network load balancer (Forwarding Rule). For more information see the official documentation and API.
§Example Usage
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let default = target_pool::create(
"default",
TargetPoolArgs::builder()
.health_checks("${defaultHttpHealthCheck.name}")
.instances(vec!["us-central1-a/myinstance1", "us-central1-b/myinstance2",])
.name("instance-pool")
.build_struct(),
);
let defaultHttpHealthCheck = http_health_check::create(
"defaultHttpHealthCheck",
HttpHealthCheckArgs::builder()
.check_interval_sec(1)
.name("default")
.request_path("/")
.timeout_sec(1)
.build_struct(),
);
}
§Import
Target pools can be imported using any of the following formats:
-
projects/{{project}}/regions/{{region}}/targetPools/{{name}}
-
{{project}}/{{region}}/{{name}}
-
{{region}}/{{name}}
-
{{name}}
When using the pulumi import
command, target pools can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/targetPool:TargetPool default projects/{{project}}/regions/{{region}}/targetPools/{{name}}
$ pulumi import gcp:compute/targetPool:TargetPool default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:compute/targetPool:TargetPool default {{region}}/{{name}}
$ pulumi import gcp:compute/targetPool:TargetPool 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