Class ComputeInstanceTemplate.Builder

    • Method Detail

      • create

        @Stability(Stable)
        public static ComputeInstanceTemplate.Builder create​(software.constructs.Construct scope,
                                                             String id)
        Parameters:
        scope - The scope in which to define this construct. This parameter is required.
        id - The scoped construct ID. This parameter is required.
        Returns:
        a new instance of ComputeInstanceTemplate.Builder.
      • connection

        @Stability(Experimental)
        public ComputeInstanceTemplate.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • connection

        @Stability(Experimental)
        public ComputeInstanceTemplate.Builder connection​(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public ComputeInstanceTemplate.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • dependsOn

        @Stability(Experimental)
        public ComputeInstanceTemplate.Builder dependsOn​(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
        Parameters:
        dependsOn - This parameter is required.
        Returns:
        this
      • forEach

        @Stability(Experimental)
        public ComputeInstanceTemplate.Builder forEach​(com.hashicorp.cdktf.ITerraformIterator forEach)
        Parameters:
        forEach - This parameter is required.
        Returns:
        this
      • lifecycle

        @Stability(Experimental)
        public ComputeInstanceTemplate.Builder lifecycle​(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
        Parameters:
        lifecycle - This parameter is required.
        Returns:
        this
      • provider

        @Stability(Experimental)
        public ComputeInstanceTemplate.Builder provider​(com.hashicorp.cdktf.TerraformProvider provider)
        Parameters:
        provider - This parameter is required.
        Returns:
        this
      • disk

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder disk​(com.hashicorp.cdktf.IResolvable disk)
        disk block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#disk ComputeInstanceTemplate#disk}

        Parameters:
        disk - disk block. This parameter is required.
        Returns:
        this
      • disk

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder disk​(List<? extends ComputeInstanceTemplateDisk> disk)
        disk block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#disk ComputeInstanceTemplate#disk}

        Parameters:
        disk - disk block. This parameter is required.
        Returns:
        this
      • machineType

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder machineType​(String machineType)
        The machine type to create.

        To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#machine_type ComputeInstanceTemplate#machine_type}

        Parameters:
        machineType - The machine type to create. This parameter is required.
        Returns:
        this
      • advancedMachineFeatures

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder advancedMachineFeatures​(ComputeInstanceTemplateAdvancedMachineFeatures advancedMachineFeatures)
        advanced_machine_features block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#advanced_machine_features ComputeInstanceTemplate#advanced_machine_features}

        Parameters:
        advancedMachineFeatures - advanced_machine_features block. This parameter is required.
        Returns:
        this
      • canIpForward

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder canIpForward​(Boolean canIpForward)
        Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#can_ip_forward ComputeInstanceTemplate#can_ip_forward}

        Parameters:
        canIpForward - Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false. This parameter is required.
        Returns:
        this
      • canIpForward

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder canIpForward​(com.hashicorp.cdktf.IResolvable canIpForward)
        Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#can_ip_forward ComputeInstanceTemplate#can_ip_forward}

        Parameters:
        canIpForward - Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false. This parameter is required.
        Returns:
        this
      • confidentialInstanceConfig

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder confidentialInstanceConfig​(ComputeInstanceTemplateConfidentialInstanceConfig confidentialInstanceConfig)
        confidential_instance_config block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#confidential_instance_config ComputeInstanceTemplate#confidential_instance_config}

        Parameters:
        confidentialInstanceConfig - confidential_instance_config block. This parameter is required.
        Returns:
        this
      • description

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder description​(String description)
        A brief description of this resource.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#description ComputeInstanceTemplate#description}

        Parameters:
        description - A brief description of this resource. This parameter is required.
        Returns:
        this
      • guestAccelerator

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder guestAccelerator​(com.hashicorp.cdktf.IResolvable guestAccelerator)
        guest_accelerator block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#guest_accelerator ComputeInstanceTemplate#guest_accelerator}

        Parameters:
        guestAccelerator - guest_accelerator block. This parameter is required.
        Returns:
        this
      • guestAccelerator

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder guestAccelerator​(List<? extends ComputeInstanceTemplateGuestAccelerator> guestAccelerator)
        guest_accelerator block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#guest_accelerator ComputeInstanceTemplate#guest_accelerator}

        Parameters:
        guestAccelerator - guest_accelerator block. This parameter is required.
        Returns:
        this
      • id

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder id​(String id)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#id ComputeInstanceTemplate#id}.

        Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.

        Parameters:
        id - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#id ComputeInstanceTemplate#id}. This parameter is required.
        Returns:
        this
      • instanceDescription

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder instanceDescription​(String instanceDescription)
        A description of the instance.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#instance_description ComputeInstanceTemplate#instance_description}

        Parameters:
        instanceDescription - A description of the instance. This parameter is required.
        Returns:
        this
      • labels

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder labels​(Map<String,​String> labels)
        A set of key/value label pairs to assign to instances created from this template.

        **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. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#labels ComputeInstanceTemplate#labels}

        Parameters:
        labels - A set of key/value label pairs to assign to instances created from this template. This parameter is required.
        Returns:
        this
      • metadata

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder metadata​(Map<String,​String> metadata)
        Metadata key/value pairs to make available from within instances created from this template.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#metadata ComputeInstanceTemplate#metadata}

        Parameters:
        metadata - Metadata key/value pairs to make available from within instances created from this template. This parameter is required.
        Returns:
        this
      • metadataStartupScript

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder metadataStartupScript​(String metadataStartupScript)
        An alternative to using the startup-script metadata key, mostly to match the compute_instance resource.

        This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#metadata_startup_script ComputeInstanceTemplate#metadata_startup_script}

        Parameters:
        metadataStartupScript - An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This parameter is required.
        Returns:
        this
      • minCpuPlatform

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder minCpuPlatform​(String minCpuPlatform)
        Specifies a minimum CPU platform.

        Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#min_cpu_platform ComputeInstanceTemplate#min_cpu_platform}

        Parameters:
        minCpuPlatform - Specifies a minimum CPU platform. This parameter is required.
        Returns:
        this
      • name

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder name​(String name)
        The name of the instance template. If you leave this blank, Terraform will auto-generate a unique name.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#name ComputeInstanceTemplate#name}

        Parameters:
        name - The name of the instance template. If you leave this blank, Terraform will auto-generate a unique name. This parameter is required.
        Returns:
        this
      • namePrefix

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder namePrefix​(String namePrefix)
        Creates a unique name beginning with the specified prefix. Conflicts with name.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#name_prefix ComputeInstanceTemplate#name_prefix}

        Parameters:
        namePrefix - Creates a unique name beginning with the specified prefix. Conflicts with name. This parameter is required.
        Returns:
        this
      • networkInterface

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder networkInterface​(com.hashicorp.cdktf.IResolvable networkInterface)
        network_interface block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#network_interface ComputeInstanceTemplate#network_interface}

        Parameters:
        networkInterface - network_interface block. This parameter is required.
        Returns:
        this
      • networkInterface

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder networkInterface​(List<? extends ComputeInstanceTemplateNetworkInterface> networkInterface)
        network_interface block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#network_interface ComputeInstanceTemplate#network_interface}

        Parameters:
        networkInterface - network_interface block. This parameter is required.
        Returns:
        this
      • networkPerformanceConfig

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder networkPerformanceConfig​(ComputeInstanceTemplateNetworkPerformanceConfig networkPerformanceConfig)
        network_performance_config block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#network_performance_config ComputeInstanceTemplate#network_performance_config}

        Parameters:
        networkPerformanceConfig - network_performance_config block. This parameter is required.
        Returns:
        this
      • project

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder project​(String project)
        The ID of the project in which the resource belongs.

        If it is not provided, the provider project is used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#project ComputeInstanceTemplate#project}

        Parameters:
        project - The ID of the project in which the resource belongs. This parameter is required.
        Returns:
        this
      • region

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder region​(String region)
        An instance template is a global resource that is not bound to a zone or a region.

        However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#region ComputeInstanceTemplate#region}

        Parameters:
        region - An instance template is a global resource that is not bound to a zone or a region. This parameter is required.
        Returns:
        this
      • reservationAffinity

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder reservationAffinity​(ComputeInstanceTemplateReservationAffinity reservationAffinity)
        reservation_affinity block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#reservation_affinity ComputeInstanceTemplate#reservation_affinity}

        Parameters:
        reservationAffinity - reservation_affinity block. This parameter is required.
        Returns:
        this
      • resourceManagerTags

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder resourceManagerTags​(Map<String,​String> resourceManagerTags)
        A map of resource manager tags.

        Resource manager tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#resource_manager_tags ComputeInstanceTemplate#resource_manager_tags}

        Parameters:
        resourceManagerTags - A map of resource manager tags. This parameter is required.
        Returns:
        this
      • resourcePolicies

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder resourcePolicies​(List<String> resourcePolicies)
        A list of self_links of resource policies to attach to the instance.

        Currently a max of 1 resource policy is supported. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#resource_policies ComputeInstanceTemplate#resource_policies}

        Parameters:
        resourcePolicies - A list of self_links of resource policies to attach to the instance. This parameter is required.
        Returns:
        this
      • scheduling

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder scheduling​(ComputeInstanceTemplateScheduling scheduling)
        scheduling block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#scheduling ComputeInstanceTemplate#scheduling}

        Parameters:
        scheduling - scheduling block. This parameter is required.
        Returns:
        this
      • serviceAccount

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder serviceAccount​(ComputeInstanceTemplateServiceAccount serviceAccount)
        service_account block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#service_account ComputeInstanceTemplate#service_account}

        Parameters:
        serviceAccount - service_account block. This parameter is required.
        Returns:
        this
      • shieldedInstanceConfig

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder shieldedInstanceConfig​(ComputeInstanceTemplateShieldedInstanceConfig shieldedInstanceConfig)
        shielded_instance_config block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#shielded_instance_config ComputeInstanceTemplate#shielded_instance_config}

        Parameters:
        shieldedInstanceConfig - shielded_instance_config block. This parameter is required.
        Returns:
        this
      • tags

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder tags​(List<String> tags)
        Tags to attach to the instance.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#tags ComputeInstanceTemplate#tags}

        Parameters:
        tags - Tags to attach to the instance. This parameter is required.
        Returns:
        this
      • timeouts

        @Stability(Stable)
        public ComputeInstanceTemplate.Builder timeouts​(ComputeInstanceTemplateTimeouts timeouts)
        timeouts block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#timeouts ComputeInstanceTemplate#timeouts}

        Parameters:
        timeouts - timeouts block. This parameter is required.
        Returns:
        this