1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. getDisk
Google Cloud v8.25.0 published on Thursday, Apr 3, 2025 by Pulumi

gcp.compute.getDisk

Explore with Pulumi AI

Google Cloud v8.25.0 published on Thursday, Apr 3, 2025 by Pulumi

Get information about a Google Compute Persistent disks.

the official documentation and its API.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const persistent_boot_disk = gcp.compute.getDisk({
    name: "persistent-boot-disk",
    project: "example",
});
const _default = new gcp.compute.Instance("default", {bootDisk: {
    source: persistent_boot_disk.then(persistent_boot_disk => persistent_boot_disk.selfLink),
    autoDelete: false,
}});
Copy
import pulumi
import pulumi_gcp as gcp

persistent_boot_disk = gcp.compute.get_disk(name="persistent-boot-disk",
    project="example")
default = gcp.compute.Instance("default", boot_disk={
    "source": persistent_boot_disk.self_link,
    "auto_delete": False,
})
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		persistent_boot_disk, err := compute.LookupDisk(ctx, &compute.LookupDiskArgs{
			Name:    "persistent-boot-disk",
			Project: pulumi.StringRef("example"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = compute.NewInstance(ctx, "default", &compute.InstanceArgs{
			BootDisk: &compute.InstanceBootDiskArgs{
				Source:     pulumi.String(persistent_boot_disk.SelfLink),
				AutoDelete: pulumi.Bool(false),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var persistent_boot_disk = Gcp.Compute.GetDisk.Invoke(new()
    {
        Name = "persistent-boot-disk",
        Project = "example",
    });

    var @default = new Gcp.Compute.Instance("default", new()
    {
        BootDisk = new Gcp.Compute.Inputs.InstanceBootDiskArgs
        {
            Source = persistent_boot_disk.Apply(persistent_boot_disk => persistent_boot_disk.Apply(getDiskResult => getDiskResult.SelfLink)),
            AutoDelete = false,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetDiskArgs;
import com.pulumi.gcp.compute.Instance;
import com.pulumi.gcp.compute.InstanceArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs;
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) {
        final var persistent-boot-disk = ComputeFunctions.getDisk(GetDiskArgs.builder()
            .name("persistent-boot-disk")
            .project("example")
            .build());

        var default_ = new Instance("default", InstanceArgs.builder()
            .bootDisk(InstanceBootDiskArgs.builder()
                .source(persistent_boot_disk.selfLink())
                .autoDelete(false)
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:compute:Instance
    properties:
      bootDisk:
        source: ${["persistent-boot-disk"].selfLink}
        autoDelete: false
variables:
  persistent-boot-disk:
    fn::invoke:
      function: gcp:compute:getDisk
      arguments:
        name: persistent-boot-disk
        project: example
Copy

Using getDisk

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getDisk(args: GetDiskArgs, opts?: InvokeOptions): Promise<GetDiskResult>
function getDiskOutput(args: GetDiskOutputArgs, opts?: InvokeOptions): Output<GetDiskResult>
Copy
def get_disk(name: Optional[str] = None,
             project: Optional[str] = None,
             zone: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetDiskResult
def get_disk_output(name: Optional[pulumi.Input[str]] = None,
             project: Optional[pulumi.Input[str]] = None,
             zone: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetDiskResult]
Copy
func LookupDisk(ctx *Context, args *LookupDiskArgs, opts ...InvokeOption) (*LookupDiskResult, error)
func LookupDiskOutput(ctx *Context, args *LookupDiskOutputArgs, opts ...InvokeOption) LookupDiskResultOutput
Copy

> Note: This function is named LookupDisk in the Go SDK.

public static class GetDisk 
{
    public static Task<GetDiskResult> InvokeAsync(GetDiskArgs args, InvokeOptions? opts = null)
    public static Output<GetDiskResult> Invoke(GetDiskInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDiskResult> getDisk(GetDiskArgs args, InvokeOptions options)
public static Output<GetDiskResult> getDisk(GetDiskArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:compute/getDisk:getDisk
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of a specific disk.


Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Zone string
A reference to the zone where the disk resides.
Name This property is required. string
The name of a specific disk.


Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Zone string
A reference to the zone where the disk resides.
name This property is required. String
The name of a specific disk.


project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone String
A reference to the zone where the disk resides.
name This property is required. string
The name of a specific disk.


project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone string
A reference to the zone where the disk resides.
name This property is required. str
The name of a specific disk.


project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone str
A reference to the zone where the disk resides.
name This property is required. String
The name of a specific disk.


project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
zone String
A reference to the zone where the disk resides.

getDisk Result

The following output properties are available:

AccessMode string
Architecture string
AsyncPrimaryDisks List<GetDiskAsyncPrimaryDisk>
CreateSnapshotBeforeDestroy bool
CreateSnapshotBeforeDestroyPrefix string
CreationTimestamp string
Creation timestamp in RFC3339 text format.
Description string
The optional description of this resource.
DiskEncryptionKeys List<GetDiskDiskEncryptionKey>
DiskId string
EffectiveLabels Dictionary<string, string>
EnableConfidentialCompute bool
GuestOsFeatures List<GetDiskGuestOsFeature>
Id string
The provider-assigned unique ID for this managed resource.
Image string
The image from which to initialize this disk.
Interface string
LabelFingerprint string
The fingerprint used for optimistic locking of this resource. Used internally during updates.
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.
LastAttachTimestamp string
Last attach timestamp in RFC3339 text format.
LastDetachTimestamp string
Last detach timestamp in RFC3339 text format.
Licenses List<string>
MultiWriter bool
Name string
Params List<GetDiskParam>
PhysicalBlockSizeBytes int
Physical block size of the persistent disk, in bytes.
ProvisionedIops int
ProvisionedThroughput int
PulumiLabels Dictionary<string, string>
ResourcePolicies List<string>
SelfLink string
The URI of the created resource.
Size int
Size of the persistent disk, specified in GB.
Snapshot string
The source snapshot used to create this disk.
SourceDisk string
SourceDiskId string
SourceImageEncryptionKeys List<GetDiskSourceImageEncryptionKey>
The customer-supplied encryption key of the source image.
SourceImageId string
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.
SourceInstantSnapshot string
SourceInstantSnapshotId string
SourceSnapshotEncryptionKeys List<GetDiskSourceSnapshotEncryptionKey>
The customer-supplied encryption key of the source snapshot.
SourceSnapshotId string
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.
SourceStorageObject string
StoragePool string
Type string
URL of the disk type resource describing which disk type to use to create the disk.
Users List<string>
Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
Project string
Zone string
A reference to the zone where the disk resides.
AccessMode string
Architecture string
AsyncPrimaryDisks []GetDiskAsyncPrimaryDisk
CreateSnapshotBeforeDestroy bool
CreateSnapshotBeforeDestroyPrefix string
CreationTimestamp string
Creation timestamp in RFC3339 text format.
Description string
The optional description of this resource.
DiskEncryptionKeys []GetDiskDiskEncryptionKey
DiskId string
EffectiveLabels map[string]string
EnableConfidentialCompute bool
GuestOsFeatures []GetDiskGuestOsFeature
Id string
The provider-assigned unique ID for this managed resource.
Image string
The image from which to initialize this disk.
Interface string
LabelFingerprint string
The fingerprint used for optimistic locking of this resource. Used internally during updates.
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.
LastAttachTimestamp string
Last attach timestamp in RFC3339 text format.
LastDetachTimestamp string
Last detach timestamp in RFC3339 text format.
Licenses []string
MultiWriter bool
Name string
Params []GetDiskParam
PhysicalBlockSizeBytes int
Physical block size of the persistent disk, in bytes.
ProvisionedIops int
ProvisionedThroughput int
PulumiLabels map[string]string
ResourcePolicies []string
SelfLink string
The URI of the created resource.
Size int
Size of the persistent disk, specified in GB.
Snapshot string
The source snapshot used to create this disk.
SourceDisk string
SourceDiskId string
SourceImageEncryptionKeys []GetDiskSourceImageEncryptionKey
The customer-supplied encryption key of the source image.
SourceImageId string
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.
SourceInstantSnapshot string
SourceInstantSnapshotId string
SourceSnapshotEncryptionKeys []GetDiskSourceSnapshotEncryptionKey
The customer-supplied encryption key of the source snapshot.
SourceSnapshotId string
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.
SourceStorageObject string
StoragePool string
Type string
URL of the disk type resource describing which disk type to use to create the disk.
Users []string
Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
Project string
Zone string
A reference to the zone where the disk resides.
accessMode String
architecture String
asyncPrimaryDisks List<GetDiskAsyncPrimaryDisk>
createSnapshotBeforeDestroy Boolean
createSnapshotBeforeDestroyPrefix String
creationTimestamp String
Creation timestamp in RFC3339 text format.
description String
The optional description of this resource.
diskEncryptionKeys List<GetDiskDiskEncryptionKey>
diskId String
effectiveLabels Map<String,String>
enableConfidentialCompute Boolean
guestOsFeatures List<GetDiskGuestOsFeature>
id String
The provider-assigned unique ID for this managed resource.
image String
The image from which to initialize this disk.
interface_ String
labelFingerprint String
The fingerprint used for optimistic locking of this resource. Used internally during updates.
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.
lastAttachTimestamp String
Last attach timestamp in RFC3339 text format.
lastDetachTimestamp String
Last detach timestamp in RFC3339 text format.
licenses List<String>
multiWriter Boolean
name String
params List<GetDiskParam>
physicalBlockSizeBytes Integer
Physical block size of the persistent disk, in bytes.
provisionedIops Integer
provisionedThroughput Integer
pulumiLabels Map<String,String>
resourcePolicies List<String>
selfLink String
The URI of the created resource.
size Integer
Size of the persistent disk, specified in GB.
snapshot String
The source snapshot used to create this disk.
sourceDisk String
sourceDiskId String
sourceImageEncryptionKeys List<GetDiskSourceImageEncryptionKey>
The customer-supplied encryption key of the source image.
sourceImageId String
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.
sourceInstantSnapshot String
sourceInstantSnapshotId String
sourceSnapshotEncryptionKeys List<GetDiskSourceSnapshotEncryptionKey>
The customer-supplied encryption key of the source snapshot.
sourceSnapshotId String
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.
sourceStorageObject String
storagePool String
type String
URL of the disk type resource describing which disk type to use to create the disk.
users List<String>
Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
project String
zone String
A reference to the zone where the disk resides.
accessMode string
architecture string
asyncPrimaryDisks GetDiskAsyncPrimaryDisk[]
createSnapshotBeforeDestroy boolean
createSnapshotBeforeDestroyPrefix string
creationTimestamp string
Creation timestamp in RFC3339 text format.
description string
The optional description of this resource.
diskEncryptionKeys GetDiskDiskEncryptionKey[]
diskId string
effectiveLabels {[key: string]: string}
enableConfidentialCompute boolean
guestOsFeatures GetDiskGuestOsFeature[]
id string
The provider-assigned unique ID for this managed resource.
image string
The image from which to initialize this disk.
interface string
labelFingerprint string
The fingerprint used for optimistic locking of this resource. Used internally during updates.
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.
lastAttachTimestamp string
Last attach timestamp in RFC3339 text format.
lastDetachTimestamp string
Last detach timestamp in RFC3339 text format.
licenses string[]
multiWriter boolean
name string
params GetDiskParam[]
physicalBlockSizeBytes number
Physical block size of the persistent disk, in bytes.
provisionedIops number
provisionedThroughput number
pulumiLabels {[key: string]: string}
resourcePolicies string[]
selfLink string
The URI of the created resource.
size number
Size of the persistent disk, specified in GB.
snapshot string
The source snapshot used to create this disk.
sourceDisk string
sourceDiskId string
sourceImageEncryptionKeys GetDiskSourceImageEncryptionKey[]
The customer-supplied encryption key of the source image.
sourceImageId string
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.
sourceInstantSnapshot string
sourceInstantSnapshotId string
sourceSnapshotEncryptionKeys GetDiskSourceSnapshotEncryptionKey[]
The customer-supplied encryption key of the source snapshot.
sourceSnapshotId string
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.
sourceStorageObject string
storagePool string
type string
URL of the disk type resource describing which disk type to use to create the disk.
users string[]
Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
project string
zone string
A reference to the zone where the disk resides.
access_mode str
architecture str
async_primary_disks Sequence[GetDiskAsyncPrimaryDisk]
create_snapshot_before_destroy bool
create_snapshot_before_destroy_prefix str
creation_timestamp str
Creation timestamp in RFC3339 text format.
description str
The optional description of this resource.
disk_encryption_keys Sequence[GetDiskDiskEncryptionKey]
disk_id str
effective_labels Mapping[str, str]
enable_confidential_compute bool
guest_os_features Sequence[GetDiskGuestOsFeature]
id str
The provider-assigned unique ID for this managed resource.
image str
The image from which to initialize this disk.
interface str
label_fingerprint str
The fingerprint used for optimistic locking of this resource. Used internally during updates.
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.
last_attach_timestamp str
Last attach timestamp in RFC3339 text format.
last_detach_timestamp str
Last detach timestamp in RFC3339 text format.
licenses Sequence[str]
multi_writer bool
name str
params Sequence[GetDiskParam]
physical_block_size_bytes int
Physical block size of the persistent disk, in bytes.
provisioned_iops int
provisioned_throughput int
pulumi_labels Mapping[str, str]
resource_policies Sequence[str]
self_link str
The URI of the created resource.
size int
Size of the persistent disk, specified in GB.
snapshot str
The source snapshot used to create this disk.
source_disk str
source_disk_id str
source_image_encryption_keys Sequence[GetDiskSourceImageEncryptionKey]
The customer-supplied encryption key of the source image.
source_image_id str
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_instant_snapshot str
source_instant_snapshot_id str
source_snapshot_encryption_keys Sequence[GetDiskSourceSnapshotEncryptionKey]
The customer-supplied encryption key of the source snapshot.
source_snapshot_id str
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.
source_storage_object str
storage_pool str
type str
URL of the disk type resource describing which disk type to use to create the disk.
users Sequence[str]
Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
project str
zone str
A reference to the zone where the disk resides.
accessMode String
architecture String
asyncPrimaryDisks List<Property Map>
createSnapshotBeforeDestroy Boolean
createSnapshotBeforeDestroyPrefix String
creationTimestamp String
Creation timestamp in RFC3339 text format.
description String
The optional description of this resource.
diskEncryptionKeys List<Property Map>
diskId String
effectiveLabels Map<String>
enableConfidentialCompute Boolean
guestOsFeatures List<Property Map>
id String
The provider-assigned unique ID for this managed resource.
image String
The image from which to initialize this disk.
interface String
labelFingerprint String
The fingerprint used for optimistic locking of this resource. Used internally during updates.
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.
lastAttachTimestamp String
Last attach timestamp in RFC3339 text format.
lastDetachTimestamp String
Last detach timestamp in RFC3339 text format.
licenses List<String>
multiWriter Boolean
name String
params List<Property Map>
physicalBlockSizeBytes Number
Physical block size of the persistent disk, in bytes.
provisionedIops Number
provisionedThroughput Number
pulumiLabels Map<String>
resourcePolicies List<String>
selfLink String
The URI of the created resource.
size Number
Size of the persistent disk, specified in GB.
snapshot String
The source snapshot used to create this disk.
sourceDisk String
sourceDiskId String
sourceImageEncryptionKeys List<Property Map>
The customer-supplied encryption key of the source image.
sourceImageId String
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.
sourceInstantSnapshot String
sourceInstantSnapshotId String
sourceSnapshotEncryptionKeys List<Property Map>
The customer-supplied encryption key of the source snapshot.
sourceSnapshotId String
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.
sourceStorageObject String
storagePool String
type String
URL of the disk type resource describing which disk type to use to create the disk.
users List<String>
Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance
project String
zone String
A reference to the zone where the disk resides.

Supporting Types

GetDiskAsyncPrimaryDisk

Disk This property is required. string
Primary disk for asynchronous disk replication.
Disk This property is required. string
Primary disk for asynchronous disk replication.
disk This property is required. String
Primary disk for asynchronous disk replication.
disk This property is required. string
Primary disk for asynchronous disk replication.
disk This property is required. str
Primary disk for asynchronous disk replication.
disk This property is required. String
Primary disk for asynchronous disk replication.

GetDiskDiskEncryptionKey

KmsKeySelfLink This property is required. string
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 have 'roles/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
KmsKeyServiceAccount This property is required. string
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
RawKey This property is required. string
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
RsaEncryptedKey This property is required. string
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.
Sha256 This property is required. string
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
KmsKeySelfLink This property is required. string
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 have 'roles/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
KmsKeyServiceAccount This property is required. string
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
RawKey This property is required. string
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
RsaEncryptedKey This property is required. string
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.
Sha256 This property is required. string
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kmsKeySelfLink This property is required. String
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 have 'roles/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
kmsKeyServiceAccount This property is required. String
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
rawKey This property is required. String
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
rsaEncryptedKey This property is required. String
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.
sha256 This property is required. String
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kmsKeySelfLink This property is required. string
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 have 'roles/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
kmsKeyServiceAccount This property is required. string
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
rawKey This property is required. string
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
rsaEncryptedKey This property is required. string
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.
sha256 This property is required. string
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kms_key_self_link This property is required. str
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 have 'roles/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_service_account This property is required. str
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 This property is required. str
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
rsa_encrypted_key This property is required. str
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.
sha256 This property is required. str
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kmsKeySelfLink This property is required. String
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 have 'roles/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
kmsKeyServiceAccount This property is required. String
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
rawKey This property is required. String
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
rsaEncryptedKey This property is required. String
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.
sha256 This property is required. String
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.

GetDiskGuestOsFeature

Type This property is required. string
URL of the disk type resource describing which disk type to use to create the disk.
Type This property is required. string
URL of the disk type resource describing which disk type to use to create the disk.
type This property is required. String
URL of the disk type resource describing which disk type to use to create the disk.
type This property is required. string
URL of the disk type resource describing which disk type to use to create the disk.
type This property is required. str
URL of the disk type resource describing which disk type to use to create the disk.
type This property is required. String
URL of the disk type resource describing which disk type to use to create the disk.

GetDiskParam

ResourceManagerTags This property is required. Dictionary<string, string>
Resource manager tags to be bound to the disk. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
ResourceManagerTags This property is required. map[string]string
Resource manager tags to be bound to the disk. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
resourceManagerTags This property is required. Map<String,String>
Resource manager tags to be bound to the disk. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
resourceManagerTags This property is required. {[key: string]: string}
Resource manager tags to be bound to the disk. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
resource_manager_tags This property is required. Mapping[str, str]
Resource manager tags to be bound to the disk. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
resourceManagerTags This property is required. Map<String>
Resource manager tags to be bound to the disk. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.

GetDiskSourceImageEncryptionKey

KmsKeySelfLink This property is required. string
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 have 'roles/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
KmsKeyServiceAccount This property is required. string
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
RawKey This property is required. string
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Sha256 This property is required. string
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
KmsKeySelfLink This property is required. string
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 have 'roles/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
KmsKeyServiceAccount This property is required. string
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
RawKey This property is required. string
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Sha256 This property is required. string
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kmsKeySelfLink This property is required. String
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 have 'roles/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
kmsKeyServiceAccount This property is required. String
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
rawKey This property is required. String
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
sha256 This property is required. String
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kmsKeySelfLink This property is required. string
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 have 'roles/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
kmsKeyServiceAccount This property is required. string
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
rawKey This property is required. string
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
sha256 This property is required. string
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kms_key_self_link This property is required. str
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 have 'roles/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_service_account This property is required. str
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 This property is required. str
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
sha256 This property is required. str
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kmsKeySelfLink This property is required. String
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 have 'roles/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
kmsKeyServiceAccount This property is required. String
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
rawKey This property is required. String
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
sha256 This property is required. String
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.

GetDiskSourceSnapshotEncryptionKey

KmsKeySelfLink This property is required. string
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 have 'roles/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
KmsKeyServiceAccount This property is required. string
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
RawKey This property is required. string
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Sha256 This property is required. string
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
KmsKeySelfLink This property is required. string
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 have 'roles/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
KmsKeyServiceAccount This property is required. string
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
RawKey This property is required. string
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Sha256 This property is required. string
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kmsKeySelfLink This property is required. String
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 have 'roles/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
kmsKeyServiceAccount This property is required. String
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
rawKey This property is required. String
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
sha256 This property is required. String
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kmsKeySelfLink This property is required. string
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 have 'roles/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
kmsKeyServiceAccount This property is required. string
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
rawKey This property is required. string
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
sha256 This property is required. string
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kms_key_self_link This property is required. str
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 have 'roles/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_service_account This property is required. str
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 This property is required. str
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
sha256 This property is required. str
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kmsKeySelfLink This property is required. String
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 have 'roles/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
kmsKeyServiceAccount This property is required. String
The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used.
rawKey This property is required. String
Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
sha256 This property is required. String
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.

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.
Google Cloud v8.25.0 published on Thursday, Apr 3, 2025 by Pulumi