Class ComputeDisk.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_disk.ComputeDisk.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeDisk>
- Enclosing class:
- ComputeDisk
@Stability(Stable) public static final class ComputeDisk.Builder extends Object implements software.amazon.jsii.Builder<ComputeDisk>
A fluent builder forComputeDisk.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ComputeDisk.BuilderaccessMode(String accessMode)The accessMode of the disk.ComputeDisk.BuilderasyncPrimaryDisk(ComputeDiskAsyncPrimaryDisk asyncPrimaryDisk)async_primary_disk block.ComputeDiskbuild()ComputeDisk.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)ComputeDisk.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)ComputeDisk.Buildercount(com.hashicorp.cdktf.TerraformCount count)ComputeDisk.Buildercount(Number count)static ComputeDisk.Buildercreate(software.constructs.Construct scope, String id)ComputeDisk.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)ComputeDisk.Builderdescription(String description)An optional description of this resource.ComputeDisk.BuilderdiskEncryptionKey(ComputeDiskDiskEncryptionKey diskEncryptionKey)disk_encryption_key block.ComputeDisk.BuilderenableConfidentialCompute(com.hashicorp.cdktf.IResolvable enableConfidentialCompute)Whether this disk is using confidential compute mode.ComputeDisk.BuilderenableConfidentialCompute(Boolean enableConfidentialCompute)Whether this disk is using confidential compute mode.ComputeDisk.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)ComputeDisk.BuilderguestOsFeatures(com.hashicorp.cdktf.IResolvable guestOsFeatures)guest_os_features block.ComputeDisk.BuilderguestOsFeatures(List<? extends ComputeDiskGuestOsFeatures> guestOsFeatures)guest_os_features block.ComputeDisk.Builderid(String id)Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#id ComputeDisk#id}.ComputeDisk.Builderimage(String image)The image from which to initialize this disk.ComputeDisk.Builderlabels(Map<String,String> labels)Labels to apply to this disk.ComputeDisk.Builderlicenses(List<String> licenses)Any applicable license URI.ComputeDisk.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)ComputeDisk.Buildername(String name)Name of the resource.ComputeDisk.BuilderphysicalBlockSizeBytes(Number physicalBlockSizeBytes)Physical block size of the persistent disk, in bytes.ComputeDisk.Builderproject(String project)Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#project ComputeDisk#project}.ComputeDisk.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)ComputeDisk.BuilderprovisionedIops(Number provisionedIops)Indicates how many IOPS must be provisioned for the disk.ComputeDisk.BuilderprovisionedThroughput(Number provisionedThroughput)Indicates how much Throughput must be provisioned for the disk.ComputeDisk.Builderprovisioners(List<? extends Object> provisioners)ComputeDisk.Buildersize(Number size)Size of the persistent disk, specified in GB.ComputeDisk.Buildersnapshot(String snapshot)The source snapshot used to create this disk.ComputeDisk.BuildersourceDisk(String sourceDisk)The source disk used to create this disk.ComputeDisk.BuildersourceImageEncryptionKey(ComputeDiskSourceImageEncryptionKey sourceImageEncryptionKey)source_image_encryption_key block.ComputeDisk.BuildersourceSnapshotEncryptionKey(ComputeDiskSourceSnapshotEncryptionKey sourceSnapshotEncryptionKey)source_snapshot_encryption_key block.ComputeDisk.BuilderstoragePool(String storagePool)The URL of the storage pool in which the new disk is created.ComputeDisk.Buildertimeouts(ComputeDiskTimeouts timeouts)timeouts block.ComputeDisk.Buildertype(String type)URL of the disk type resource describing which disk type to use to create the disk.ComputeDisk.Builderzone(String zone)A reference to the zone where the disk resides.
-
-
-
Method Detail
-
create
@Stability(Stable) public static ComputeDisk.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
ComputeDisk.Builder.
-
connection
@Stability(Experimental) public ComputeDisk.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
- Parameters:
connection- This parameter is required.- Returns:
this
-
connection
@Stability(Experimental) public ComputeDisk.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
- Parameters:
connection- This parameter is required.- Returns:
this
-
count
@Stability(Experimental) public ComputeDisk.Builder count(Number count)
- Parameters:
count- This parameter is required.- Returns:
this
-
count
@Stability(Experimental) public ComputeDisk.Builder count(com.hashicorp.cdktf.TerraformCount count)
- Parameters:
count- This parameter is required.- Returns:
this
-
dependsOn
@Stability(Experimental) public ComputeDisk.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
- Parameters:
dependsOn- This parameter is required.- Returns:
this
-
forEach
@Stability(Experimental) public ComputeDisk.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
- Parameters:
forEach- This parameter is required.- Returns:
this
-
lifecycle
@Stability(Experimental) public ComputeDisk.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
- Parameters:
lifecycle- This parameter is required.- Returns:
this
-
provider
@Stability(Experimental) public ComputeDisk.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
- Parameters:
provider- This parameter is required.- Returns:
this
-
provisioners
@Stability(Experimental) public ComputeDisk.Builder provisioners(List<? extends Object> provisioners)
- Parameters:
provisioners- This parameter is required.- Returns:
this
-
name
@Stability(Stable) public ComputeDisk.Builder name(String name)
Name of the resource.Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression '[a-z](%5B-a-z0-9%5D*%5Ba-z0-9%5D)?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#name ComputeDisk#name}
- Parameters:
name- Name of the resource. This parameter is required.- Returns:
this
-
accessMode
@Stability(Stable) public ComputeDisk.Builder accessMode(String accessMode)
The accessMode of the disk. For example: * READ_WRITE_SINGLE * READ_WRITE_MANY * READ_ONLY_SINGLE.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#access_mode ComputeDisk#access_mode}
- Parameters:
accessMode- The accessMode of the disk. For example: * READ_WRITE_SINGLE * READ_WRITE_MANY * READ_ONLY_SINGLE. This parameter is required.- Returns:
this
-
asyncPrimaryDisk
@Stability(Stable) public ComputeDisk.Builder asyncPrimaryDisk(ComputeDiskAsyncPrimaryDisk asyncPrimaryDisk)
async_primary_disk block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#async_primary_disk ComputeDisk#async_primary_disk}
- Parameters:
asyncPrimaryDisk- async_primary_disk block. This parameter is required.- Returns:
this
-
description
@Stability(Stable) public ComputeDisk.Builder description(String description)
An optional description of this resource. Provide this property when you create the resource.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#description ComputeDisk#description}
- Parameters:
description- An optional description of this resource. Provide this property when you create the resource. This parameter is required.- Returns:
this
-
diskEncryptionKey
@Stability(Stable) public ComputeDisk.Builder diskEncryptionKey(ComputeDiskDiskEncryptionKey diskEncryptionKey)
disk_encryption_key block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#disk_encryption_key ComputeDisk#disk_encryption_key}
- Parameters:
diskEncryptionKey- disk_encryption_key block. This parameter is required.- Returns:
this
-
enableConfidentialCompute
@Stability(Stable) public ComputeDisk.Builder enableConfidentialCompute(Boolean enableConfidentialCompute)
Whether this disk is using confidential compute mode.Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#enable_confidential_compute ComputeDisk#enable_confidential_compute}
- Parameters:
enableConfidentialCompute- Whether this disk is using confidential compute mode. This parameter is required.- Returns:
this
-
enableConfidentialCompute
@Stability(Stable) public ComputeDisk.Builder enableConfidentialCompute(com.hashicorp.cdktf.IResolvable enableConfidentialCompute)
Whether this disk is using confidential compute mode.Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#enable_confidential_compute ComputeDisk#enable_confidential_compute}
- Parameters:
enableConfidentialCompute- Whether this disk is using confidential compute mode. This parameter is required.- Returns:
this
-
guestOsFeatures
@Stability(Stable) public ComputeDisk.Builder guestOsFeatures(com.hashicorp.cdktf.IResolvable guestOsFeatures)
guest_os_features block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#guest_os_features ComputeDisk#guest_os_features}
- Parameters:
guestOsFeatures- guest_os_features block. This parameter is required.- Returns:
this
-
guestOsFeatures
@Stability(Stable) public ComputeDisk.Builder guestOsFeatures(List<? extends ComputeDiskGuestOsFeatures> guestOsFeatures)
guest_os_features block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#guest_os_features ComputeDisk#guest_os_features}
- Parameters:
guestOsFeatures- guest_os_features block. This parameter is required.- Returns:
this
-
id
@Stability(Stable) public ComputeDisk.Builder id(String id)
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#id ComputeDisk#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_disk#id ComputeDisk#id}. This parameter is required.- Returns:
this
-
image
@Stability(Stable) public ComputeDisk.Builder image(String image)
The image from which to initialize this disk.This can be one of: the image's 'self_link', 'projects/{project}/global/images/{image}', 'projects/{project}/global/images/family/{family}', 'global/images/{image}', 'global/images/family/{family}', 'family/{family}', '{project}/{family}', '{project}/{image}', '{family}', or '{image}'. If referred by family, the images names must include the family name. If they don't, use the [google_compute_image data source](/docs/providers/google/d/compute_image.html). For instance, the image 'centos-6-v20180104' includes its family name 'centos-6'. These images can be referred by family name here. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#image ComputeDisk#image}
- Parameters:
image- The image from which to initialize this disk. This parameter is required.- Returns:
this
-
labels
@Stability(Stable) public ComputeDisk.Builder labels(Map<String,String> labels)
Labels to apply to this disk. A list of key->value pairs.**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_disk#labels ComputeDisk#labels}
- Parameters:
labels- Labels to apply to this disk. A list of key->value pairs. This parameter is required.- Returns:
this
-
licenses
@Stability(Stable) public ComputeDisk.Builder licenses(List<String> licenses)
Any applicable license URI.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#licenses ComputeDisk#licenses}
- Parameters:
licenses- Any applicable license URI. This parameter is required.- Returns:
this
-
physicalBlockSizeBytes
@Stability(Stable) public ComputeDisk.Builder physicalBlockSizeBytes(Number physicalBlockSizeBytes)
Physical block size of the persistent disk, in bytes.If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#physical_block_size_bytes ComputeDisk#physical_block_size_bytes}
- Parameters:
physicalBlockSizeBytes- Physical block size of the persistent disk, in bytes. This parameter is required.- Returns:
this
-
project
@Stability(Stable) public ComputeDisk.Builder project(String project)
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#project ComputeDisk#project}.- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#project ComputeDisk#project}. This parameter is required.- Returns:
this
-
provisionedIops
@Stability(Stable) public ComputeDisk.Builder provisionedIops(Number provisionedIops)
Indicates how many IOPS must be provisioned for the disk.Note: Updating currently is only supported by hyperdisk skus without the need to delete and recreate the disk, hyperdisk allows for an update of IOPS every 4 hours. To update your hyperdisk more frequently, you'll need to manually delete and recreate it Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#provisioned_iops ComputeDisk#provisioned_iops}
- Parameters:
provisionedIops- Indicates how many IOPS must be provisioned for the disk. This parameter is required.- Returns:
this
-
provisionedThroughput
@Stability(Stable) public ComputeDisk.Builder provisionedThroughput(Number provisionedThroughput)
Indicates how much Throughput must be provisioned for the disk.Note: Updating currently is only supported by hyperdisk skus without the need to delete and recreate the disk, hyperdisk allows for an update of Throughput every 4 hours. To update your hyperdisk more frequently, you'll need to manually delete and recreate it Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#provisioned_throughput ComputeDisk#provisioned_throughput}
- Parameters:
provisionedThroughput- Indicates how much Throughput must be provisioned for the disk. This parameter is required.- Returns:
this
-
size
@Stability(Stable) public ComputeDisk.Builder size(Number size)
Size of the persistent disk, specified in GB.You can specify this field when creating a persistent disk using the 'image' or 'snapshot' parameter, or specify it alone to create an empty persistent disk. If you specify this field along with 'image' or 'snapshot', the value must not be less than the size of the image or the size of the snapshot. ~>**NOTE** If you change the size, Terraform updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can add 'lifecycle.prevent_destroy' in the config to prevent destroying and recreating. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#size ComputeDisk#size}
- Parameters:
size- Size of the persistent disk, specified in GB. This parameter is required.- Returns:
this
-
snapshot
@Stability(Stable) public ComputeDisk.Builder snapshot(String snapshot)
The source snapshot used to create this disk.You can provide this as a partial or full URL to the resource. If the snapshot is in another project than this disk, you must supply a full URL. For example, the following are valid values: * 'https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot' * 'projects/project/global/snapshots/snapshot' * 'global/snapshots/snapshot' * 'snapshot' Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#snapshot ComputeDisk#snapshot}
- Parameters:
snapshot- The source snapshot used to create this disk. This parameter is required.- Returns:
this
-
sourceDisk
@Stability(Stable) public ComputeDisk.Builder sourceDisk(String sourceDisk)
The source disk used to create this disk.You can provide this as a partial or full URL to the resource. For example, the following are valid values: * https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks/{disk} * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/disks/{disk} * projects/{project}/zones/{zone}/disks/{disk} * projects/{project}/regions/{region}/disks/{disk} * zones/{zone}/disks/{disk} * regions/{region}/disks/{disk} Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#source_disk ComputeDisk#source_disk}
- Parameters:
sourceDisk- The source disk used to create this disk. This parameter is required.- Returns:
this
-
sourceImageEncryptionKey
@Stability(Stable) public ComputeDisk.Builder sourceImageEncryptionKey(ComputeDiskSourceImageEncryptionKey sourceImageEncryptionKey)
source_image_encryption_key block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#source_image_encryption_key ComputeDisk#source_image_encryption_key}
- Parameters:
sourceImageEncryptionKey- source_image_encryption_key block. This parameter is required.- Returns:
this
-
sourceSnapshotEncryptionKey
@Stability(Stable) public ComputeDisk.Builder sourceSnapshotEncryptionKey(ComputeDiskSourceSnapshotEncryptionKey sourceSnapshotEncryptionKey)
source_snapshot_encryption_key block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#source_snapshot_encryption_key ComputeDisk#source_snapshot_encryption_key}
- Parameters:
sourceSnapshotEncryptionKey- source_snapshot_encryption_key block. This parameter is required.- Returns:
this
-
storagePool
@Stability(Stable) public ComputeDisk.Builder storagePool(String storagePool)
The URL of the storage pool in which the new disk is created. For example: * https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/storagePools/{storagePool} * /projects/{project}/zones/{zone}/storagePools/{storagePool}.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#storage_pool ComputeDisk#storage_pool}
- Parameters:
storagePool- The URL of the storage pool in which the new disk is created. For example: * https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/storagePools/{storagePool} * /projects/{project}/zones/{zone}/storagePools/{storagePool}. This parameter is required.- Returns:
this
-
timeouts
@Stability(Stable) public ComputeDisk.Builder timeouts(ComputeDiskTimeouts timeouts)
timeouts block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#timeouts ComputeDisk#timeouts}
- Parameters:
timeouts- timeouts block. This parameter is required.- Returns:
this
-
type
@Stability(Stable) public ComputeDisk.Builder type(String type)
URL of the disk type resource describing which disk type to use to create the disk.Provide this when creating the disk. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#type ComputeDisk#type}
- Parameters:
type- URL of the disk type resource describing which disk type to use to create the disk. This parameter is required.- Returns:
this
-
zone
@Stability(Stable) public ComputeDisk.Builder zone(String zone)
A reference to the zone where the disk resides.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_disk#zone ComputeDisk#zone}
- Parameters:
zone- A reference to the zone where the disk resides. This parameter is required.- Returns:
this
-
build
@Stability(Stable) public ComputeDisk build()
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeDisk>- Returns:
- a newly built instance of
ComputeDisk.
-
-