Class TargetPool
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
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var defaultHttpHealthCheck = new Gcp.Compute.HttpHealthCheck("defaultHttpHealthCheck", new Gcp.Compute.HttpHealthCheckArgs
{
RequestPath = "/",
CheckIntervalSec = 1,
TimeoutSec = 1,
});
var defaultTargetPool = new Gcp.Compute.TargetPool("defaultTargetPool", new Gcp.Compute.TargetPoolArgs
{
Instances =
{
"us-central1-a/myinstance1",
"us-central1-b/myinstance2",
},
HealthChecks =
{
defaultHttpHealthCheck.Name,
},
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Compute
Assembly: Pulumi.Gcp.dll
Syntax
public class TargetPool : CustomResource
Constructors
View SourceTargetPool(String, TargetPoolArgs, CustomResourceOptions)
Create a TargetPool resource with the given unique name, arguments, and options.
Declaration
public TargetPool(string name, TargetPoolArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| TargetPoolArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBackupPool
URL to the backup target pool. Must also set failover_ratio.
Declaration
public Output<string> BackupPool { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
Textual description field.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
FailoverRatio
Ratio (0 to 1) of failed nodes before using the backup pool (which must also be set).
Declaration
public Output<double?> FailoverRatio { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Double>> |
HealthChecks
List of zero or one health check name or self_link. Only
legacy gcp.compute.HttpHealthCheck is supported.
Declaration
public Output<string> HealthChecks { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Instances
List of instances in the pool. They can be given as URLs, or in the form of "zone/name". Note that the instances need not exist at the time of target pool creation, so there is no need to use the interpolation to create a dependency on the instances from the target pool.
Declaration
public Output<ImmutableArray<string>> Instances { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Name
A unique name for the resource, required by GCE. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Region
Where the target pool resides. Defaults to project region.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SelfLink
The URI of the created resource.
Declaration
public Output<string> SelfLink { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SessionAffinity
How to distribute load. Options are "NONE" (no affinity). "CLIENT_IP" (hash of the source/dest addresses / ports), and "CLIENT_IP_PROTO" also includes the protocol (default "NONE").
Declaration
public Output<string> SessionAffinity { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, TargetPoolState, CustomResourceOptions)
Get an existing TargetPool resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static TargetPool Get(string name, Input<string> id, TargetPoolState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| TargetPoolState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| TargetPool |