All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.compute.kotlin.InstanceFromTemplateArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.12.0.0
Show newest version
@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.InstanceFromTemplateArgs.builder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateAdvancedMachineFeaturesArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateAdvancedMachineFeaturesArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateAttachedDiskArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateAttachedDiskArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateBootDiskArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateBootDiskArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateConfidentialInstanceConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateConfidentialInstanceConfigArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateGuestAcceleratorArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateGuestAcceleratorArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateNetworkInterfaceArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateNetworkInterfaceArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateNetworkPerformanceConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateNetworkPerformanceConfigArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateParamsArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateParamsArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateReservationAffinityArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateReservationAffinityArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateSchedulingArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateSchedulingArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateScratchDiskArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateScratchDiskArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateServiceAccountArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateServiceAccountArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateShieldedInstanceConfigArgs
import com.pulumi.gcp.compute.kotlin.inputs.InstanceFromTemplateShieldedInstanceConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a VM instance resource within GCE. For more information see
 * [the official documentation](https://cloud.google.com/compute/docs/instances)
 * and
 * [API](https://cloud.google.com/compute/docs/reference/latest/instances).
 * This resource is specifically to create a compute instance from a given
 * `source_instance_template`. To create an instance without a template, use the
 * `gcp.compute.Instance` resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const tpl = new gcp.compute.InstanceTemplate("tpl", {
 *     name: "template",
 *     machineType: "e2-medium",
 *     disks: [{
 *         sourceImage: "debian-cloud/debian-11",
 *         autoDelete: true,
 *         diskSizeGb: 100,
 *         boot: true,
 *     }],
 *     networkInterfaces: [{
 *         network: "default",
 *     }],
 *     metadata: {
 *         foo: "bar",
 *     },
 *     canIpForward: true,
 * });
 * const tplInstanceFromTemplate = new gcp.compute.InstanceFromTemplate("tpl", {
 *     name: "instance-from-template",
 *     zone: "us-central1-a",
 *     sourceInstanceTemplate: tpl.selfLinkUnique,
 *     canIpForward: false,
 *     labels: {
 *         my_key: "my_value",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * tpl = gcp.compute.InstanceTemplate("tpl",
 *     name="template",
 *     machine_type="e2-medium",
 *     disks=[gcp.compute.InstanceTemplateDiskArgs(
 *         source_image="debian-cloud/debian-11",
 *         auto_delete=True,
 *         disk_size_gb=100,
 *         boot=True,
 *     )],
 *     network_interfaces=[gcp.compute.InstanceTemplateNetworkInterfaceArgs(
 *         network="default",
 *     )],
 *     metadata={
 *         "foo": "bar",
 *     },
 *     can_ip_forward=True)
 * tpl_instance_from_template = gcp.compute.InstanceFromTemplate("tpl",
 *     name="instance-from-template",
 *     zone="us-central1-a",
 *     source_instance_template=tpl.self_link_unique,
 *     can_ip_forward=False,
 *     labels={
 *         "my_key": "my_value",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var tpl = new Gcp.Compute.InstanceTemplate("tpl", new()
 *     {
 *         Name = "template",
 *         MachineType = "e2-medium",
 *         Disks = new[]
 *         {
 *             new Gcp.Compute.Inputs.InstanceTemplateDiskArgs
 *             {
 *                 SourceImage = "debian-cloud/debian-11",
 *                 AutoDelete = true,
 *                 DiskSizeGb = 100,
 *                 Boot = true,
 *             },
 *         },
 *         NetworkInterfaces = new[]
 *         {
 *             new Gcp.Compute.Inputs.InstanceTemplateNetworkInterfaceArgs
 *             {
 *                 Network = "default",
 *             },
 *         },
 *         Metadata =
 *         {
 *             { "foo", "bar" },
 *         },
 *         CanIpForward = true,
 *     });
 *     var tplInstanceFromTemplate = new Gcp.Compute.InstanceFromTemplate("tpl", new()
 *     {
 *         Name = "instance-from-template",
 *         Zone = "us-central1-a",
 *         SourceInstanceTemplate = tpl.SelfLinkUnique,
 *         CanIpForward = false,
 *         Labels =
 *         {
 *             { "my_key", "my_value" },
 *         },
 *     });
 * });
 * ```
 * ```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 {
 * 		tpl, err := compute.NewInstanceTemplate(ctx, "tpl", &compute.InstanceTemplateArgs{
 * 			Name:        pulumi.String("template"),
 * 			MachineType: pulumi.String("e2-medium"),
 * 			Disks: compute.InstanceTemplateDiskArray{
 * 				&compute.InstanceTemplateDiskArgs{
 * 					SourceImage: pulumi.String("debian-cloud/debian-11"),
 * 					AutoDelete:  pulumi.Bool(true),
 * 					DiskSizeGb:  pulumi.Int(100),
 * 					Boot:        pulumi.Bool(true),
 * 				},
 * 			},
 * 			NetworkInterfaces: compute.InstanceTemplateNetworkInterfaceArray{
 * 				&compute.InstanceTemplateNetworkInterfaceArgs{
 * 					Network: pulumi.String("default"),
 * 				},
 * 			},
 * 			Metadata: pulumi.Map{
 * 				"foo": pulumi.Any("bar"),
 * 			},
 * 			CanIpForward: pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewInstanceFromTemplate(ctx, "tpl", &compute.InstanceFromTemplateArgs{
 * 			Name:                   pulumi.String("instance-from-template"),
 * 			Zone:                   pulumi.String("us-central1-a"),
 * 			SourceInstanceTemplate: tpl.SelfLinkUnique,
 * 			CanIpForward:           pulumi.Bool(false),
 * 			Labels: pulumi.StringMap{
 * 				"my_key": pulumi.String("my_value"),
 * 			},
 * 		})
 * 		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.InstanceTemplate;
 * import com.pulumi.gcp.compute.InstanceTemplateArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
 * import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
 * import com.pulumi.gcp.compute.InstanceFromTemplate;
 * import com.pulumi.gcp.compute.InstanceFromTemplateArgs;
 * 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 tpl = new InstanceTemplate("tpl", InstanceTemplateArgs.builder()
 *             .name("template")
 *             .machineType("e2-medium")
 *             .disks(InstanceTemplateDiskArgs.builder()
 *                 .sourceImage("debian-cloud/debian-11")
 *                 .autoDelete(true)
 *                 .diskSizeGb(100)
 *                 .boot(true)
 *                 .build())
 *             .networkInterfaces(InstanceTemplateNetworkInterfaceArgs.builder()
 *                 .network("default")
 *                 .build())
 *             .metadata(Map.of("foo", "bar"))
 *             .canIpForward(true)
 *             .build());
 *         var tplInstanceFromTemplate = new InstanceFromTemplate("tplInstanceFromTemplate", InstanceFromTemplateArgs.builder()
 *             .name("instance-from-template")
 *             .zone("us-central1-a")
 *             .sourceInstanceTemplate(tpl.selfLinkUnique())
 *             .canIpForward(false)
 *             .labels(Map.of("my_key", "my_value"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   tpl:
 *     type: gcp:compute:InstanceTemplate
 *     properties:
 *       name: template
 *       machineType: e2-medium
 *       disks:
 *         - sourceImage: debian-cloud/debian-11
 *           autoDelete: true
 *           diskSizeGb: 100
 *           boot: true
 *       networkInterfaces:
 *         - network: default
 *       metadata:
 *         foo: bar
 *       canIpForward: true
 *   tplInstanceFromTemplate:
 *     type: gcp:compute:InstanceFromTemplate
 *     name: tpl
 *     properties:
 *       name: instance-from-template
 *       zone: us-central1-a
 *       sourceInstanceTemplate: ${tpl.selfLinkUnique}
 *       canIpForward: false
 *       labels:
 *         my_key: my_value
 * ```
 * 
 * ## Import
 * This resource does not support import.
 * @property advancedMachineFeatures Controls for advanced machine-related behavior features.
 * @property allowStoppingForUpdate
 * @property attachedDisks List of disks attached to the instance
 * @property bootDisk The boot disk for the instance.
 * @property canIpForward Whether sending and receiving of packets with non-matching source or destination IPs is allowed.
 * @property confidentialInstanceConfig The Confidential VM config being used by the instance. on_host_maintenance has to be set to TERMINATE or this will fail
 * to create.
 * @property deletionProtection Whether deletion protection is enabled on this instance.
 * @property description A brief description of the resource.
 * @property desiredStatus Desired status of the instance. Either "RUNNING" or "TERMINATED".
 * @property enableDisplay Whether the instance has virtual displays enabled.
 * @property guestAccelerators List of the type and count of accelerator cards attached to the instance.
 * @property hostname A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of
 * labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not
 * exceed 253 characters. Changing this forces a new resource to be created.
 * @property labels A set of key/value label pairs assigned to the instance. **Note**: This field is non-authoritative, and will only manage
 * the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on
 * the resource.
 * @property machineType The machine type to create.
 * @property metadata Metadata key/value pairs made available within the instance.
 * @property metadataStartupScript Metadata startup scripts made available within the instance.
 * @property minCpuPlatform The minimum CPU platform specified for the VM instance.
 * @property name A unique name for the resource, required by GCE.
 * Changing this forces a new resource to be created.
 * @property networkInterfaces The networks attached to the instance.
 * @property networkPerformanceConfig Configures network performance settings for the instance. If not specified, the instance will be created with its
 * default network performance configuration.
 * @property params Stores additional params passed with the request, but not persisted as part of resource payload.
 * @property project The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither
 * self_link nor project are provided, the provider project is used.
 * @property reservationAffinity Specifies the reservations that this instance can consume from.
 * @property resourcePolicies A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.
 * @property scheduling The scheduling strategy being used by the instance.
 * @property scratchDisks The scratch disks attached to the instance.
 * @property serviceAccount The service account to attach to the instance.
 * @property shieldedInstanceConfig The shielded vm config being used by the instance.
 * @property sourceInstanceTemplate Name or self link of an instance
 * template to create the instance based on. It is recommended to reference
 * instance templates through their unique id (`self_link_unique` attribute).
 * - - -
 * @property tags The list of tags attached to the instance.
 * @property zone The zone that the machine should be created in. If not
 * set, the provider zone is used.
 * In addition to these, all arguments from `gcp.compute.Instance` are supported
 * as a way to override the properties in the template. All exported attributes
 * from `gcp.compute.Instance` are likewise exported here.
 */
public data class InstanceFromTemplateArgs(
    public val advancedMachineFeatures: Output? =
        null,
    public val allowStoppingForUpdate: Output? = null,
    public val attachedDisks: Output>? = null,
    public val bootDisk: Output? = null,
    public val canIpForward: Output? = null,
    public val confidentialInstanceConfig: Output? =
        null,
    public val deletionProtection: Output? = null,
    public val description: Output? = null,
    public val desiredStatus: Output? = null,
    public val enableDisplay: Output? = null,
    public val guestAccelerators: Output>? = null,
    public val hostname: Output? = null,
    public val labels: Output>? = null,
    public val machineType: Output? = null,
    public val metadata: Output>? = null,
    public val metadataStartupScript: Output? = null,
    public val minCpuPlatform: Output? = null,
    public val name: Output? = null,
    public val networkInterfaces: Output>? = null,
    public val networkPerformanceConfig: Output? =
        null,
    public val params: Output? = null,
    public val project: Output? = null,
    public val reservationAffinity: Output? = null,
    public val resourcePolicies: Output? = null,
    public val scheduling: Output? = null,
    public val scratchDisks: Output>? = null,
    public val serviceAccount: Output? = null,
    public val shieldedInstanceConfig: Output? = null,
    public val sourceInstanceTemplate: Output? = null,
    public val tags: Output>? = null,
    public val zone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.InstanceFromTemplateArgs =
        com.pulumi.gcp.compute.InstanceFromTemplateArgs.builder()
            .advancedMachineFeatures(
                advancedMachineFeatures?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .allowStoppingForUpdate(allowStoppingForUpdate?.applyValue({ args0 -> args0 }))
            .attachedDisks(
                attachedDisks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .bootDisk(bootDisk?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .canIpForward(canIpForward?.applyValue({ args0 -> args0 }))
            .confidentialInstanceConfig(
                confidentialInstanceConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .deletionProtection(deletionProtection?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .desiredStatus(desiredStatus?.applyValue({ args0 -> args0 }))
            .enableDisplay(enableDisplay?.applyValue({ args0 -> args0 }))
            .guestAccelerators(
                guestAccelerators?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .hostname(hostname?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .machineType(machineType?.applyValue({ args0 -> args0 }))
            .metadata(
                metadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .metadataStartupScript(metadataStartupScript?.applyValue({ args0 -> args0 }))
            .minCpuPlatform(minCpuPlatform?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networkInterfaces(
                networkInterfaces?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .networkPerformanceConfig(
                networkPerformanceConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .params(params?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .project(project?.applyValue({ args0 -> args0 }))
            .reservationAffinity(
                reservationAffinity?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .resourcePolicies(resourcePolicies?.applyValue({ args0 -> args0 }))
            .scheduling(scheduling?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .scratchDisks(
                scratchDisks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .serviceAccount(serviceAccount?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .shieldedInstanceConfig(
                shieldedInstanceConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .sourceInstanceTemplate(sourceInstanceTemplate?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .zone(zone?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [InstanceFromTemplateArgs].
 */
@PulumiTagMarker
public class InstanceFromTemplateArgsBuilder internal constructor() {
    private var advancedMachineFeatures: Output? =
        null

    private var allowStoppingForUpdate: Output? = null

    private var attachedDisks: Output>? = null

    private var bootDisk: Output? = null

    private var canIpForward: Output? = null

    private var confidentialInstanceConfig:
        Output? = null

    private var deletionProtection: Output? = null

    private var description: Output? = null

    private var desiredStatus: Output? = null

    private var enableDisplay: Output? = null

    private var guestAccelerators: Output>? = null

    private var hostname: Output? = null

    private var labels: Output>? = null

    private var machineType: Output? = null

    private var metadata: Output>? = null

    private var metadataStartupScript: Output? = null

    private var minCpuPlatform: Output? = null

    private var name: Output? = null

    private var networkInterfaces: Output>? = null

    private var networkPerformanceConfig: Output? =
        null

    private var params: Output? = null

    private var project: Output? = null

    private var reservationAffinity: Output? = null

    private var resourcePolicies: Output? = null

    private var scheduling: Output? = null

    private var scratchDisks: Output>? = null

    private var serviceAccount: Output? = null

    private var shieldedInstanceConfig: Output? = null

    private var sourceInstanceTemplate: Output? = null

    private var tags: Output>? = null

    private var zone: Output? = null

    /**
     * @param value Controls for advanced machine-related behavior features.
     */
    @JvmName("favcgwpqqmpfcmjg")
    public suspend fun advancedMachineFeatures(`value`: Output) {
        this.advancedMachineFeatures = value
    }

    /**
     * @param value
     */
    @JvmName("iqswuxtpigxkwyup")
    public suspend fun allowStoppingForUpdate(`value`: Output) {
        this.allowStoppingForUpdate = value
    }

    /**
     * @param value List of disks attached to the instance
     */
    @JvmName("nmlfpbjfpvdivahq")
    public suspend fun attachedDisks(`value`: Output>) {
        this.attachedDisks = value
    }

    @JvmName("xxmwggkvkthlvtph")
    public suspend fun attachedDisks(vararg values: Output) {
        this.attachedDisks = Output.all(values.asList())
    }

    /**
     * @param values List of disks attached to the instance
     */
    @JvmName("svilmposanbdwkah")
    public suspend fun attachedDisks(values: List>) {
        this.attachedDisks = Output.all(values)
    }

    /**
     * @param value The boot disk for the instance.
     */
    @JvmName("gerdacgfjpgplilj")
    public suspend fun bootDisk(`value`: Output) {
        this.bootDisk = value
    }

    /**
     * @param value Whether sending and receiving of packets with non-matching source or destination IPs is allowed.
     */
    @JvmName("kvejnbutoqwgigqv")
    public suspend fun canIpForward(`value`: Output) {
        this.canIpForward = value
    }

    /**
     * @param value The Confidential VM config being used by the instance. on_host_maintenance has to be set to TERMINATE or this will fail
     * to create.
     */
    @JvmName("mnlufmlxrsvmbmul")
    public suspend fun confidentialInstanceConfig(`value`: Output) {
        this.confidentialInstanceConfig = value
    }

    /**
     * @param value Whether deletion protection is enabled on this instance.
     */
    @JvmName("vyhxcpqpyipqulcp")
    public suspend fun deletionProtection(`value`: Output) {
        this.deletionProtection = value
    }

    /**
     * @param value A brief description of the resource.
     */
    @JvmName("ruowiocjatvqcwnn")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Desired status of the instance. Either "RUNNING" or "TERMINATED".
     */
    @JvmName("nqjtjqkoyjxqbseu")
    public suspend fun desiredStatus(`value`: Output) {
        this.desiredStatus = value
    }

    /**
     * @param value Whether the instance has virtual displays enabled.
     */
    @JvmName("lqlndnwtmtwmbpfx")
    public suspend fun enableDisplay(`value`: Output) {
        this.enableDisplay = value
    }

    /**
     * @param value List of the type and count of accelerator cards attached to the instance.
     */
    @JvmName("qxoissuhlvcbvoob")
    public suspend fun guestAccelerators(`value`: Output>) {
        this.guestAccelerators = value
    }

    @JvmName("tiondvdgxdaffxdj")
    public suspend fun guestAccelerators(vararg values: Output) {
        this.guestAccelerators = Output.all(values.asList())
    }

    /**
     * @param values List of the type and count of accelerator cards attached to the instance.
     */
    @JvmName("pegeynkckqyyckqy")
    public suspend fun guestAccelerators(values: List>) {
        this.guestAccelerators = Output.all(values)
    }

    /**
     * @param value A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of
     * labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not
     * exceed 253 characters. Changing this forces a new resource to be created.
     */
    @JvmName("dncerygwnguerjhm")
    public suspend fun hostname(`value`: Output) {
        this.hostname = value
    }

    /**
     * @param value A set of key/value label pairs assigned to the instance. **Note**: This field is non-authoritative, and will only manage
     * the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on
     * the resource.
     */
    @JvmName("rinjfnchnuvsdkcd")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The machine type to create.
     */
    @JvmName("wnnywjfynoucfxfr")
    public suspend fun machineType(`value`: Output) {
        this.machineType = value
    }

    /**
     * @param value Metadata key/value pairs made available within the instance.
     */
    @JvmName("krgjmxcybjcnikbq")
    public suspend fun metadata(`value`: Output>) {
        this.metadata = value
    }

    /**
     * @param value Metadata startup scripts made available within the instance.
     */
    @JvmName("gqxucxiacqmaenrb")
    public suspend fun metadataStartupScript(`value`: Output) {
        this.metadataStartupScript = value
    }

    /**
     * @param value The minimum CPU platform specified for the VM instance.
     */
    @JvmName("mifhxuqgfawyyuya")
    public suspend fun minCpuPlatform(`value`: Output) {
        this.minCpuPlatform = value
    }

    /**
     * @param value A unique name for the resource, required by GCE.
     * Changing this forces a new resource to be created.
     */
    @JvmName("yddmnwupcxkcjsqw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The networks attached to the instance.
     */
    @JvmName("gmxyhxbpujpcggxc")
    public suspend fun networkInterfaces(`value`: Output>) {
        this.networkInterfaces = value
    }

    @JvmName("xbtjlxrxtgmehwam")
    public suspend fun networkInterfaces(vararg values: Output) {
        this.networkInterfaces = Output.all(values.asList())
    }

    /**
     * @param values The networks attached to the instance.
     */
    @JvmName("mqlllrtdmvavublr")
    public suspend fun networkInterfaces(values: List>) {
        this.networkInterfaces = Output.all(values)
    }

    /**
     * @param value Configures network performance settings for the instance. If not specified, the instance will be created with its
     * default network performance configuration.
     */
    @JvmName("cxywtqtvhodieumd")
    public suspend fun networkPerformanceConfig(`value`: Output) {
        this.networkPerformanceConfig = value
    }

    /**
     * @param value Stores additional params passed with the request, but not persisted as part of resource payload.
     */
    @JvmName("qtmoaonravdfoebv")
    public suspend fun params(`value`: Output) {
        this.params = value
    }

    /**
     * @param value The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither
     * self_link nor project are provided, the provider project is used.
     */
    @JvmName("mwxehdcswiiugxmi")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Specifies the reservations that this instance can consume from.
     */
    @JvmName("dtqoxpkooebjoqia")
    public suspend fun reservationAffinity(`value`: Output) {
        this.reservationAffinity = value
    }

    /**
     * @param value A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.
     */
    @JvmName("trqhngereaaftdiq")
    public suspend fun resourcePolicies(`value`: Output) {
        this.resourcePolicies = value
    }

    /**
     * @param value The scheduling strategy being used by the instance.
     */
    @JvmName("jjgsnxjbpdofmrpi")
    public suspend fun scheduling(`value`: Output) {
        this.scheduling = value
    }

    /**
     * @param value The scratch disks attached to the instance.
     */
    @JvmName("dnltwrvwicokjndk")
    public suspend fun scratchDisks(`value`: Output>) {
        this.scratchDisks = value
    }

    @JvmName("pkrkqjwdfbobjmrx")
    public suspend fun scratchDisks(vararg values: Output) {
        this.scratchDisks = Output.all(values.asList())
    }

    /**
     * @param values The scratch disks attached to the instance.
     */
    @JvmName("xjndpwflkaiqrbia")
    public suspend fun scratchDisks(values: List>) {
        this.scratchDisks = Output.all(values)
    }

    /**
     * @param value The service account to attach to the instance.
     */
    @JvmName("tsgsxjoalecdjtww")
    public suspend fun serviceAccount(`value`: Output) {
        this.serviceAccount = value
    }

    /**
     * @param value The shielded vm config being used by the instance.
     */
    @JvmName("iupawwawksceyfxc")
    public suspend fun shieldedInstanceConfig(`value`: Output) {
        this.shieldedInstanceConfig = value
    }

    /**
     * @param value Name or self link of an instance
     * template to create the instance based on. It is recommended to reference
     * instance templates through their unique id (`self_link_unique` attribute).
     * - - -
     */
    @JvmName("dsevpwwgwhhcpfmk")
    public suspend fun sourceInstanceTemplate(`value`: Output) {
        this.sourceInstanceTemplate = value
    }

    /**
     * @param value The list of tags attached to the instance.
     */
    @JvmName("gwartcmcxsdwthms")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("wnqpytxvtiohmkxi")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values The list of tags attached to the instance.
     */
    @JvmName("falosukhafthgebh")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The zone that the machine should be created in. If not
     * set, the provider zone is used.
     * In addition to these, all arguments from `gcp.compute.Instance` are supported
     * as a way to override the properties in the template. All exported attributes
     * from `gcp.compute.Instance` are likewise exported here.
     */
    @JvmName("qdlfqkensddbmbjo")
    public suspend fun zone(`value`: Output) {
        this.zone = value
    }

    /**
     * @param value Controls for advanced machine-related behavior features.
     */
    @JvmName("alpvxtexduslcrkf")
    public suspend fun advancedMachineFeatures(`value`: InstanceFromTemplateAdvancedMachineFeaturesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.advancedMachineFeatures = mapped
    }

    /**
     * @param argument Controls for advanced machine-related behavior features.
     */
    @JvmName("cguvfjlmocguovhb")
    public suspend fun advancedMachineFeatures(argument: suspend InstanceFromTemplateAdvancedMachineFeaturesArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceFromTemplateAdvancedMachineFeaturesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.advancedMachineFeatures = mapped
    }

    /**
     * @param value
     */
    @JvmName("vtocnainkvveutwi")
    public suspend fun allowStoppingForUpdate(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowStoppingForUpdate = mapped
    }

    /**
     * @param value List of disks attached to the instance
     */
    @JvmName("vfkyegyccodohfux")
    public suspend fun attachedDisks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.attachedDisks = mapped
    }

    /**
     * @param argument List of disks attached to the instance
     */
    @JvmName("ljwwlhyluytjmpuv")
    public suspend fun attachedDisks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InstanceFromTemplateAttachedDiskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.attachedDisks = mapped
    }

    /**
     * @param argument List of disks attached to the instance
     */
    @JvmName("ryfcifkwfwjwukrp")
    public suspend fun attachedDisks(vararg argument: suspend InstanceFromTemplateAttachedDiskArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InstanceFromTemplateAttachedDiskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.attachedDisks = mapped
    }

    /**
     * @param argument List of disks attached to the instance
     */
    @JvmName("mctgfiodqtuhcyyq")
    public suspend fun attachedDisks(argument: suspend InstanceFromTemplateAttachedDiskArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            InstanceFromTemplateAttachedDiskArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.attachedDisks = mapped
    }

    /**
     * @param values List of disks attached to the instance
     */
    @JvmName("ofurxhwhloolwihf")
    public suspend fun attachedDisks(vararg values: InstanceFromTemplateAttachedDiskArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.attachedDisks = mapped
    }

    /**
     * @param value The boot disk for the instance.
     */
    @JvmName("bgdiclqklnfybahn")
    public suspend fun bootDisk(`value`: InstanceFromTemplateBootDiskArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bootDisk = mapped
    }

    /**
     * @param argument The boot disk for the instance.
     */
    @JvmName("vkfmirvtspxlowyv")
    public suspend fun bootDisk(argument: suspend InstanceFromTemplateBootDiskArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceFromTemplateBootDiskArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.bootDisk = mapped
    }

    /**
     * @param value Whether sending and receiving of packets with non-matching source or destination IPs is allowed.
     */
    @JvmName("hpucucepebqpnejd")
    public suspend fun canIpForward(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.canIpForward = mapped
    }

    /**
     * @param value The Confidential VM config being used by the instance. on_host_maintenance has to be set to TERMINATE or this will fail
     * to create.
     */
    @JvmName("hwurmjwsmbawcrtf")
    public suspend fun confidentialInstanceConfig(`value`: InstanceFromTemplateConfidentialInstanceConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.confidentialInstanceConfig = mapped
    }

    /**
     * @param argument The Confidential VM config being used by the instance. on_host_maintenance has to be set to TERMINATE or this will fail
     * to create.
     */
    @JvmName("sapfupqjbbacgmql")
    public suspend fun confidentialInstanceConfig(argument: suspend InstanceFromTemplateConfidentialInstanceConfigArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceFromTemplateConfidentialInstanceConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.confidentialInstanceConfig = mapped
    }

    /**
     * @param value Whether deletion protection is enabled on this instance.
     */
    @JvmName("qcpvhakstdlpsosc")
    public suspend fun deletionProtection(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deletionProtection = mapped
    }

    /**
     * @param value A brief description of the resource.
     */
    @JvmName("yihfkwegnpbbvymq")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Desired status of the instance. Either "RUNNING" or "TERMINATED".
     */
    @JvmName("mspfyucfuexawhlw")
    public suspend fun desiredStatus(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.desiredStatus = mapped
    }

    /**
     * @param value Whether the instance has virtual displays enabled.
     */
    @JvmName("apcwrrdtljkvloiw")
    public suspend fun enableDisplay(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableDisplay = mapped
    }

    /**
     * @param value List of the type and count of accelerator cards attached to the instance.
     */
    @JvmName("gktjkrbbchdiwqqa")
    public suspend fun guestAccelerators(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.guestAccelerators = mapped
    }

    /**
     * @param argument List of the type and count of accelerator cards attached to the instance.
     */
    @JvmName("srqbfimvfxrkymyh")
    public suspend fun guestAccelerators(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InstanceFromTemplateGuestAcceleratorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.guestAccelerators = mapped
    }

    /**
     * @param argument List of the type and count of accelerator cards attached to the instance.
     */
    @JvmName("knrnqgmbjfimishx")
    public suspend fun guestAccelerators(vararg argument: suspend InstanceFromTemplateGuestAcceleratorArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InstanceFromTemplateGuestAcceleratorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.guestAccelerators = mapped
    }

    /**
     * @param argument List of the type and count of accelerator cards attached to the instance.
     */
    @JvmName("fijcdedxtwxqrvkg")
    public suspend fun guestAccelerators(argument: suspend InstanceFromTemplateGuestAcceleratorArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            InstanceFromTemplateGuestAcceleratorArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.guestAccelerators = mapped
    }

    /**
     * @param values List of the type and count of accelerator cards attached to the instance.
     */
    @JvmName("blcqdsovltawadxb")
    public suspend fun guestAccelerators(vararg values: InstanceFromTemplateGuestAcceleratorArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.guestAccelerators = mapped
    }

    /**
     * @param value A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of
     * labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not
     * exceed 253 characters. Changing this forces a new resource to be created.
     */
    @JvmName("ahfnrgkhxcelvsre")
    public suspend fun hostname(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hostname = mapped
    }

    /**
     * @param value A set of key/value label pairs assigned to the instance. **Note**: This field is non-authoritative, and will only manage
     * the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on
     * the resource.
     */
    @JvmName("rjonxlqqsbvcnbqd")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values A set of key/value label pairs assigned to the instance. **Note**: This field is non-authoritative, and will only manage
     * the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on
     * the resource.
     */
    @JvmName("qhwvgttkloqmlmxh")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The machine type to create.
     */
    @JvmName("rvnptuhjvjnwykls")
    public suspend fun machineType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.machineType = mapped
    }

    /**
     * @param value Metadata key/value pairs made available within the instance.
     */
    @JvmName("wsacsmqdtimpcucg")
    public suspend fun metadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param values Metadata key/value pairs made available within the instance.
     */
    @JvmName("rfydmlsjcvvgpaku")
    public fun metadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param value Metadata startup scripts made available within the instance.
     */
    @JvmName("qoprurqqymtbgdix")
    public suspend fun metadataStartupScript(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadataStartupScript = mapped
    }

    /**
     * @param value The minimum CPU platform specified for the VM instance.
     */
    @JvmName("iwqupnqtnyypntdy")
    public suspend fun minCpuPlatform(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minCpuPlatform = mapped
    }

    /**
     * @param value A unique name for the resource, required by GCE.
     * Changing this forces a new resource to be created.
     */
    @JvmName("oxihdljmimfafipo")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The networks attached to the instance.
     */
    @JvmName("qaloexldpwolfcsf")
    public suspend fun networkInterfaces(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkInterfaces = mapped
    }

    /**
     * @param argument The networks attached to the instance.
     */
    @JvmName("pkqwuqebjghuoaiy")
    public suspend fun networkInterfaces(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InstanceFromTemplateNetworkInterfaceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.networkInterfaces = mapped
    }

    /**
     * @param argument The networks attached to the instance.
     */
    @JvmName("edtwckhtgdnyunsq")
    public suspend fun networkInterfaces(vararg argument: suspend InstanceFromTemplateNetworkInterfaceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InstanceFromTemplateNetworkInterfaceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.networkInterfaces = mapped
    }

    /**
     * @param argument The networks attached to the instance.
     */
    @JvmName("bxemsrvwdfrxvoda")
    public suspend fun networkInterfaces(argument: suspend InstanceFromTemplateNetworkInterfaceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            InstanceFromTemplateNetworkInterfaceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.networkInterfaces = mapped
    }

    /**
     * @param values The networks attached to the instance.
     */
    @JvmName("fpsqeokdwixwpjvb")
    public suspend fun networkInterfaces(vararg values: InstanceFromTemplateNetworkInterfaceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.networkInterfaces = mapped
    }

    /**
     * @param value Configures network performance settings for the instance. If not specified, the instance will be created with its
     * default network performance configuration.
     */
    @JvmName("xjntkfohwavmruig")
    public suspend fun networkPerformanceConfig(`value`: InstanceFromTemplateNetworkPerformanceConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkPerformanceConfig = mapped
    }

    /**
     * @param argument Configures network performance settings for the instance. If not specified, the instance will be created with its
     * default network performance configuration.
     */
    @JvmName("xgralbetachmrjsi")
    public suspend fun networkPerformanceConfig(argument: suspend InstanceFromTemplateNetworkPerformanceConfigArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceFromTemplateNetworkPerformanceConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.networkPerformanceConfig = mapped
    }

    /**
     * @param value Stores additional params passed with the request, but not persisted as part of resource payload.
     */
    @JvmName("sprmtlmjjjfyrsob")
    public suspend fun params(`value`: InstanceFromTemplateParamsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.params = mapped
    }

    /**
     * @param argument Stores additional params passed with the request, but not persisted as part of resource payload.
     */
    @JvmName("wmffbcsfljiqtauj")
    public suspend fun params(argument: suspend InstanceFromTemplateParamsArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceFromTemplateParamsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.params = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither
     * self_link nor project are provided, the provider project is used.
     */
    @JvmName("xiuojdvprcenfxqw")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Specifies the reservations that this instance can consume from.
     */
    @JvmName("grshmhvpjusnovmu")
    public suspend fun reservationAffinity(`value`: InstanceFromTemplateReservationAffinityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reservationAffinity = mapped
    }

    /**
     * @param argument Specifies the reservations that this instance can consume from.
     */
    @JvmName("lwcoatqlqngrowaf")
    public suspend fun reservationAffinity(argument: suspend InstanceFromTemplateReservationAffinityArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceFromTemplateReservationAffinityArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.reservationAffinity = mapped
    }

    /**
     * @param value A list of self_links of resource policies to attach to the instance. Currently a max of 1 resource policy is supported.
     */
    @JvmName("kifgqvdtlyshfmhg")
    public suspend fun resourcePolicies(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourcePolicies = mapped
    }

    /**
     * @param value The scheduling strategy being used by the instance.
     */
    @JvmName("fehwaksyfcnwttfv")
    public suspend fun scheduling(`value`: InstanceFromTemplateSchedulingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduling = mapped
    }

    /**
     * @param argument The scheduling strategy being used by the instance.
     */
    @JvmName("tvsnfxcsituvtulx")
    public suspend fun scheduling(argument: suspend InstanceFromTemplateSchedulingArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceFromTemplateSchedulingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.scheduling = mapped
    }

    /**
     * @param value The scratch disks attached to the instance.
     */
    @JvmName("nfajrysopqbwvlny")
    public suspend fun scratchDisks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scratchDisks = mapped
    }

    /**
     * @param argument The scratch disks attached to the instance.
     */
    @JvmName("pbupxjjdnggdesrp")
    public suspend fun scratchDisks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InstanceFromTemplateScratchDiskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.scratchDisks = mapped
    }

    /**
     * @param argument The scratch disks attached to the instance.
     */
    @JvmName("opokqmqyyochrxck")
    public suspend fun scratchDisks(vararg argument: suspend InstanceFromTemplateScratchDiskArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InstanceFromTemplateScratchDiskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.scratchDisks = mapped
    }

    /**
     * @param argument The scratch disks attached to the instance.
     */
    @JvmName("jyrmxnfdqaplvinm")
    public suspend fun scratchDisks(argument: suspend InstanceFromTemplateScratchDiskArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            InstanceFromTemplateScratchDiskArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.scratchDisks = mapped
    }

    /**
     * @param values The scratch disks attached to the instance.
     */
    @JvmName("juuwfhhovbbnvbbm")
    public suspend fun scratchDisks(vararg values: InstanceFromTemplateScratchDiskArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scratchDisks = mapped
    }

    /**
     * @param value The service account to attach to the instance.
     */
    @JvmName("dixebdysbkduixwp")
    public suspend fun serviceAccount(`value`: InstanceFromTemplateServiceAccountArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccount = mapped
    }

    /**
     * @param argument The service account to attach to the instance.
     */
    @JvmName("uongefjeixikusmr")
    public suspend fun serviceAccount(argument: suspend InstanceFromTemplateServiceAccountArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceFromTemplateServiceAccountArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.serviceAccount = mapped
    }

    /**
     * @param value The shielded vm config being used by the instance.
     */
    @JvmName("pvelufmcmllnxdcr")
    public suspend fun shieldedInstanceConfig(`value`: InstanceFromTemplateShieldedInstanceConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shieldedInstanceConfig = mapped
    }

    /**
     * @param argument The shielded vm config being used by the instance.
     */
    @JvmName("seteqcmgxwifxvni")
    public suspend fun shieldedInstanceConfig(argument: suspend InstanceFromTemplateShieldedInstanceConfigArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceFromTemplateShieldedInstanceConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.shieldedInstanceConfig = mapped
    }

    /**
     * @param value Name or self link of an instance
     * template to create the instance based on. It is recommended to reference
     * instance templates through their unique id (`self_link_unique` attribute).
     * - - -
     */
    @JvmName("uabwbkqxvbnosgln")
    public suspend fun sourceInstanceTemplate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceInstanceTemplate = mapped
    }

    /**
     * @param value The list of tags attached to the instance.
     */
    @JvmName("fyrqshyqlrvdqtjr")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values The list of tags attached to the instance.
     */
    @JvmName("chhmxleacomdohos")
    public suspend fun tags(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The zone that the machine should be created in. If not
     * set, the provider zone is used.
     * In addition to these, all arguments from `gcp.compute.Instance` are supported
     * as a way to override the properties in the template. All exported attributes
     * from `gcp.compute.Instance` are likewise exported here.
     */
    @JvmName("tbjgrfibmhearlfd")
    public suspend fun zone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zone = mapped
    }

    internal fun build(): InstanceFromTemplateArgs = InstanceFromTemplateArgs(
        advancedMachineFeatures = advancedMachineFeatures,
        allowStoppingForUpdate = allowStoppingForUpdate,
        attachedDisks = attachedDisks,
        bootDisk = bootDisk,
        canIpForward = canIpForward,
        confidentialInstanceConfig = confidentialInstanceConfig,
        deletionProtection = deletionProtection,
        description = description,
        desiredStatus = desiredStatus,
        enableDisplay = enableDisplay,
        guestAccelerators = guestAccelerators,
        hostname = hostname,
        labels = labels,
        machineType = machineType,
        metadata = metadata,
        metadataStartupScript = metadataStartupScript,
        minCpuPlatform = minCpuPlatform,
        name = name,
        networkInterfaces = networkInterfaces,
        networkPerformanceConfig = networkPerformanceConfig,
        params = params,
        project = project,
        reservationAffinity = reservationAffinity,
        resourcePolicies = resourcePolicies,
        scheduling = scheduling,
        scratchDisks = scratchDisks,
        serviceAccount = serviceAccount,
        shieldedInstanceConfig = shieldedInstanceConfig,
        sourceInstanceTemplate = sourceInstanceTemplate,
        tags = tags,
        zone = zone,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy