Class ComputeInstanceTemplateConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_instance_template.ComputeInstanceTemplateConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeInstanceTemplateConfig>
- Enclosing interface:
- ComputeInstanceTemplateConfig
@Stability(Stable) public static final class ComputeInstanceTemplateConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeInstanceTemplateConfig>
A builder forComputeInstanceTemplateConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
disk
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder disk(com.hashicorp.cdktf.IResolvable disk)
Sets the value ofComputeInstanceTemplateConfig.getDisk()- 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
-
disk
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder disk(List<? extends ComputeInstanceTemplateDisk> disk)
Sets the value ofComputeInstanceTemplateConfig.getDisk()- 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)
Sets the value ofComputeInstanceTemplateConfig.getMachineType()- 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
-
advancedMachineFeatures
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder advancedMachineFeatures(ComputeInstanceTemplateAdvancedMachineFeatures advancedMachineFeatures)
Sets the value ofComputeInstanceTemplateConfig.getAdvancedMachineFeatures()- Parameters:
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}- Returns:
this
-
canIpForward
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder canIpForward(Boolean canIpForward)
Sets the value ofComputeInstanceTemplateConfig.getCanIpForward()- 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)
Sets the value ofComputeInstanceTemplateConfig.getCanIpForward()- 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
-
confidentialInstanceConfig
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder confidentialInstanceConfig(ComputeInstanceTemplateConfidentialInstanceConfig confidentialInstanceConfig)
Sets the value ofComputeInstanceTemplateConfig.getConfidentialInstanceConfig()- Parameters:
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}- Returns:
this
-
description
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder description(String description)
Sets the value ofComputeInstanceTemplateConfig.getDescription()- 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)
Sets the value ofComputeInstanceTemplateConfig.getGuestAccelerator()- 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
-
guestAccelerator
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder guestAccelerator(List<? extends ComputeInstanceTemplateGuestAccelerator> guestAccelerator)
Sets the value ofComputeInstanceTemplateConfig.getGuestAccelerator()- 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)
Sets the value ofComputeInstanceTemplateConfig.getId()- 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)
Sets the value ofComputeInstanceTemplateConfig.getInstanceDescription()- 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)
Sets the value ofComputeInstanceTemplateConfig.getLabels()- 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)
Sets the value ofComputeInstanceTemplateConfig.getMetadata()- 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)
Sets the value ofComputeInstanceTemplateConfig.getMetadataStartupScript()- 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)
Sets the value ofComputeInstanceTemplateConfig.getMinCpuPlatform()- 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)
Sets the value ofComputeInstanceTemplateConfig.getName()- 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)
Sets the value ofComputeInstanceTemplateConfig.getNamePrefix()- 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)
Sets the value ofComputeInstanceTemplateConfig.getNetworkInterface()- 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
-
networkInterface
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder networkInterface(List<? extends ComputeInstanceTemplateNetworkInterface> networkInterface)
Sets the value ofComputeInstanceTemplateConfig.getNetworkInterface()- 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
-
networkPerformanceConfig
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder networkPerformanceConfig(ComputeInstanceTemplateNetworkPerformanceConfig networkPerformanceConfig)
Sets the value ofComputeInstanceTemplateConfig.getNetworkPerformanceConfig()- Parameters:
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}- Returns:
this
-
project
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder project(String project)
Sets the value ofComputeInstanceTemplateConfig.getProject()- 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)
Sets the value ofComputeInstanceTemplateConfig.getRegion()- 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
-
reservationAffinity
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder reservationAffinity(ComputeInstanceTemplateReservationAffinity reservationAffinity)
Sets the value ofComputeInstanceTemplateConfig.getReservationAffinity()- Parameters:
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}- Returns:
this
-
resourceManagerTags
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder resourceManagerTags(Map<String,String> resourceManagerTags)
Sets the value ofComputeInstanceTemplateConfig.getResourceManagerTags()- 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)
Sets the value ofComputeInstanceTemplateConfig.getResourcePolicies()- 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
-
scheduling
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder scheduling(ComputeInstanceTemplateScheduling scheduling)
Sets the value ofComputeInstanceTemplateConfig.getScheduling()- Parameters:
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}- Returns:
this
-
serviceAccount
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder serviceAccount(ComputeInstanceTemplateServiceAccount serviceAccount)
Sets the value ofComputeInstanceTemplateConfig.getServiceAccount()- Parameters:
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}- Returns:
this
-
shieldedInstanceConfig
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder shieldedInstanceConfig(ComputeInstanceTemplateShieldedInstanceConfig shieldedInstanceConfig)
Sets the value ofComputeInstanceTemplateConfig.getShieldedInstanceConfig()- Parameters:
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}- Returns:
this
-
tags
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder tags(List<String> tags)
Sets the value ofComputeInstanceTemplateConfig.getTags()- Parameters:
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}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeInstanceTemplateConfig.Builder timeouts(ComputeInstanceTemplateTimeouts timeouts)
Sets the value ofComputeInstanceTemplateConfig.getTimeouts()- Parameters:
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}- Returns:
this
-
connection
@Stability(Experimental) public ComputeInstanceTemplateConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.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 ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeInstanceTemplateConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeInstanceTemplateConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.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 ofTerraformMetaArguments.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 ofTerraformMetaArguments.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 ofTerraformMetaArguments.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 ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public ComputeInstanceTemplateConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeInstanceTemplateConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeInstanceTemplateConfig>- Returns:
- a new instance of
ComputeInstanceTemplateConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-