com.pulumi.gcp.compute.kotlin.RegionInstanceGroupManagerArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.compute.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs.builder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerAllInstancesConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerAllInstancesConfigArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerAutoHealingPoliciesArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerAutoHealingPoliciesArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerInstanceLifecyclePolicyArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerInstanceLifecyclePolicyArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerNamedPortArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerNamedPortArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerParamsArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerParamsArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulDiskArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulDiskArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulExternalIpArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulExternalIpArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulInternalIpArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerStatefulInternalIpArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerUpdatePolicyArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerUpdatePolicyArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerVersionArgs
import com.pulumi.gcp.compute.kotlin.inputs.RegionInstanceGroupManagerVersionArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* The Google Compute Engine Regional Instance Group Manager API creates and manages pools
* of homogeneous Compute Engine virtual machine instances from a common instance
* template.
* To get more information about regionInstanceGroupManagers, see:
* * [API documentation](https://cloud.google.com/compute/docs/reference/latest/regionInstanceGroupManagers)
* * How-to Guides
* * [Regional Instance Groups Guide](https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups)
* > **Note:** Use [gcp.compute.InstanceGroupManager](https://www.terraform.io/docs/providers/google/r/compute_instance_group_manager.html) to create a zonal instance group manager.
* ## Example Usage
* ### With Top Level Instance Template (`Google` Provider)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const autohealing = new gcp.compute.HealthCheck("autohealing", {
* name: "autohealing-health-check",
* checkIntervalSec: 5,
* timeoutSec: 5,
* healthyThreshold: 2,
* unhealthyThreshold: 10,
* httpHealthCheck: {
* requestPath: "/healthz",
* port: 8080,
* },
* });
* const appserver = new gcp.compute.RegionInstanceGroupManager("appserver", {
* name: "appserver-igm",
* baseInstanceName: "app",
* region: "us-central1",
* distributionPolicyZones: [
* "us-central1-a",
* "us-central1-f",
* ],
* versions: [{
* instanceTemplate: appserverGoogleComputeInstanceTemplate.selfLinkUnique,
* }],
* allInstancesConfig: {
* metadata: {
* metadata_key: "metadata_value",
* },
* labels: {
* label_key: "label_value",
* },
* },
* targetPools: [appserverGoogleComputeTargetPool.id],
* targetSize: 2,
* namedPorts: [{
* name: "custom",
* port: 8888,
* }],
* autoHealingPolicies: {
* healthCheck: autohealing.id,
* initialDelaySec: 300,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* autohealing = gcp.compute.HealthCheck("autohealing",
* name="autohealing-health-check",
* check_interval_sec=5,
* timeout_sec=5,
* healthy_threshold=2,
* unhealthy_threshold=10,
* http_health_check=gcp.compute.HealthCheckHttpHealthCheckArgs(
* request_path="/healthz",
* port=8080,
* ))
* appserver = gcp.compute.RegionInstanceGroupManager("appserver",
* name="appserver-igm",
* base_instance_name="app",
* region="us-central1",
* distribution_policy_zones=[
* "us-central1-a",
* "us-central1-f",
* ],
* versions=[gcp.compute.RegionInstanceGroupManagerVersionArgs(
* instance_template=appserver_google_compute_instance_template["selfLinkUnique"],
* )],
* all_instances_config=gcp.compute.RegionInstanceGroupManagerAllInstancesConfigArgs(
* metadata={
* "metadata_key": "metadata_value",
* },
* labels={
* "label_key": "label_value",
* },
* ),
* target_pools=[appserver_google_compute_target_pool["id"]],
* target_size=2,
* named_ports=[gcp.compute.RegionInstanceGroupManagerNamedPortArgs(
* name="custom",
* port=8888,
* )],
* auto_healing_policies=gcp.compute.RegionInstanceGroupManagerAutoHealingPoliciesArgs(
* health_check=autohealing.id,
* initial_delay_sec=300,
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var autohealing = new Gcp.Compute.HealthCheck("autohealing", new()
* {
* Name = "autohealing-health-check",
* CheckIntervalSec = 5,
* TimeoutSec = 5,
* HealthyThreshold = 2,
* UnhealthyThreshold = 10,
* HttpHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpHealthCheckArgs
* {
* RequestPath = "/healthz",
* Port = 8080,
* },
* });
* var appserver = new Gcp.Compute.RegionInstanceGroupManager("appserver", new()
* {
* Name = "appserver-igm",
* BaseInstanceName = "app",
* Region = "us-central1",
* DistributionPolicyZones = new[]
* {
* "us-central1-a",
* "us-central1-f",
* },
* Versions = new[]
* {
* new Gcp.Compute.Inputs.RegionInstanceGroupManagerVersionArgs
* {
* InstanceTemplate = appserverGoogleComputeInstanceTemplate.SelfLinkUnique,
* },
* },
* AllInstancesConfig = new Gcp.Compute.Inputs.RegionInstanceGroupManagerAllInstancesConfigArgs
* {
* Metadata =
* {
* { "metadata_key", "metadata_value" },
* },
* Labels =
* {
* { "label_key", "label_value" },
* },
* },
* TargetPools = new[]
* {
* appserverGoogleComputeTargetPool.Id,
* },
* TargetSize = 2,
* NamedPorts = new[]
* {
* new Gcp.Compute.Inputs.RegionInstanceGroupManagerNamedPortArgs
* {
* Name = "custom",
* Port = 8888,
* },
* },
* AutoHealingPolicies = new Gcp.Compute.Inputs.RegionInstanceGroupManagerAutoHealingPoliciesArgs
* {
* HealthCheck = autohealing.Id,
* InitialDelaySec = 300,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* autohealing, err := compute.NewHealthCheck(ctx, "autohealing", &compute.HealthCheckArgs{
* Name: pulumi.String("autohealing-health-check"),
* CheckIntervalSec: pulumi.Int(5),
* TimeoutSec: pulumi.Int(5),
* HealthyThreshold: pulumi.Int(2),
* UnhealthyThreshold: pulumi.Int(10),
* HttpHealthCheck: &compute.HealthCheckHttpHealthCheckArgs{
* RequestPath: pulumi.String("/healthz"),
* Port: pulumi.Int(8080),
* },
* })
* if err != nil {
* return err
* }
* _, err = compute.NewRegionInstanceGroupManager(ctx, "appserver", &compute.RegionInstanceGroupManagerArgs{
* Name: pulumi.String("appserver-igm"),
* BaseInstanceName: pulumi.String("app"),
* Region: pulumi.String("us-central1"),
* DistributionPolicyZones: pulumi.StringArray{
* pulumi.String("us-central1-a"),
* pulumi.String("us-central1-f"),
* },
* Versions: compute.RegionInstanceGroupManagerVersionArray{
* &compute.RegionInstanceGroupManagerVersionArgs{
* InstanceTemplate: pulumi.Any(appserverGoogleComputeInstanceTemplate.SelfLinkUnique),
* },
* },
* AllInstancesConfig: &compute.RegionInstanceGroupManagerAllInstancesConfigArgs{
* Metadata: pulumi.StringMap{
* "metadata_key": pulumi.String("metadata_value"),
* },
* Labels: pulumi.StringMap{
* "label_key": pulumi.String("label_value"),
* },
* },
* TargetPools: pulumi.StringArray{
* appserverGoogleComputeTargetPool.Id,
* },
* TargetSize: pulumi.Int(2),
* NamedPorts: compute.RegionInstanceGroupManagerNamedPortArray{
* &compute.RegionInstanceGroupManagerNamedPortArgs{
* Name: pulumi.String("custom"),
* Port: pulumi.Int(8888),
* },
* },
* AutoHealingPolicies: &compute.RegionInstanceGroupManagerAutoHealingPoliciesArgs{
* HealthCheck: autohealing.ID(),
* InitialDelaySec: pulumi.Int(300),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 com.pulumi.gcp.compute.RegionInstanceGroupManager;
* import com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs;
* import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerVersionArgs;
* import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerAllInstancesConfigArgs;
* import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerNamedPortArgs;
* import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerAutoHealingPoliciesArgs;
* 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 autohealing = new HealthCheck("autohealing", HealthCheckArgs.builder()
* .name("autohealing-health-check")
* .checkIntervalSec(5)
* .timeoutSec(5)
* .healthyThreshold(2)
* .unhealthyThreshold(10)
* .httpHealthCheck(HealthCheckHttpHealthCheckArgs.builder()
* .requestPath("/healthz")
* .port("8080")
* .build())
* .build());
* var appserver = new RegionInstanceGroupManager("appserver", RegionInstanceGroupManagerArgs.builder()
* .name("appserver-igm")
* .baseInstanceName("app")
* .region("us-central1")
* .distributionPolicyZones(
* "us-central1-a",
* "us-central1-f")
* .versions(RegionInstanceGroupManagerVersionArgs.builder()
* .instanceTemplate(appserverGoogleComputeInstanceTemplate.selfLinkUnique())
* .build())
* .allInstancesConfig(RegionInstanceGroupManagerAllInstancesConfigArgs.builder()
* .metadata(Map.of("metadata_key", "metadata_value"))
* .labels(Map.of("label_key", "label_value"))
* .build())
* .targetPools(appserverGoogleComputeTargetPool.id())
* .targetSize(2)
* .namedPorts(RegionInstanceGroupManagerNamedPortArgs.builder()
* .name("custom")
* .port(8888)
* .build())
* .autoHealingPolicies(RegionInstanceGroupManagerAutoHealingPoliciesArgs.builder()
* .healthCheck(autohealing.id())
* .initialDelaySec(300)
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* autohealing:
* type: gcp:compute:HealthCheck
* properties:
* name: autohealing-health-check
* checkIntervalSec: 5
* timeoutSec: 5
* healthyThreshold: 2
* unhealthyThreshold: 10 # 50 seconds
* httpHealthCheck:
* requestPath: /healthz
* port: '8080'
* appserver:
* type: gcp:compute:RegionInstanceGroupManager
* properties:
* name: appserver-igm
* baseInstanceName: app
* region: us-central1
* distributionPolicyZones:
* - us-central1-a
* - us-central1-f
* versions:
* - instanceTemplate: ${appserverGoogleComputeInstanceTemplate.selfLinkUnique}
* allInstancesConfig:
* metadata:
* metadata_key: metadata_value
* labels:
* label_key: label_value
* targetPools:
* - ${appserverGoogleComputeTargetPool.id}
* targetSize: 2
* namedPorts:
* - name: custom
* port: 8888
* autoHealingPolicies:
* healthCheck: ${autohealing.id}
* initialDelaySec: 300
* ```
*
* ### With Multiple Versions
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const appserver = new gcp.compute.RegionInstanceGroupManager("appserver", {
* name: "appserver-igm",
* baseInstanceName: "app",
* region: "us-central1",
* targetSize: 5,
* versions: [
* {
* instanceTemplate: appserverGoogleComputeInstanceTemplate.selfLinkUnique,
* },
* {
* instanceTemplate: appserver_canary.selfLinkUnique,
* targetSize: {
* fixed: 1,
* },
* },
* ],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* appserver = gcp.compute.RegionInstanceGroupManager("appserver",
* name="appserver-igm",
* base_instance_name="app",
* region="us-central1",
* target_size=5,
* versions=[
* gcp.compute.RegionInstanceGroupManagerVersionArgs(
* instance_template=appserver_google_compute_instance_template["selfLinkUnique"],
* ),
* gcp.compute.RegionInstanceGroupManagerVersionArgs(
* instance_template=appserver_canary["selfLinkUnique"],
* target_size=gcp.compute.RegionInstanceGroupManagerVersionTargetSizeArgs(
* fixed=1,
* ),
* ),
* ])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var appserver = new Gcp.Compute.RegionInstanceGroupManager("appserver", new()
* {
* Name = "appserver-igm",
* BaseInstanceName = "app",
* Region = "us-central1",
* TargetSize = 5,
* Versions = new[]
* {
* new Gcp.Compute.Inputs.RegionInstanceGroupManagerVersionArgs
* {
* InstanceTemplate = appserverGoogleComputeInstanceTemplate.SelfLinkUnique,
* },
* new Gcp.Compute.Inputs.RegionInstanceGroupManagerVersionArgs
* {
* InstanceTemplate = appserver_canary.SelfLinkUnique,
* TargetSize = new Gcp.Compute.Inputs.RegionInstanceGroupManagerVersionTargetSizeArgs
* {
* Fixed = 1,
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewRegionInstanceGroupManager(ctx, "appserver", &compute.RegionInstanceGroupManagerArgs{
* Name: pulumi.String("appserver-igm"),
* BaseInstanceName: pulumi.String("app"),
* Region: pulumi.String("us-central1"),
* TargetSize: pulumi.Int(5),
* Versions: compute.RegionInstanceGroupManagerVersionArray{
* &compute.RegionInstanceGroupManagerVersionArgs{
* InstanceTemplate: pulumi.Any(appserverGoogleComputeInstanceTemplate.SelfLinkUnique),
* },
* &compute.RegionInstanceGroupManagerVersionArgs{
* InstanceTemplate: pulumi.Any(appserver_canary.SelfLinkUnique),
* TargetSize: &compute.RegionInstanceGroupManagerVersionTargetSizeArgs{
* Fixed: pulumi.Int(1),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.compute.RegionInstanceGroupManager;
* import com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs;
* import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerVersionArgs;
* import com.pulumi.gcp.compute.inputs.RegionInstanceGroupManagerVersionTargetSizeArgs;
* 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 appserver = new RegionInstanceGroupManager("appserver", RegionInstanceGroupManagerArgs.builder()
* .name("appserver-igm")
* .baseInstanceName("app")
* .region("us-central1")
* .targetSize(5)
* .versions(
* RegionInstanceGroupManagerVersionArgs.builder()
* .instanceTemplate(appserverGoogleComputeInstanceTemplate.selfLinkUnique())
* .build(),
* RegionInstanceGroupManagerVersionArgs.builder()
* .instanceTemplate(appserver_canary.selfLinkUnique())
* .targetSize(RegionInstanceGroupManagerVersionTargetSizeArgs.builder()
* .fixed(1)
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* appserver:
* type: gcp:compute:RegionInstanceGroupManager
* properties:
* name: appserver-igm
* baseInstanceName: app
* region: us-central1
* targetSize: 5
* versions:
* - instanceTemplate: ${appserverGoogleComputeInstanceTemplate.selfLinkUnique}
* - instanceTemplate: ${["appserver-canary"].selfLinkUnique}
* targetSize:
* fixed: 1
* ```
*
* ## Import
* Instance group managers can be imported using any of these accepted formats:
* * `{{name}}`
* When using the `pulumi import` command, instance group managers can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/regionInstanceGroupManager:RegionInstanceGroupManager default {{name}}
* ```
* @property allInstancesConfig Properties to set on all instances in the group. After setting
* allInstancesConfig on the group, you must update the group's instances to
* apply the configuration.
* @property autoHealingPolicies The autohealing policies for this managed instance
* group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
* @property baseInstanceName The base instance name to use for
* instances in this group. The value must be a valid
* [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters
* are lowercase letters, numbers, and hyphens (-). Instances are named by
* appending a hyphen and a random four-character string to the base instance
* name.
* @property description An optional textual description of the instance
* group manager.
* @property distributionPolicyTargetShape The shape to which the group converges either proactively or on resize events (depending on the value set in update_policy.0.instance_redistribution_type). For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/regional-mig-distribution-shape).
* @property distributionPolicyZones The distribution policy for this managed instance
* group. You can specify one or more values. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups#selectingzones).
* @property instanceLifecyclePolicy The instance lifecycle policy for this managed instance group.
* @property listManagedInstancesResults Pagination behavior of the `listManagedInstances` API
* method for this managed instance group. Valid values are: `PAGELESS`, `PAGINATED`.
* If `PAGELESS` (default), Pagination is disabled for the group's `listManagedInstances` API method.
* `maxResults` and `pageToken` query parameters are ignored and all instances are returned in a single
* response. If `PAGINATED`, pagination is enabled, `maxResults` and `pageToken` query parameters are
* respected.
* @property name The name of the instance group manager. Must be 1-63
* characters long and comply with
* [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Supported characters
* include lowercase letters, numbers, and hyphens.
* @property namedPorts The named port configuration. See the section below
* for details on configuration.
* @property params Input only additional params for instance group manager creation. Structure is documented below. For more information, see [API](https://cloud.google.com/compute/docs/reference/rest/beta/instanceGroupManagers/insert).
* - - -
* @property project The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
* @property region The region where the managed instance group resides. If not provided, the provider region is used.
* - - -
* @property statefulDisks Disks created on the instances that will be preserved on instance delete, update, etc. Structure is documented below. For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-disks-in-migs). Proactive cross zone instance redistribution must be disabled before you can update stateful disks on existing instance group managers. This can be controlled via the `update_policy`.
* @property statefulExternalIps External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
* @property statefulInternalIps Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name. Structure is documented below.
* @property targetPools The full URL of all target pools to which new
* instances in the group are added. Updating the target pools attribute does
* not affect existing instances.
* @property targetSize The target number of running instances for this managed instance group. This value should always be explicitly set
* unless this resource is attached to an autoscaler, in which case it should never be set. Defaults to 0.
* @property updatePolicy The update policy for this managed instance group. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/updating-managed-instance-groups) and [API](https://cloud.google.com/compute/docs/reference/rest/beta/regionInstanceGroupManagers/patch)
* @property versions Application versions managed by this instance group. Each
* version deals with a specific instance template, allowing canary release scenarios.
* Structure is documented below.
* @property waitForInstances Whether to wait for all instances to be created/updated before
* returning. Note that if this is set to true and the operation does not succeed, the provider will
* continue trying until it times out.
* @property waitForInstancesStatus When used with `wait_for_instances` it specifies the status to wait for.
* When `STABLE` is specified this resource will wait until the instances are stable before returning. When `UPDATED` is
* set, it will wait for the version target to be reached and any per instance configs to be effective as well as all
* instances to be stable before returning. The possible values are `STABLE` and `UPDATED`
*/
public data class RegionInstanceGroupManagerArgs(
public val allInstancesConfig: Output? = null,
public val autoHealingPolicies: Output? = null,
public val baseInstanceName: Output? = null,
public val description: Output? = null,
public val distributionPolicyTargetShape: Output? = null,
public val distributionPolicyZones: Output>? = null,
public val instanceLifecyclePolicy: Output? =
null,
public val listManagedInstancesResults: Output? = null,
public val name: Output? = null,
public val namedPorts: Output>? = null,
public val params: Output? = null,
public val project: Output? = null,
public val region: Output? = null,
public val statefulDisks: Output>? = null,
public val statefulExternalIps: Output>? =
null,
public val statefulInternalIps: Output>? =
null,
public val targetPools: Output>? = null,
public val targetSize: Output? = null,
public val updatePolicy: Output? = null,
public val versions: Output>? = null,
public val waitForInstances: Output? = null,
public val waitForInstancesStatus: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs =
com.pulumi.gcp.compute.RegionInstanceGroupManagerArgs.builder()
.allInstancesConfig(
allInstancesConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.autoHealingPolicies(
autoHealingPolicies?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.baseInstanceName(baseInstanceName?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.distributionPolicyTargetShape(distributionPolicyTargetShape?.applyValue({ args0 -> args0 }))
.distributionPolicyZones(
distributionPolicyZones?.applyValue({ args0 ->
args0.map({ args0 ->
args0
})
}),
)
.instanceLifecyclePolicy(
instanceLifecyclePolicy?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.listManagedInstancesResults(listManagedInstancesResults?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.namedPorts(
namedPorts?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.params(params?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.project(project?.applyValue({ args0 -> args0 }))
.region(region?.applyValue({ args0 -> args0 }))
.statefulDisks(
statefulDisks?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.statefulExternalIps(
statefulExternalIps?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.statefulInternalIps(
statefulInternalIps?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.targetPools(targetPools?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.targetSize(targetSize?.applyValue({ args0 -> args0 }))
.updatePolicy(updatePolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.versions(
versions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.waitForInstances(waitForInstances?.applyValue({ args0 -> args0 }))
.waitForInstancesStatus(waitForInstancesStatus?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RegionInstanceGroupManagerArgs].
*/
@PulumiTagMarker
public class RegionInstanceGroupManagerArgsBuilder internal constructor() {
private var allInstancesConfig: Output? = null
private var autoHealingPolicies: Output? = null
private var baseInstanceName: Output? = null
private var description: Output? = null
private var distributionPolicyTargetShape: Output? = null
private var distributionPolicyZones: Output>? = null
private var instanceLifecyclePolicy:
Output? = null
private var listManagedInstancesResults: Output? = null
private var name: Output? = null
private var namedPorts: Output>? = null
private var params: Output? = null
private var project: Output? = null
private var region: Output? = null
private var statefulDisks: Output>? = null
private var statefulExternalIps: Output>? =
null
private var statefulInternalIps: Output>? =
null
private var targetPools: Output>? = null
private var targetSize: Output? = null
private var updatePolicy: Output? = null
private var versions: Output>? = null
private var waitForInstances: Output? = null
private var waitForInstancesStatus: Output? = null
/**
* @param value Properties to set on all instances in the group. After setting
* allInstancesConfig on the group, you must update the group's instances to
* apply the configuration.
*/
@JvmName("vtiagifhmuavlerb")
public suspend fun allInstancesConfig(`value`: Output) {
this.allInstancesConfig = value
}
/**
* @param value The autohealing policies for this managed instance
* group. You can specify only one value. Structure is documented below. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances#monitoring_groups).
*/
@JvmName("ibydurnoflnavnfm")
public suspend fun autoHealingPolicies(`value`: Output) {
this.autoHealingPolicies = value
}
/**
* @param value The base instance name to use for
* instances in this group. The value must be a valid
* [RFC1035](https://www.ietf.org/rfc/rfc1035.txt) name. Supported characters
* are lowercase letters, numbers, and hyphens (-). Instances are named by
* appending a hyphen and a random four-character string to the base instance
* name.
*/
@JvmName("kivjnscvxuuncpwd")
public suspend fun baseInstanceName(`value`: Output) {
this.baseInstanceName = value
}
/**
* @param value An optional textual description of the instance
* group manager.
*/
@JvmName("miermfmxucrdkoti")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The shape to which the group converges either proactively or on resize events (depending on the value set in update_policy.0.instance_redistribution_type). For more information see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/regional-mig-distribution-shape).
*/
@JvmName("fudxpjtfexyveugs")
public suspend fun distributionPolicyTargetShape(`value`: Output) {
this.distributionPolicyTargetShape = value
}
/**
* @param value The distribution policy for this managed instance
* group. You can specify one or more values. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups#selectingzones).
*/
@JvmName("plifpdruhdfgkwsn")
public suspend fun distributionPolicyZones(`value`: Output>) {
this.distributionPolicyZones = value
}
@JvmName("cayinbwlhvbofdvj")
public suspend fun distributionPolicyZones(vararg values: Output) {
this.distributionPolicyZones = Output.all(values.asList())
}
/**
* @param values The distribution policy for this managed instance
* group. You can specify one or more values. For more information, see the [official documentation](https://cloud.google.com/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups#selectingzones).
*/
@JvmName("suklxwrjlaotrjvu")
public suspend fun distributionPolicyZones(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy