Class ComputeInstanceTemplateConfig.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • disk

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder disk​(com.hashicorp.cdktf.IResolvable disk)
        Parameters:
        disk - disk block. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_instance_template#disk ComputeInstanceTemplate#disk}
        Returns:
        this
      • machineType

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder machineType​(String machineType)
        Parameters:
        machineType - The machine type to create. This parameter is required. 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}
        Returns:
        this
      • canIpForward

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder canIpForward​(Boolean canIpForward)
        Parameters:
        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}
        Returns:
        this
      • canIpForward

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder canIpForward​(com.hashicorp.cdktf.IResolvable canIpForward)
        Parameters:
        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}
        Returns:
        this
      • description

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder description​(String description)
        Parameters:
        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}
        Returns:
        this
      • guestAccelerator

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder guestAccelerator​(com.hashicorp.cdktf.IResolvable guestAccelerator)
        Parameters:
        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}
        Returns:
        this
      • id

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder id​(String id)
        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}. 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.
        Returns:
        this
      • instanceDescription

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder instanceDescription​(String instanceDescription)
        Parameters:
        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}
        Returns:
        this
      • labels

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder labels​(Map<String,​String> labels)
        Parameters:
        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}
        Returns:
        this
      • metadata

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder metadata​(Map<String,​String> metadata)
        Parameters:
        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}
        Returns:
        this
      • metadataStartupScript

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder metadataStartupScript​(String metadataStartupScript)
        Parameters:
        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}
        Returns:
        this
      • minCpuPlatform

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder minCpuPlatform​(String minCpuPlatform)
        Parameters:
        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}
        Returns:
        this
      • name

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder name​(String name)
        Parameters:
        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}
        Returns:
        this
      • namePrefix

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder namePrefix​(String namePrefix)
        Parameters:
        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}
        Returns:
        this
      • networkInterface

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder networkInterface​(com.hashicorp.cdktf.IResolvable networkInterface)
        Parameters:
        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}
        Returns:
        this
      • project

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder project​(String project)
        Parameters:
        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}
        Returns:
        this
      • region

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder region​(String region)
        Parameters:
        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}
        Returns:
        this
      • resourceManagerTags

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder resourceManagerTags​(Map<String,​String> resourceManagerTags)
        Parameters:
        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}
        Returns:
        this
      • resourcePolicies

        @Stability(Stable)
        public ComputeInstanceTemplateConfig.Builder resourcePolicies​(List<String> resourcePolicies)
        Parameters:
        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}
        Returns:
        this
      • connection

        @Stability(Experimental)
        public ComputeInstanceTemplateConfig.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Sets the value of TerraformMetaArguments.getConnection()
        Parameters:
        connection - the value to be set.
        Returns:
        this
      • connection

        @Stability(Experimental)
        public ComputeInstanceTemplateConfig.Builder connection​(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
        Sets the value of TerraformMetaArguments.getConnection()
        Parameters:
        connection - the value to be set.
        Returns:
        this
      • count

        @Stability(Experimental)
        public ComputeInstanceTemplateConfig.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Sets the value of TerraformMetaArguments.getCount()
        Parameters:
        count - the value to be set.
        Returns:
        this
      • dependsOn

        @Stability(Experimental)
        public ComputeInstanceTemplateConfig.Builder dependsOn​(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
        Sets the value of TerraformMetaArguments.getDependsOn()
        Parameters:
        dependsOn - the value to be set.
        Returns:
        this
      • forEach

        @Stability(Experimental)
        public ComputeInstanceTemplateConfig.Builder forEach​(com.hashicorp.cdktf.ITerraformIterator forEach)
        Sets the value of TerraformMetaArguments.getForEach()
        Parameters:
        forEach - the value to be set.
        Returns:
        this
      • lifecycle

        @Stability(Experimental)
        public ComputeInstanceTemplateConfig.Builder lifecycle​(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
        Sets the value of TerraformMetaArguments.getLifecycle()
        Parameters:
        lifecycle - the value to be set.
        Returns:
        this
      • provider

        @Stability(Experimental)
        public ComputeInstanceTemplateConfig.Builder provider​(com.hashicorp.cdktf.TerraformProvider provider)
        Sets the value of TerraformMetaArguments.getProvider()
        Parameters:
        provider - the value to be set.
        Returns:
        this
      • provisioners

        @Stability(Experimental)
        public ComputeInstanceTemplateConfig.Builder provisioners​(List<? extends Object> provisioners)
        Sets the value of TerraformMetaArguments.getProvisioners()
        Parameters:
        provisioners - the value to be set.
        Returns:
        this