gcp.compute.Disk
Explore with Pulumi AI
Persistent disks are durable storage devices that function similarly to the physical disks in a desktop or a server. Compute Engine manages the hardware behind these devices to ensure data redundancy and optimize performance for you. Persistent disks are available as either standard hard disk drives (HDD) or solid-state drives (SSD).
Persistent disks are located independently from your virtual machine instances, so you can detach or move persistent disks to keep your data even after you delete your instances. Persistent disk performance scales automatically with size, so you can resize your existing persistent disks or add more persistent disks to an instance to meet your performance and storage space requirements.
Add a persistent disk to your instance when you need reliable and affordable storage with consistent performance characteristics.
To get more information about Disk, see:
- API documentation
- How-to Guides
Example Usage
Disk Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.compute.Disk("default", {
name: "test-disk",
type: "pd-ssd",
zone: "us-central1-a",
image: "debian-11-bullseye-v20220719",
labels: {
environment: "dev",
},
physicalBlockSizeBytes: 4096,
});
import pulumi
import pulumi_gcp as gcp
default = gcp.compute.Disk("default",
name="test-disk",
type="pd-ssd",
zone="us-central1-a",
image="debian-11-bullseye-v20220719",
labels={
"environment": "dev",
},
physical_block_size_bytes=4096)
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 {
_, err := compute.NewDisk(ctx, "default", &compute.DiskArgs{
Name: pulumi.String("test-disk"),
Type: pulumi.String("pd-ssd"),
Zone: pulumi.String("us-central1-a"),
Image: pulumi.String("debian-11-bullseye-v20220719"),
Labels: pulumi.StringMap{
"environment": pulumi.String("dev"),
},
PhysicalBlockSizeBytes: pulumi.Int(4096),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.Compute.Disk("default", new()
{
Name = "test-disk",
Type = "pd-ssd",
Zone = "us-central1-a",
Image = "debian-11-bullseye-v20220719",
Labels =
{
{ "environment", "dev" },
},
PhysicalBlockSizeBytes = 4096,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Disk;
import com.pulumi.gcp.compute.DiskArgs;
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 default_ = new Disk("default", DiskArgs.builder()
.name("test-disk")
.type("pd-ssd")
.zone("us-central1-a")
.image("debian-11-bullseye-v20220719")
.labels(Map.of("environment", "dev"))
.physicalBlockSizeBytes(4096)
.build());
}
}
resources:
default:
type: gcp:compute:Disk
properties:
name: test-disk
type: pd-ssd
zone: us-central1-a
image: debian-11-bullseye-v20220719
labels:
environment: dev
physicalBlockSizeBytes: 4096
Disk Async
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.compute.Disk("primary", {
name: "async-test-disk",
type: "pd-ssd",
zone: "us-central1-a",
physicalBlockSizeBytes: 4096,
});
const secondary = new gcp.compute.Disk("secondary", {
name: "async-secondary-test-disk",
type: "pd-ssd",
zone: "us-east1-c",
asyncPrimaryDisk: {
disk: primary.id,
},
physicalBlockSizeBytes: 4096,
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.compute.Disk("primary",
name="async-test-disk",
type="pd-ssd",
zone="us-central1-a",
physical_block_size_bytes=4096)
secondary = gcp.compute.Disk("secondary",
name="async-secondary-test-disk",
type="pd-ssd",
zone="us-east1-c",
async_primary_disk=gcp.compute.DiskAsyncPrimaryDiskArgs(
disk=primary.id,
),
physical_block_size_bytes=4096)
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 {
primary, err := compute.NewDisk(ctx, "primary", &compute.DiskArgs{
Name: pulumi.String("async-test-disk"),
Type: pulumi.String("pd-ssd"),
Zone: pulumi.String("us-central1-a"),
PhysicalBlockSizeBytes: pulumi.Int(4096),
})
if err != nil {
return err
}
_, err = compute.NewDisk(ctx, "secondary", &compute.DiskArgs{
Name: pulumi.String("async-secondary-test-disk"),
Type: pulumi.String("pd-ssd"),
Zone: pulumi.String("us-east1-c"),
AsyncPrimaryDisk: &compute.DiskAsyncPrimaryDiskArgs{
Disk: primary.ID(),
},
PhysicalBlockSizeBytes: pulumi.Int(4096),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.Compute.Disk("primary", new()
{
Name = "async-test-disk",
Type = "pd-ssd",
Zone = "us-central1-a",
PhysicalBlockSizeBytes = 4096,
});
var secondary = new Gcp.Compute.Disk("secondary", new()
{
Name = "async-secondary-test-disk",
Type = "pd-ssd",
Zone = "us-east1-c",
AsyncPrimaryDisk = new Gcp.Compute.Inputs.DiskAsyncPrimaryDiskArgs
{
Disk = primary.Id,
},
PhysicalBlockSizeBytes = 4096,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Disk;
import com.pulumi.gcp.compute.DiskArgs;
import com.pulumi.gcp.compute.inputs.DiskAsyncPrimaryDiskArgs;
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 primary = new Disk("primary", DiskArgs.builder()
.name("async-test-disk")
.type("pd-ssd")
.zone("us-central1-a")
.physicalBlockSizeBytes(4096)
.build());
var secondary = new Disk("secondary", DiskArgs.builder()
.name("async-secondary-test-disk")
.type("pd-ssd")
.zone("us-east1-c")
.asyncPrimaryDisk(DiskAsyncPrimaryDiskArgs.builder()
.disk(primary.id())
.build())
.physicalBlockSizeBytes(4096)
.build());
}
}
resources:
primary:
type: gcp:compute:Disk
properties:
name: async-test-disk
type: pd-ssd
zone: us-central1-a
physicalBlockSizeBytes: 4096
secondary:
type: gcp:compute:Disk
properties:
name: async-secondary-test-disk
type: pd-ssd
zone: us-east1-c
asyncPrimaryDisk:
disk: ${primary.id}
physicalBlockSizeBytes: 4096
Disk Features
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.compute.Disk("default", {
name: "test-disk-features",
type: "pd-ssd",
zone: "us-central1-a",
labels: {
environment: "dev",
},
guestOsFeatures: [
{
type: "SECURE_BOOT",
},
{
type: "MULTI_IP_SUBNET",
},
{
type: "WINDOWS",
},
],
licenses: ["https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core"],
physicalBlockSizeBytes: 4096,
});
import pulumi
import pulumi_gcp as gcp
default = gcp.compute.Disk("default",
name="test-disk-features",
type="pd-ssd",
zone="us-central1-a",
labels={
"environment": "dev",
},
guest_os_features=[
gcp.compute.DiskGuestOsFeatureArgs(
type="SECURE_BOOT",
),
gcp.compute.DiskGuestOsFeatureArgs(
type="MULTI_IP_SUBNET",
),
gcp.compute.DiskGuestOsFeatureArgs(
type="WINDOWS",
),
],
licenses=["https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core"],
physical_block_size_bytes=4096)
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 {
_, err := compute.NewDisk(ctx, "default", &compute.DiskArgs{
Name: pulumi.String("test-disk-features"),
Type: pulumi.String("pd-ssd"),
Zone: pulumi.String("us-central1-a"),
Labels: pulumi.StringMap{
"environment": pulumi.String("dev"),
},
GuestOsFeatures: compute.DiskGuestOsFeatureArray{
&compute.DiskGuestOsFeatureArgs{
Type: pulumi.String("SECURE_BOOT"),
},
&compute.DiskGuestOsFeatureArgs{
Type: pulumi.String("MULTI_IP_SUBNET"),
},
&compute.DiskGuestOsFeatureArgs{
Type: pulumi.String("WINDOWS"),
},
},
Licenses: pulumi.StringArray{
pulumi.String("https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core"),
},
PhysicalBlockSizeBytes: pulumi.Int(4096),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.Compute.Disk("default", new()
{
Name = "test-disk-features",
Type = "pd-ssd",
Zone = "us-central1-a",
Labels =
{
{ "environment", "dev" },
},
GuestOsFeatures = new[]
{
new Gcp.Compute.Inputs.DiskGuestOsFeatureArgs
{
Type = "SECURE_BOOT",
},
new Gcp.Compute.Inputs.DiskGuestOsFeatureArgs
{
Type = "MULTI_IP_SUBNET",
},
new Gcp.Compute.Inputs.DiskGuestOsFeatureArgs
{
Type = "WINDOWS",
},
},
Licenses = new[]
{
"https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core",
},
PhysicalBlockSizeBytes = 4096,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Disk;
import com.pulumi.gcp.compute.DiskArgs;
import com.pulumi.gcp.compute.inputs.DiskGuestOsFeatureArgs;
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 default_ = new Disk("default", DiskArgs.builder()
.name("test-disk-features")
.type("pd-ssd")
.zone("us-central1-a")
.labels(Map.of("environment", "dev"))
.guestOsFeatures(
DiskGuestOsFeatureArgs.builder()
.type("SECURE_BOOT")
.build(),
DiskGuestOsFeatureArgs.builder()
.type("MULTI_IP_SUBNET")
.build(),
DiskGuestOsFeatureArgs.builder()
.type("WINDOWS")
.build())
.licenses("https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core")
.physicalBlockSizeBytes(4096)
.build());
}
}
resources:
default:
type: gcp:compute:Disk
properties:
name: test-disk-features
type: pd-ssd
zone: us-central1-a
labels:
environment: dev
guestOsFeatures:
- type: SECURE_BOOT
- type: MULTI_IP_SUBNET
- type: WINDOWS
licenses:
- https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core
physicalBlockSizeBytes: 4096
Create Disk Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Disk(name: string, args?: DiskArgs, opts?: CustomResourceOptions);
@overload
def Disk(resource_name: str,
args: Optional[DiskArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Disk(resource_name: str,
opts: Optional[ResourceOptions] = None,
async_primary_disk: Optional[DiskAsyncPrimaryDiskArgs] = None,
description: Optional[str] = None,
disk_encryption_key: Optional[DiskDiskEncryptionKeyArgs] = None,
enable_confidential_compute: Optional[bool] = None,
guest_os_features: Optional[Sequence[DiskGuestOsFeatureArgs]] = None,
image: Optional[str] = None,
interface: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
licenses: Optional[Sequence[str]] = None,
multi_writer: Optional[bool] = None,
name: Optional[str] = None,
physical_block_size_bytes: Optional[int] = None,
project: Optional[str] = None,
provisioned_iops: Optional[int] = None,
provisioned_throughput: Optional[int] = None,
resource_policies: Optional[Sequence[str]] = None,
size: Optional[int] = None,
snapshot: Optional[str] = None,
source_disk: Optional[str] = None,
source_image_encryption_key: Optional[DiskSourceImageEncryptionKeyArgs] = None,
source_snapshot_encryption_key: Optional[DiskSourceSnapshotEncryptionKeyArgs] = None,
storage_pool: Optional[str] = None,
type: Optional[str] = None,
zone: Optional[str] = None)
func NewDisk(ctx *Context, name string, args *DiskArgs, opts ...ResourceOption) (*Disk, error)
public Disk(string name, DiskArgs? args = null, CustomResourceOptions? opts = null)
type: gcp:compute:Disk
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DiskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DiskArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DiskArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DiskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DiskArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var diskResource = new Gcp.Compute.Disk("diskResource", new()
{
AsyncPrimaryDisk = new Gcp.Compute.Inputs.DiskAsyncPrimaryDiskArgs
{
Disk = "string",
},
Description = "string",
DiskEncryptionKey = new Gcp.Compute.Inputs.DiskDiskEncryptionKeyArgs
{
KmsKeySelfLink = "string",
KmsKeyServiceAccount = "string",
RawKey = "string",
RsaEncryptedKey = "string",
Sha256 = "string",
},
EnableConfidentialCompute = false,
GuestOsFeatures = new[]
{
new Gcp.Compute.Inputs.DiskGuestOsFeatureArgs
{
Type = "string",
},
},
Image = "string",
Labels =
{
{ "string", "string" },
},
Licenses = new[]
{
"string",
},
MultiWriter = false,
Name = "string",
PhysicalBlockSizeBytes = 0,
Project = "string",
ProvisionedIops = 0,
ProvisionedThroughput = 0,
ResourcePolicies = new[]
{
"string",
},
Size = 0,
Snapshot = "string",
SourceDisk = "string",
SourceImageEncryptionKey = new Gcp.Compute.Inputs.DiskSourceImageEncryptionKeyArgs
{
KmsKeySelfLink = "string",
KmsKeyServiceAccount = "string",
RawKey = "string",
Sha256 = "string",
},
SourceSnapshotEncryptionKey = new Gcp.Compute.Inputs.DiskSourceSnapshotEncryptionKeyArgs
{
KmsKeySelfLink = "string",
KmsKeyServiceAccount = "string",
RawKey = "string",
Sha256 = "string",
},
StoragePool = "string",
Type = "string",
Zone = "string",
});
example, err := compute.NewDisk(ctx, "diskResource", &compute.DiskArgs{
AsyncPrimaryDisk: &compute.DiskAsyncPrimaryDiskArgs{
Disk: pulumi.String("string"),
},
Description: pulumi.String("string"),
DiskEncryptionKey: &compute.DiskDiskEncryptionKeyArgs{
KmsKeySelfLink: pulumi.String("string"),
KmsKeyServiceAccount: pulumi.String("string"),
RawKey: pulumi.String("string"),
RsaEncryptedKey: pulumi.String("string"),
Sha256: pulumi.String("string"),
},
EnableConfidentialCompute: pulumi.Bool(false),
GuestOsFeatures: compute.DiskGuestOsFeatureArray{
&compute.DiskGuestOsFeatureArgs{
Type: pulumi.String("string"),
},
},
Image: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Licenses: pulumi.StringArray{
pulumi.String("string"),
},
MultiWriter: pulumi.Bool(false),
Name: pulumi.String("string"),
PhysicalBlockSizeBytes: pulumi.Int(0),
Project: pulumi.String("string"),
ProvisionedIops: pulumi.Int(0),
ProvisionedThroughput: pulumi.Int(0),
ResourcePolicies: pulumi.StringArray{
pulumi.String("string"),
},
Size: pulumi.Int(0),
Snapshot: pulumi.String("string"),
SourceDisk: pulumi.String("string"),
SourceImageEncryptionKey: &compute.DiskSourceImageEncryptionKeyArgs{
KmsKeySelfLink: pulumi.String("string"),
KmsKeyServiceAccount: pulumi.String("string"),
RawKey: pulumi.String("string"),
Sha256: pulumi.String("string"),
},
SourceSnapshotEncryptionKey: &compute.DiskSourceSnapshotEncryptionKeyArgs{
KmsKeySelfLink: pulumi.String("string"),
KmsKeyServiceAccount: pulumi.String("string"),
RawKey: pulumi.String("string"),
Sha256: pulumi.String("string"),
},
StoragePool: pulumi.String("string"),
Type: pulumi.String("string"),
Zone: pulumi.String("string"),
})
var diskResource = new Disk("diskResource", DiskArgs.builder()
.asyncPrimaryDisk(DiskAsyncPrimaryDiskArgs.builder()
.disk("string")
.build())
.description("string")
.diskEncryptionKey(DiskDiskEncryptionKeyArgs.builder()
.kmsKeySelfLink("string")
.kmsKeyServiceAccount("string")
.rawKey("string")
.rsaEncryptedKey("string")
.sha256("string")
.build())
.enableConfidentialCompute(false)
.guestOsFeatures(DiskGuestOsFeatureArgs.builder()
.type("string")
.build())
.image("string")
.labels(Map.of("string", "string"))
.licenses("string")
.multiWriter(false)
.name("string")
.physicalBlockSizeBytes(0)
.project("string")
.provisionedIops(0)
.provisionedThroughput(0)
.resourcePolicies("string")
.size(0)
.snapshot("string")
.sourceDisk("string")
.sourceImageEncryptionKey(DiskSourceImageEncryptionKeyArgs.builder()
.kmsKeySelfLink("string")
.kmsKeyServiceAccount("string")
.rawKey("string")
.sha256("string")
.build())
.sourceSnapshotEncryptionKey(DiskSourceSnapshotEncryptionKeyArgs.builder()
.kmsKeySelfLink("string")
.kmsKeyServiceAccount("string")
.rawKey("string")
.sha256("string")
.build())
.storagePool("string")
.type("string")
.zone("string")
.build());
disk_resource = gcp.compute.Disk("diskResource",
async_primary_disk=gcp.compute.DiskAsyncPrimaryDiskArgs(
disk="string",
),
description="string",
disk_encryption_key=gcp.compute.DiskDiskEncryptionKeyArgs(
kms_key_self_link="string",
kms_key_service_account="string",
raw_key="string",
rsa_encrypted_key="string",
sha256="string",
),
enable_confidential_compute=False,
guest_os_features=[gcp.compute.DiskGuestOsFeatureArgs(
type="string",
)],
image="string",
labels={
"string": "string",
},
licenses=["string"],
multi_writer=False,
name="string",
physical_block_size_bytes=0,
project="string",
provisioned_iops=0,
provisioned_throughput=0,
resource_policies=["string"],
size=0,
snapshot="string",
source_disk="string",
source_image_encryption_key=gcp.compute.DiskSourceImageEncryptionKeyArgs(
kms_key_self_link="string",
kms_key_service_account="string",
raw_key="string",
sha256="string",
),
source_snapshot_encryption_key=gcp.compute.DiskSourceSnapshotEncryptionKeyArgs(
kms_key_self_link="string",
kms_key_service_account="string",
raw_key="string",
sha256="string",
),
storage_pool="string",
type="string",
zone="string")
const diskResource = new gcp.compute.Disk("diskResource", {
asyncPrimaryDisk: {
disk: "string",
},
description: "string",
diskEncryptionKey: {
kmsKeySelfLink: "string",
kmsKeyServiceAccount: "string",
rawKey: "string",
rsaEncryptedKey: "string",
sha256: "string",
},
enableConfidentialCompute: false,
guestOsFeatures: [{
type: "string",
}],
image: "string",
labels: {
string: "string",
},
licenses: ["string"],
multiWriter: false,
name: "string",
physicalBlockSizeBytes: 0,
project: "string",
provisionedIops: 0,
provisionedThroughput: 0,
resourcePolicies: ["string"],
size: 0,
snapshot: "string",
sourceDisk: "string",
sourceImageEncryptionKey: {
kmsKeySelfLink: "string",
kmsKeyServiceAccount: "string",
rawKey: "string",
sha256: "string",
},
sourceSnapshotEncryptionKey: {
kmsKeySelfLink: "string",
kmsKeyServiceAccount: "string",
rawKey: "string",
sha256: "string",
},
storagePool: "string",
type: "string",
zone: "string",
});
type: gcp:compute:Disk
properties:
asyncPrimaryDisk:
disk: string
description: string
diskEncryptionKey:
kmsKeySelfLink: string
kmsKeyServiceAccount: string
rawKey: string
rsaEncryptedKey: string
sha256: string
enableConfidentialCompute: false
guestOsFeatures:
- type: string
image: string
labels:
string: string
licenses:
- string
multiWriter: false
name: string
physicalBlockSizeBytes: 0
project: string
provisionedIops: 0
provisionedThroughput: 0
resourcePolicies:
- string
size: 0
snapshot: string
sourceDisk: string
sourceImageEncryptionKey:
kmsKeySelfLink: string
kmsKeyServiceAccount: string
rawKey: string
sha256: string
sourceSnapshotEncryptionKey:
kmsKeySelfLink: string
kmsKeyServiceAccount: string
rawKey: string
sha256: string
storagePool: string
type: string
zone: string
Disk Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Disk resource accepts the following input properties:
- Async
Primary DiskDisk Async Primary Disk - A nested object resource Structure is documented below.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Disk
Encryption DiskKey Disk Encryption Key - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- Enable
Confidential boolCompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- Guest
Os List<DiskFeatures Guest Os Feature> - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- Image string
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - Interface string
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- Labels Dictionary<string, string>
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.- Licenses List<string>
- Any applicable license URI.
- Multi
Writer bool - Indicates whether or not the disk can be read/write attached to more than one instance.
- Name string
- 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?
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. - Physical
Block intSize Bytes - 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.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Provisioned
Iops int - 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
- Provisioned
Throughput int - 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
- Resource
Policies List<string> - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - Size int
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - Snapshot string
- 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
- Source
Disk string - 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}
- Source
Image DiskEncryption Key Source Image Encryption Key - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- Source
Snapshot DiskEncryption Key Source Snapshot Encryption Key - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- Storage
Pool string - 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}
- Type string
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- Zone string
- A reference to the zone where the disk resides.
- Async
Primary DiskDisk Async Primary Disk Args - A nested object resource Structure is documented below.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Disk
Encryption DiskKey Disk Encryption Key Args - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- Enable
Confidential boolCompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- Guest
Os []DiskFeatures Guest Os Feature Args - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- Image string
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - Interface string
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- Labels map[string]string
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.- Licenses []string
- Any applicable license URI.
- Multi
Writer bool - Indicates whether or not the disk can be read/write attached to more than one instance.
- Name string
- 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?
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. - Physical
Block intSize Bytes - 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.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Provisioned
Iops int - 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
- Provisioned
Throughput int - 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
- Resource
Policies []string - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - Size int
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - Snapshot string
- 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
- Source
Disk string - 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}
- Source
Image DiskEncryption Key Source Image Encryption Key Args - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- Source
Snapshot DiskEncryption Key Source Snapshot Encryption Key Args - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- Storage
Pool string - 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}
- Type string
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- Zone string
- A reference to the zone where the disk resides.
- async
Primary DiskDisk Async Primary Disk - A nested object resource Structure is documented below.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- disk
Encryption DiskKey Disk Encryption Key - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- enable
Confidential BooleanCompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- guest
Os List<DiskFeatures Guest Os Feature> - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- image String
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - interface_ String
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- labels Map<String,String>
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.- licenses List<String>
- Any applicable license URI.
- multi
Writer Boolean - Indicates whether or not the disk can be read/write attached to more than one instance.
- name String
- 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?
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. - physical
Block IntegerSize Bytes - 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.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- provisioned
Iops Integer - 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
- provisioned
Throughput Integer - 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
- resource
Policies List<String> - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - size Integer
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - snapshot String
- 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
- source
Disk String - 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}
- source
Image DiskEncryption Key Source Image Encryption Key - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- source
Snapshot DiskEncryption Key Source Snapshot Encryption Key - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- storage
Pool String - 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}
- type String
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- zone String
- A reference to the zone where the disk resides.
- async
Primary DiskDisk Async Primary Disk - A nested object resource Structure is documented below.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- disk
Encryption DiskKey Disk Encryption Key - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- enable
Confidential booleanCompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- guest
Os DiskFeatures Guest Os Feature[] - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- image string
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - interface string
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- labels {[key: string]: string}
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.- licenses string[]
- Any applicable license URI.
- multi
Writer boolean - Indicates whether or not the disk can be read/write attached to more than one instance.
- name string
- 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?
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. - physical
Block numberSize Bytes - 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.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- provisioned
Iops number - 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
- provisioned
Throughput number - 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
- resource
Policies string[] - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - size number
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - snapshot string
- 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
- source
Disk string - 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}
- source
Image DiskEncryption Key Source Image Encryption Key - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- source
Snapshot DiskEncryption Key Source Snapshot Encryption Key - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- storage
Pool string - 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}
- type string
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- zone string
- A reference to the zone where the disk resides.
- async_
primary_ Diskdisk Async Primary Disk Args - A nested object resource Structure is documented below.
- description str
- An optional description of this resource. Provide this property when you create the resource.
- disk_
encryption_ Diskkey Disk Encryption Key Args - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- enable_
confidential_ boolcompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- guest_
os_ Sequence[Diskfeatures Guest Os Feature Args] - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- image str
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - interface str
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- labels Mapping[str, str]
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.- licenses Sequence[str]
- Any applicable license URI.
- multi_
writer bool - Indicates whether or not the disk can be read/write attached to more than one instance.
- name str
- 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?
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. - physical_
block_ intsize_ bytes - 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.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- provisioned_
iops int - 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
- provisioned_
throughput int - 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
- resource_
policies Sequence[str] - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - size int
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - snapshot str
- 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
- source_
disk str - 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}
- source_
image_ Diskencryption_ key Source Image Encryption Key Args - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- source_
snapshot_ Diskencryption_ key Source Snapshot Encryption Key Args - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- storage_
pool str - 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}
- type str
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- zone str
- A reference to the zone where the disk resides.
- async
Primary Property MapDisk - A nested object resource Structure is documented below.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- disk
Encryption Property MapKey - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- enable
Confidential BooleanCompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- guest
Os List<Property Map>Features - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- image String
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - interface String
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- labels Map<String>
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.- licenses List<String>
- Any applicable license URI.
- multi
Writer Boolean - Indicates whether or not the disk can be read/write attached to more than one instance.
- name String
- 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?
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. - physical
Block NumberSize Bytes - 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.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- provisioned
Iops Number - 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
- provisioned
Throughput Number - 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
- resource
Policies List<String> - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - size Number
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - snapshot String
- 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
- source
Disk String - 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}
- source
Image Property MapEncryption Key - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- source
Snapshot Property MapEncryption Key - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- storage
Pool String - 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}
- type String
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- zone String
- A reference to the zone where the disk resides.
Outputs
All input properties are implicitly available as output properties. Additionally, the Disk resource produces the following output properties:
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Disk
Id string - The unique identifier for the resource. This identifier is defined by the server.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- Last
Attach stringTimestamp - Last attach timestamp in RFC3339 text format.
- Last
Detach stringTimestamp - Last detach timestamp in RFC3339 text format.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string - The URI of the created resource.
- Source
Disk stringId - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- Source
Image stringId - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- Source
Snapshot stringId - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- Users List<string>
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Disk
Id string - The unique identifier for the resource. This identifier is defined by the server.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- Last
Attach stringTimestamp - Last attach timestamp in RFC3339 text format.
- Last
Detach stringTimestamp - Last detach timestamp in RFC3339 text format.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Self
Link string - The URI of the created resource.
- Source
Disk stringId - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- Source
Image stringId - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- Source
Snapshot stringId - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- Users []string
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- disk
Id String - The unique identifier for the resource. This identifier is defined by the server.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- label
Fingerprint String - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- last
Attach StringTimestamp - Last attach timestamp in RFC3339 text format.
- last
Detach StringTimestamp - Last detach timestamp in RFC3339 text format.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link String - The URI of the created resource.
- source
Disk StringId - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- source
Image StringId - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- source
Snapshot StringId - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- users List<String>
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- disk
Id string - The unique identifier for the resource. This identifier is defined by the server.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- last
Attach stringTimestamp - Last attach timestamp in RFC3339 text format.
- last
Detach stringTimestamp - Last detach timestamp in RFC3339 text format.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link string - The URI of the created resource.
- source
Disk stringId - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- source
Image stringId - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- source
Snapshot stringId - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- users string[]
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- creation_
timestamp str - Creation timestamp in RFC3339 text format.
- disk_
id str - The unique identifier for the resource. This identifier is defined by the server.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- label_
fingerprint str - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- last_
attach_ strtimestamp - Last attach timestamp in RFC3339 text format.
- last_
detach_ strtimestamp - Last detach timestamp in RFC3339 text format.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- self_
link str - The URI of the created resource.
- source_
disk_ strid - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- source_
image_ strid - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- source_
snapshot_ strid - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- users Sequence[str]
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- disk
Id String - The unique identifier for the resource. This identifier is defined by the server.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- label
Fingerprint String - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- last
Attach StringTimestamp - Last attach timestamp in RFC3339 text format.
- last
Detach StringTimestamp - Last detach timestamp in RFC3339 text format.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- self
Link String - The URI of the created resource.
- source
Disk StringId - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- source
Image StringId - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- source
Snapshot StringId - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- users List<String>
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
Look up Existing Disk Resource
Get an existing Disk resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DiskState, opts?: CustomResourceOptions): Disk
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
async_primary_disk: Optional[DiskAsyncPrimaryDiskArgs] = None,
creation_timestamp: Optional[str] = None,
description: Optional[str] = None,
disk_encryption_key: Optional[DiskDiskEncryptionKeyArgs] = None,
disk_id: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
enable_confidential_compute: Optional[bool] = None,
guest_os_features: Optional[Sequence[DiskGuestOsFeatureArgs]] = None,
image: Optional[str] = None,
interface: Optional[str] = None,
label_fingerprint: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
last_attach_timestamp: Optional[str] = None,
last_detach_timestamp: Optional[str] = None,
licenses: Optional[Sequence[str]] = None,
multi_writer: Optional[bool] = None,
name: Optional[str] = None,
physical_block_size_bytes: Optional[int] = None,
project: Optional[str] = None,
provisioned_iops: Optional[int] = None,
provisioned_throughput: Optional[int] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
resource_policies: Optional[Sequence[str]] = None,
self_link: Optional[str] = None,
size: Optional[int] = None,
snapshot: Optional[str] = None,
source_disk: Optional[str] = None,
source_disk_id: Optional[str] = None,
source_image_encryption_key: Optional[DiskSourceImageEncryptionKeyArgs] = None,
source_image_id: Optional[str] = None,
source_snapshot_encryption_key: Optional[DiskSourceSnapshotEncryptionKeyArgs] = None,
source_snapshot_id: Optional[str] = None,
storage_pool: Optional[str] = None,
type: Optional[str] = None,
users: Optional[Sequence[str]] = None,
zone: Optional[str] = None) -> Disk
func GetDisk(ctx *Context, name string, id IDInput, state *DiskState, opts ...ResourceOption) (*Disk, error)
public static Disk Get(string name, Input<string> id, DiskState? state, CustomResourceOptions? opts = null)
public static Disk get(String name, Output<String> id, DiskState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Async
Primary DiskDisk Async Primary Disk - A nested object resource Structure is documented below.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Disk
Encryption DiskKey Disk Encryption Key - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- Disk
Id string - The unique identifier for the resource. This identifier is defined by the server.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Enable
Confidential boolCompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- Guest
Os List<DiskFeatures Guest Os Feature> - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- Image string
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - Interface string
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- Label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- Labels Dictionary<string, string>
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.- Last
Attach stringTimestamp - Last attach timestamp in RFC3339 text format.
- Last
Detach stringTimestamp - Last detach timestamp in RFC3339 text format.
- Licenses List<string>
- Any applicable license URI.
- Multi
Writer bool - Indicates whether or not the disk can be read/write attached to more than one instance.
- Name string
- 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?
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. - Physical
Block intSize Bytes - 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.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Provisioned
Iops int - 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
- Provisioned
Throughput int - 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
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Resource
Policies List<string> - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - Self
Link string - The URI of the created resource.
- Size int
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - Snapshot string
- 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
- Source
Disk string - 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}
- Source
Disk stringId - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- Source
Image DiskEncryption Key Source Image Encryption Key - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- Source
Image stringId - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- Source
Snapshot DiskEncryption Key Source Snapshot Encryption Key - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- Source
Snapshot stringId - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- Storage
Pool string - 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}
- Type string
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- Users List<string>
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- Zone string
- A reference to the zone where the disk resides.
- Async
Primary DiskDisk Async Primary Disk Args - A nested object resource Structure is documented below.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Disk
Encryption DiskKey Disk Encryption Key Args - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- Disk
Id string - The unique identifier for the resource. This identifier is defined by the server.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Enable
Confidential boolCompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- Guest
Os []DiskFeatures Guest Os Feature Args - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- Image string
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - Interface string
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- Label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- Labels map[string]string
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.- Last
Attach stringTimestamp - Last attach timestamp in RFC3339 text format.
- Last
Detach stringTimestamp - Last detach timestamp in RFC3339 text format.
- Licenses []string
- Any applicable license URI.
- Multi
Writer bool - Indicates whether or not the disk can be read/write attached to more than one instance.
- Name string
- 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?
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. - Physical
Block intSize Bytes - 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.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Provisioned
Iops int - 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
- Provisioned
Throughput int - 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
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Resource
Policies []string - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - Self
Link string - The URI of the created resource.
- Size int
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - Snapshot string
- 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
- Source
Disk string - 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}
- Source
Disk stringId - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- Source
Image DiskEncryption Key Source Image Encryption Key Args - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- Source
Image stringId - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- Source
Snapshot DiskEncryption Key Source Snapshot Encryption Key Args - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- Source
Snapshot stringId - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- Storage
Pool string - 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}
- Type string
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- Users []string
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- Zone string
- A reference to the zone where the disk resides.
- async
Primary DiskDisk Async Primary Disk - A nested object resource Structure is documented below.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- disk
Encryption DiskKey Disk Encryption Key - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- disk
Id String - The unique identifier for the resource. This identifier is defined by the server.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- enable
Confidential BooleanCompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- guest
Os List<DiskFeatures Guest Os Feature> - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- image String
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - interface_ String
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- label
Fingerprint String - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- labels Map<String,String>
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.- last
Attach StringTimestamp - Last attach timestamp in RFC3339 text format.
- last
Detach StringTimestamp - Last detach timestamp in RFC3339 text format.
- licenses List<String>
- Any applicable license URI.
- multi
Writer Boolean - Indicates whether or not the disk can be read/write attached to more than one instance.
- name String
- 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?
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. - physical
Block IntegerSize Bytes - 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.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- provisioned
Iops Integer - 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
- provisioned
Throughput Integer - 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
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- resource
Policies List<String> - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - self
Link String - The URI of the created resource.
- size Integer
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - snapshot String
- 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
- source
Disk String - 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}
- source
Disk StringId - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- source
Image DiskEncryption Key Source Image Encryption Key - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- source
Image StringId - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- source
Snapshot DiskEncryption Key Source Snapshot Encryption Key - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- source
Snapshot StringId - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- storage
Pool String - 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}
- type String
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- users List<String>
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- zone String
- A reference to the zone where the disk resides.
- async
Primary DiskDisk Async Primary Disk - A nested object resource Structure is documented below.
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- disk
Encryption DiskKey Disk Encryption Key - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- disk
Id string - The unique identifier for the resource. This identifier is defined by the server.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- enable
Confidential booleanCompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- guest
Os DiskFeatures Guest Os Feature[] - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- image string
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - interface string
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- label
Fingerprint string - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- labels {[key: string]: string}
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.- last
Attach stringTimestamp - Last attach timestamp in RFC3339 text format.
- last
Detach stringTimestamp - Last detach timestamp in RFC3339 text format.
- licenses string[]
- Any applicable license URI.
- multi
Writer boolean - Indicates whether or not the disk can be read/write attached to more than one instance.
- name string
- 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?
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. - physical
Block numberSize Bytes - 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.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- provisioned
Iops number - 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
- provisioned
Throughput number - 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
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- resource
Policies string[] - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - self
Link string - The URI of the created resource.
- size number
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - snapshot string
- 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
- source
Disk string - 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}
- source
Disk stringId - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- source
Image DiskEncryption Key Source Image Encryption Key - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- source
Image stringId - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- source
Snapshot DiskEncryption Key Source Snapshot Encryption Key - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- source
Snapshot stringId - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- storage
Pool string - 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}
- type string
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- users string[]
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- zone string
- A reference to the zone where the disk resides.
- async_
primary_ Diskdisk Async Primary Disk Args - A nested object resource Structure is documented below.
- creation_
timestamp str - Creation timestamp in RFC3339 text format.
- description str
- An optional description of this resource. Provide this property when you create the resource.
- disk_
encryption_ Diskkey Disk Encryption Key Args - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- disk_
id str - The unique identifier for the resource. This identifier is defined by the server.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- enable_
confidential_ boolcompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- guest_
os_ Sequence[Diskfeatures Guest Os Feature Args] - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- image str
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - interface str
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- label_
fingerprint str - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- labels Mapping[str, str]
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.- last_
attach_ strtimestamp - Last attach timestamp in RFC3339 text format.
- last_
detach_ strtimestamp - Last detach timestamp in RFC3339 text format.
- licenses Sequence[str]
- Any applicable license URI.
- multi_
writer bool - Indicates whether or not the disk can be read/write attached to more than one instance.
- name str
- 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?
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. - physical_
block_ intsize_ bytes - 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.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- provisioned_
iops int - 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
- provisioned_
throughput int - 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
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- resource_
policies Sequence[str] - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - self_
link str - The URI of the created resource.
- size int
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - snapshot str
- 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
- source_
disk str - 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}
- source_
disk_ strid - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- source_
image_ Diskencryption_ key Source Image Encryption Key Args - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- source_
image_ strid - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- source_
snapshot_ Diskencryption_ key Source Snapshot Encryption Key Args - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- source_
snapshot_ strid - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- storage_
pool str - 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}
- type str
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- users Sequence[str]
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- zone str
- A reference to the zone where the disk resides.
- async
Primary Property MapDisk - A nested object resource Structure is documented below.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- disk
Encryption Property MapKey - Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Structure is documented below.
- disk
Id String - The unique identifier for the resource. This identifier is defined by the server.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- enable
Confidential BooleanCompute - Whether this disk is using confidential compute mode. Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
- guest
Os List<Property Map>Features - A list of features to enable on the guest operating system. Applicable only for bootable disks. Structure is documented below.
- image String
- 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 gcp.compute.Image data source. For instance, the imagecentos-6-v20180104
includes its family namecentos-6
. These images can be referred by family name here. - interface String
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
Warning:
interface
is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.- label
Fingerprint String - The fingerprint used for optimistic locking of this resource. Used internally during updates.
- labels Map<String>
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.- last
Attach StringTimestamp - Last attach timestamp in RFC3339 text format.
- last
Detach StringTimestamp - Last detach timestamp in RFC3339 text format.
- licenses List<String>
- Any applicable license URI.
- multi
Writer Boolean - Indicates whether or not the disk can be read/write attached to more than one instance.
- name String
- 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?
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. - physical
Block NumberSize Bytes - 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.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- provisioned
Iops Number - 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
- provisioned
Throughput Number - 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
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- resource
Policies List<String> - Resource policies applied to this disk for automatic snapshot creations.
~>NOTE This value does not support updating the
resource policy, as resource policies can not be updated more than
one at a time. Use
gcp.compute.DiskResourcePolicyAttachment
to allow for updating the resource policy attached to the disk. - self
Link String - The URI of the created resource.
- size Number
- Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the
image
orsnapshot
parameter, or specify it alone to create an empty persistent disk. If you specify this field along withimage
orsnapshot
, the value must not be less than the size of the image or the size of the snapshot. ~>NOTE If you change the size, the provider updates the disk size if upsizing is detected but recreates the disk if downsizing is requested. You can addlifecycle.prevent_destroy
in the config to prevent destroying and recreating. - snapshot String
- 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
- source
Disk String - 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}
- source
Disk StringId - The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
- source
Image Property MapEncryption Key - The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Structure is documented below.
- source
Image StringId - The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.
- source
Snapshot Property MapEncryption Key - The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. Structure is documented below.
- source
Snapshot StringId - The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
- storage
Pool String - 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}
- type String
- URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk.
- users List<String>
- Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
- zone String
- A reference to the zone where the disk resides.
Supporting Types
DiskAsyncPrimaryDisk, DiskAsyncPrimaryDiskArgs
- Disk string
- Primary disk for asynchronous disk replication.
- Disk string
- Primary disk for asynchronous disk replication.
- disk String
- Primary disk for asynchronous disk replication.
- disk string
- Primary disk for asynchronous disk replication.
- disk str
- Primary disk for asynchronous disk replication.
- disk String
- Primary disk for asynchronous disk replication.
DiskDiskEncryptionKey, DiskDiskEncryptionKeyArgs
- Kms
Key stringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - Kms
Key stringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- Raw
Key string - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.
- Rsa
Encrypted stringKey - Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. Note: This property is sensitive and will not be displayed in the plan.
- Sha256 string
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- Kms
Key stringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - Kms
Key stringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- Raw
Key string - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.
- Rsa
Encrypted stringKey - Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. Note: This property is sensitive and will not be displayed in the plan.
- Sha256 string
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms
Key StringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms
Key StringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw
Key String - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.
- rsa
Encrypted StringKey - Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. Note: This property is sensitive and will not be displayed in the plan.
- sha256 String
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms
Key stringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms
Key stringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw
Key string - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.
- rsa
Encrypted stringKey - Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. Note: This property is sensitive and will not be displayed in the plan.
- sha256 string
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms_
key_ strself_ link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms_
key_ strservice_ account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw_
key str - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.
- rsa_
encrypted_ strkey - Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. Note: This property is sensitive and will not be displayed in the plan.
- sha256 str
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms
Key StringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms
Key StringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw
Key String - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. Note: This property is sensitive and will not be displayed in the plan.
- rsa
Encrypted StringKey - Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. Note: This property is sensitive and will not be displayed in the plan.
- sha256 String
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
DiskGuestOsFeature, DiskGuestOsFeatureArgs
- Type string
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
- Type string
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
- type String
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
- type string
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
- type str
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
- type String
- The type of supported feature. Read Enabling guest operating system features to see a list of available options.
DiskSourceImageEncryptionKey, DiskSourceImageEncryptionKeyArgs
- Kms
Key stringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - Kms
Key stringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- Raw
Key string - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- Sha256 string
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- Kms
Key stringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - Kms
Key stringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- Raw
Key string - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- Sha256 string
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms
Key StringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms
Key StringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw
Key String - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 String
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms
Key stringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms
Key stringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw
Key string - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 string
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms_
key_ strself_ link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms_
key_ strservice_ account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw_
key str - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 str
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms
Key StringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms
Key StringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw
Key String - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 String
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
DiskSourceSnapshotEncryptionKey, DiskSourceSnapshotEncryptionKeyArgs
- Kms
Key stringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - Kms
Key stringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- Raw
Key string - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- Sha256 string
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- Kms
Key stringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - Kms
Key stringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- Raw
Key string - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- Sha256 string
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms
Key StringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms
Key StringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw
Key String - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 String
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms
Key stringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms
Key stringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw
Key string - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 string
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms_
key_ strself_ link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms_
key_ strservice_ account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw_
key str - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 str
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms
Key StringSelf Link - The self link of the encryption key used to encrypt the disk. Also called KmsKeyName
in the cloud console. Your project's Compute Engine System service account
(
service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com
) must haveroles/cloudkms.cryptoKeyEncrypterDecrypter
to use this feature. See https://cloud.google.com/compute/docs/disks/customer-managed-encryption#encrypt_a_new_persistent_disk_with_your_own_keys - kms
Key StringService Account - The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
- raw
Key String - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 String
- (Output) The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Import
Disk can be imported using any of these accepted formats:
projects/{{project}}/zones/{{zone}}/disks/{{name}}
{{project}}/{{zone}}/{{name}}
{{zone}}/{{name}}
{{name}}
When using the pulumi import
command, Disk can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/disk:Disk default projects/{{project}}/zones/{{zone}}/disks/{{name}}
$ pulumi import gcp:compute/disk:Disk default {{project}}/{{zone}}/{{name}}
$ pulumi import gcp:compute/disk:Disk default {{zone}}/{{name}}
$ pulumi import gcp:compute/disk:Disk default {{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.