com.pulumi.gcp.compute.kotlin.InstanceGroupManagerArgs.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.InstanceGroupManagerArgs.builder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerAllInstancesConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerAllInstancesConfigArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerAutoHealingPoliciesArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerAutoHealingPoliciesArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerInstanceLifecyclePolicyArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerInstanceLifecyclePolicyArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerNamedPortArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerNamedPortArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerParamsArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerParamsArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerStatefulDiskArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerStatefulDiskArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerStatefulExternalIpArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerStatefulExternalIpArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerStatefulInternalIpArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerStatefulInternalIpArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerUpdatePolicyArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerUpdatePolicyArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerVersionArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceGroupManagerVersionArgsBuilder
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 Instance Group Manager API creates and manages pools
* of homogeneous Compute Engine virtual machine instances from a common instance
* template. For more information, see [the official documentation](https://cloud.google.com/compute/docs/instance-groups/manager)
* and [API](https://cloud.google.com/compute/docs/reference/latest/instanceGroupManagers)
* > **Note:** Use [gcp.compute.RegionInstanceGroupManager](https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html) to create a regional (multi-zone) 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.InstanceGroupManager("appserver", {
* name: "appserver-igm",
* baseInstanceName: "app",
* zone: "us-central1-a",
* versions: [{
* instanceTemplate: appserverGoogleComputeInstanceTemplate.selfLinkUnique,
* }],
* allInstancesConfig: {
* metadata: {
* metadata_key: "metadata_value",
* },
* labels: {
* label_key: "label_value",
* },
* },
* targetPools: [appserverGoogleComputeTargetPool.id],
* targetSize: 2,
* namedPorts: [{
* name: "customhttp",
* 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.InstanceGroupManager("appserver",
* name="appserver-igm",
* base_instance_name="app",
* zone="us-central1-a",
* versions=[gcp.compute.InstanceGroupManagerVersionArgs(
* instance_template=appserver_google_compute_instance_template["selfLinkUnique"],
* )],
* all_instances_config=gcp.compute.InstanceGroupManagerAllInstancesConfigArgs(
* 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.InstanceGroupManagerNamedPortArgs(
* name="customhttp",
* port=8888,
* )],
* auto_healing_policies=gcp.compute.InstanceGroupManagerAutoHealingPoliciesArgs(
* 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.InstanceGroupManager("appserver", new()
* {
* Name = "appserver-igm",
* BaseInstanceName = "app",
* Zone = "us-central1-a",
* Versions = new[]
* {
* new Gcp.Compute.Inputs.InstanceGroupManagerVersionArgs
* {
* InstanceTemplate = appserverGoogleComputeInstanceTemplate.SelfLinkUnique,
* },
* },
* AllInstancesConfig = new Gcp.Compute.Inputs.InstanceGroupManagerAllInstancesConfigArgs
* {
* Metadata =
* {
* { "metadata_key", "metadata_value" },
* },
* Labels =
* {
* { "label_key", "label_value" },
* },
* },
* TargetPools = new[]
* {
* appserverGoogleComputeTargetPool.Id,
* },
* TargetSize = 2,
* NamedPorts = new[]
* {
* new Gcp.Compute.Inputs.InstanceGroupManagerNamedPortArgs
* {
* Name = "customhttp",
* Port = 8888,
* },
* },
* AutoHealingPolicies = new Gcp.Compute.Inputs.InstanceGroupManagerAutoHealingPoliciesArgs
* {
* 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.NewInstanceGroupManager(ctx, "appserver", &compute.InstanceGroupManagerArgs{
* Name: pulumi.String("appserver-igm"),
* BaseInstanceName: pulumi.String("app"),
* Zone: pulumi.String("us-central1-a"),
* Versions: compute.InstanceGroupManagerVersionArray{
* &compute.InstanceGroupManagerVersionArgs{
* InstanceTemplate: pulumi.Any(appserverGoogleComputeInstanceTemplate.SelfLinkUnique),
* },
* },
* AllInstancesConfig: &compute.InstanceGroupManagerAllInstancesConfigArgs{
* 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.InstanceGroupManagerNamedPortArray{
* &compute.InstanceGroupManagerNamedPortArgs{
* Name: pulumi.String("customhttp"),
* Port: pulumi.Int(8888),
* },
* },
* AutoHealingPolicies: &compute.InstanceGroupManagerAutoHealingPoliciesArgs{
* 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.InstanceGroupManager;
* import com.pulumi.gcp.compute.InstanceGroupManagerArgs;
* import com.pulumi.gcp.compute.inputs.InstanceGroupManagerVersionArgs;
* import com.pulumi.gcp.compute.inputs.InstanceGroupManagerAllInstancesConfigArgs;
* import com.pulumi.gcp.compute.inputs.InstanceGroupManagerNamedPortArgs;
* import com.pulumi.gcp.compute.inputs.InstanceGroupManagerAutoHealingPoliciesArgs;
* 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 InstanceGroupManager("appserver", InstanceGroupManagerArgs.builder()
* .name("appserver-igm")
* .baseInstanceName("app")
* .zone("us-central1-a")
* .versions(InstanceGroupManagerVersionArgs.builder()
* .instanceTemplate(appserverGoogleComputeInstanceTemplate.selfLinkUnique())
* .build())
* .allInstancesConfig(InstanceGroupManagerAllInstancesConfigArgs.builder()
* .metadata(Map.of("metadata_key", "metadata_value"))
* .labels(Map.of("label_key", "label_value"))
* .build())
* .targetPools(appserverGoogleComputeTargetPool.id())
* .targetSize(2)
* .namedPorts(InstanceGroupManagerNamedPortArgs.builder()
* .name("customhttp")
* .port(8888)
* .build())
* .autoHealingPolicies(InstanceGroupManagerAutoHealingPoliciesArgs.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:InstanceGroupManager
* properties:
* name: appserver-igm
* baseInstanceName: app
* zone: us-central1-a
* versions:
* - instanceTemplate: ${appserverGoogleComputeInstanceTemplate.selfLinkUnique}
* allInstancesConfig:
* metadata:
* metadata_key: metadata_value
* labels:
* label_key: label_value
* targetPools:
* - ${appserverGoogleComputeTargetPool.id}
* targetSize: 2
* namedPorts:
* - name: customhttp
* port: 8888
* autoHealingPolicies:
* healthCheck: ${autohealing.id}
* initialDelaySec: 300
* ```
*
* ### With Multiple Versions (`Google-Beta` Provider)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const appserver = new gcp.compute.InstanceGroupManager("appserver", {
* name: "appserver-igm",
* baseInstanceName: "app",
* zone: "us-central1-a",
* targetSize: 5,
* versions: [
* {
* name: "appserver",
* instanceTemplate: appserverGoogleComputeInstanceTemplate.selfLinkUnique,
* },
* {
* name: "appserver-canary",
* instanceTemplate: appserver_canary.selfLinkUnique,
* targetSize: {
* fixed: 1,
* },
* },
* ],
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* appserver = gcp.compute.InstanceGroupManager("appserver",
* name="appserver-igm",
* base_instance_name="app",
* zone="us-central1-a",
* target_size=5,
* versions=[
* gcp.compute.InstanceGroupManagerVersionArgs(
* name="appserver",
* instance_template=appserver_google_compute_instance_template["selfLinkUnique"],
* ),
* gcp.compute.InstanceGroupManagerVersionArgs(
* name="appserver-canary",
* instance_template=appserver_canary["selfLinkUnique"],
* target_size=gcp.compute.InstanceGroupManagerVersionTargetSizeArgs(
* 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.InstanceGroupManager("appserver", new()
* {
* Name = "appserver-igm",
* BaseInstanceName = "app",
* Zone = "us-central1-a",
* TargetSize = 5,
* Versions = new[]
* {
* new Gcp.Compute.Inputs.InstanceGroupManagerVersionArgs
* {
* Name = "appserver",
* InstanceTemplate = appserverGoogleComputeInstanceTemplate.SelfLinkUnique,
* },
* new Gcp.Compute.Inputs.InstanceGroupManagerVersionArgs
* {
* Name = "appserver-canary",
* InstanceTemplate = appserver_canary.SelfLinkUnique,
* TargetSize = new Gcp.Compute.Inputs.InstanceGroupManagerVersionTargetSizeArgs
* {
* 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.NewInstanceGroupManager(ctx, "appserver", &compute.InstanceGroupManagerArgs{
* Name: pulumi.String("appserver-igm"),
* BaseInstanceName: pulumi.String("app"),
* Zone: pulumi.String("us-central1-a"),
* TargetSize: pulumi.Int(5),
* Versions: compute.InstanceGroupManagerVersionArray{
* &compute.InstanceGroupManagerVersionArgs{
* Name: pulumi.String("appserver"),
* InstanceTemplate: pulumi.Any(appserverGoogleComputeInstanceTemplate.SelfLinkUnique),
* },
* &compute.InstanceGroupManagerVersionArgs{
* Name: pulumi.String("appserver-canary"),
* InstanceTemplate: pulumi.Any(appserver_canary.SelfLinkUnique),
* TargetSize: &compute.InstanceGroupManagerVersionTargetSizeArgs{
* 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.InstanceGroupManager;
* import com.pulumi.gcp.compute.InstanceGroupManagerArgs;
* import com.pulumi.gcp.compute.inputs.InstanceGroupManagerVersionArgs;
* import com.pulumi.gcp.compute.inputs.InstanceGroupManagerVersionTargetSizeArgs;
* 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 InstanceGroupManager("appserver", InstanceGroupManagerArgs.builder()
* .name("appserver-igm")
* .baseInstanceName("app")
* .zone("us-central1-a")
* .targetSize(5)
* .versions(
* InstanceGroupManagerVersionArgs.builder()
* .name("appserver")
* .instanceTemplate(appserverGoogleComputeInstanceTemplate.selfLinkUnique())
* .build(),
* InstanceGroupManagerVersionArgs.builder()
* .name("appserver-canary")
* .instanceTemplate(appserver_canary.selfLinkUnique())
* .targetSize(InstanceGroupManagerVersionTargetSizeArgs.builder()
* .fixed(1)
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* appserver:
* type: gcp:compute:InstanceGroupManager
* properties:
* name: appserver-igm
* baseInstanceName: app
* zone: us-central1-a
* targetSize: 5
* versions:
* - name: appserver
* instanceTemplate: ${appserverGoogleComputeInstanceTemplate.selfLinkUnique}
* - name: appserver-canary
* instanceTemplate: ${["appserver-canary"].selfLinkUnique}
* targetSize:
* fixed: 1
* ```
*
* ## Import
* Instance group managers can be imported using any of these accepted formats:
* * `projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{name}}`
* * `{{project}}/{{zone}}/{{name}}`
* * `{{project}}/{{name}}`
* * `{{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/instanceGroupManager:InstanceGroupManager default projects/{{project}}/zones/{{zone}}/instanceGroupManagers/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/instanceGroupManager:InstanceGroupManager default {{project}}/{{zone}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/instanceGroupManager:InstanceGroupManager default {{project}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/instanceGroupManager:InstanceGroupManager 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 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 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).
* @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/v1/instanceGroupManagers/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, this 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`
* @property zone The zone that instances in this group should be created
* in.
* - - -
*/
public data class InstanceGroupManagerArgs(
public val allInstancesConfig: Output? = null,
public val autoHealingPolicies: Output? = null,
public val baseInstanceName: Output? = null,
public val description: 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 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,
public val zone: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.InstanceGroupManagerArgs =
com.pulumi.gcp.compute.InstanceGroupManagerArgs.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 }))
.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 }))
.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 }))
.zone(zone?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [InstanceGroupManagerArgs].
*/
@PulumiTagMarker
public class InstanceGroupManagerArgsBuilder internal constructor() {
private var allInstancesConfig: Output? = null
private var autoHealingPolicies: Output? = null
private var baseInstanceName: Output? = null
private var description: 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 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
private var zone: 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("mqdhoboxorlnrrrm")
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("xbcugkonkxvkduwr")
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("qipcphaovgqndvqm")
public suspend fun baseInstanceName(`value`: Output) {
this.baseInstanceName = value
}
/**
* @param value An optional textual description of the instance
* group manager.
*/
@JvmName("xxebpwydddldxsmt")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The instance lifecycle policy for this managed instance group.
*/
@JvmName("otovbvlnohtiwhfx")
public suspend fun instanceLifecyclePolicy(`value`: Output) {
this.instanceLifecyclePolicy = value
}
/**
* @param value 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.
*/
@JvmName("ycnfuiwcclgxbpce")
public suspend fun listManagedInstancesResults(`value`: Output) {
this.listManagedInstancesResults = value
}
/**
* @param value 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.
*/
@JvmName("nthqxdrdprtmkcup")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The named port configuration. See the section below
* for details on configuration.
*/
@JvmName("uiwvbhnrbmkwcxsy")
public suspend fun namedPorts(`value`: Output>) {
this.namedPorts = value
}
@JvmName("gkwqselsnajplvqw")
public suspend fun namedPorts(vararg values: Output) {
this.namedPorts = Output.all(values.asList())
}
/**
* @param values The named port configuration. See the section below
* for details on configuration.
*/
@JvmName("livdcwnekonfxrxi")
public suspend fun namedPorts(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy