Google Cloud v8.21.0 published on Wednesday, Mar 5, 2025 by Pulumi
gcp.compute.getRegionDisk
Explore with Pulumi AI
Get information about a Google Compute Regional Persistent disks.
the official documentation and its API.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
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.GetRegionDiskArgs;
import com.pulumi.gcp.compute.Instance;
import com.pulumi.gcp.compute.InstanceArgs;
import com.pulumi.gcp.compute.inputs.InstanceAttachedDiskArgs;
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 disk = ComputeFunctions.getRegionDisk(GetRegionDiskArgs.builder()
            .name("persistent-regional-disk")
            .project("example")
            .region("us-central1")
            .type("pd-ssd")
            .physicalBlockSizeBytes(4096)
            .replicaZones(            
                "us-central1-a",
                "us-central1-f")
            .build());
        var default_ = new Instance("default", InstanceArgs.builder()
            .attachedDisks(InstanceAttachedDiskArgs.builder()
                .source(diskGoogleComputeDisk.selfLink())
                .build())
            .build());
    }
}
resources:
  default:
    type: gcp:compute:Instance
    properties:
      attachedDisks:
        - source: ${diskGoogleComputeDisk.selfLink}
variables:
  disk:
    fn::invoke:
      function: gcp:compute:getRegionDisk
      arguments:
        name: persistent-regional-disk
        project: example
        region: us-central1
        type: pd-ssd
        physicalBlockSizeBytes: 4096
        replicaZones:
          - us-central1-a
          - us-central1-f
Using getRegionDisk
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 getRegionDisk(args: GetRegionDiskArgs, opts?: InvokeOptions): Promise<GetRegionDiskResult>
function getRegionDiskOutput(args: GetRegionDiskOutputArgs, opts?: InvokeOptions): Output<GetRegionDiskResult>def get_region_disk(name: Optional[str] = None,
                    project: Optional[str] = None,
                    region: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetRegionDiskResult
def get_region_disk_output(name: Optional[pulumi.Input[str]] = None,
                    project: Optional[pulumi.Input[str]] = None,
                    region: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetRegionDiskResult]func LookupRegionDisk(ctx *Context, args *LookupRegionDiskArgs, opts ...InvokeOption) (*LookupRegionDiskResult, error)
func LookupRegionDiskOutput(ctx *Context, args *LookupRegionDiskOutputArgs, opts ...InvokeOption) LookupRegionDiskResultOutput> Note: This function is named LookupRegionDisk in the Go SDK.
public static class GetRegionDisk 
{
    public static Task<GetRegionDiskResult> InvokeAsync(GetRegionDiskArgs args, InvokeOptions? opts = null)
    public static Output<GetRegionDiskResult> Invoke(GetRegionDiskInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRegionDiskResult> getRegionDisk(GetRegionDiskArgs args, InvokeOptions options)
public static Output<GetRegionDiskResult> getRegionDisk(GetRegionDiskArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:compute/getRegionDisk:getRegionDisk
  arguments:
    # arguments dictionaryThe following arguments are supported:
getRegionDisk Result
The following output properties are available:
- AsyncPrimary List<GetDisks Region Disk Async Primary Disk> 
- CreationTimestamp string
- Description string
- DiskEncryption List<GetKeys Region Disk Disk Encryption Key> 
- EffectiveLabels Dictionary<string, string>
- GuestOs List<GetFeatures Region Disk Guest Os Feature> 
- Id string
- The provider-assigned unique ID for this managed resource.
- Interface string
- LabelFingerprint string
- Labels Dictionary<string, string>
- LastAttach stringTimestamp 
- LastDetach stringTimestamp 
- Licenses List<string>
- Name string
- PhysicalBlock intSize Bytes 
- PulumiLabels Dictionary<string, string>
- ReplicaZones List<string>
- SelfLink string
- Size int
- Snapshot string
- SourceDisk string
- SourceDisk stringId 
- SourceSnapshot List<GetEncryption Keys Region Disk Source Snapshot Encryption Key> 
- SourceSnapshot stringId 
- Type string
- Users List<string>
- Project string
- Region string
- AsyncPrimary []GetDisks Region Disk Async Primary Disk 
- CreationTimestamp string
- Description string
- DiskEncryption []GetKeys Region Disk Disk Encryption Key 
- EffectiveLabels map[string]string
- GuestOs []GetFeatures Region Disk Guest Os Feature 
- Id string
- The provider-assigned unique ID for this managed resource.
- Interface string
- LabelFingerprint string
- Labels map[string]string
- LastAttach stringTimestamp 
- LastDetach stringTimestamp 
- Licenses []string
- Name string
- PhysicalBlock intSize Bytes 
- PulumiLabels map[string]string
- ReplicaZones []string
- SelfLink string
- Size int
- Snapshot string
- SourceDisk string
- SourceDisk stringId 
- SourceSnapshot []GetEncryption Keys Region Disk Source Snapshot Encryption Key 
- SourceSnapshot stringId 
- Type string
- Users []string
- Project string
- Region string
- asyncPrimary List<GetDisks Region Disk Async Primary Disk> 
- creationTimestamp String
- description String
- diskEncryption List<GetKeys Region Disk Disk Encryption Key> 
- effectiveLabels Map<String,String>
- guestOs List<GetFeatures Region Disk Guest Os Feature> 
- id String
- The provider-assigned unique ID for this managed resource.
- interface_ String
- labelFingerprint String
- labels Map<String,String>
- lastAttach StringTimestamp 
- lastDetach StringTimestamp 
- licenses List<String>
- name String
- physicalBlock IntegerSize Bytes 
- pulumiLabels Map<String,String>
- replicaZones List<String>
- selfLink String
- size Integer
- snapshot String
- sourceDisk String
- sourceDisk StringId 
- sourceSnapshot List<GetEncryption Keys Region Disk Source Snapshot Encryption Key> 
- sourceSnapshot StringId 
- type String
- users List<String>
- project String
- region String
- asyncPrimary GetDisks Region Disk Async Primary Disk[] 
- creationTimestamp string
- description string
- diskEncryption GetKeys Region Disk Disk Encryption Key[] 
- effectiveLabels {[key: string]: string}
- guestOs GetFeatures Region Disk Guest Os Feature[] 
- id string
- The provider-assigned unique ID for this managed resource.
- interface string
- labelFingerprint string
- labels {[key: string]: string}
- lastAttach stringTimestamp 
- lastDetach stringTimestamp 
- licenses string[]
- name string
- physicalBlock numberSize Bytes 
- pulumiLabels {[key: string]: string}
- replicaZones string[]
- selfLink string
- size number
- snapshot string
- sourceDisk string
- sourceDisk stringId 
- sourceSnapshot GetEncryption Keys Region Disk Source Snapshot Encryption Key[] 
- sourceSnapshot stringId 
- type string
- users string[]
- project string
- region string
- async_primary_ Sequence[Getdisks Region Disk Async Primary Disk] 
- creation_timestamp str
- description str
- disk_encryption_ Sequence[Getkeys Region Disk Disk Encryption Key] 
- effective_labels Mapping[str, str]
- guest_os_ Sequence[Getfeatures Region Disk Guest Os Feature] 
- id str
- The provider-assigned unique ID for this managed resource.
- interface str
- label_fingerprint str
- labels Mapping[str, str]
- last_attach_ strtimestamp 
- last_detach_ strtimestamp 
- licenses Sequence[str]
- name str
- physical_block_ intsize_ bytes 
- pulumi_labels Mapping[str, str]
- replica_zones Sequence[str]
- self_link str
- size int
- snapshot str
- source_disk str
- source_disk_ strid 
- source_snapshot_ Sequence[Getencryption_ keys Region Disk Source Snapshot Encryption Key] 
- source_snapshot_ strid 
- type str
- users Sequence[str]
- project str
- region str
- asyncPrimary List<Property Map>Disks 
- creationTimestamp String
- description String
- diskEncryption List<Property Map>Keys 
- effectiveLabels Map<String>
- guestOs List<Property Map>Features 
- id String
- The provider-assigned unique ID for this managed resource.
- interface String
- labelFingerprint String
- labels Map<String>
- lastAttach StringTimestamp 
- lastDetach StringTimestamp 
- licenses List<String>
- name String
- physicalBlock NumberSize Bytes 
- pulumiLabels Map<String>
- replicaZones List<String>
- selfLink String
- size Number
- snapshot String
- sourceDisk String
- sourceDisk StringId 
- sourceSnapshot List<Property Map>Encryption Keys 
- sourceSnapshot StringId 
- type String
- users List<String>
- project String
- region String
Supporting Types
GetRegionDiskAsyncPrimaryDisk     
- 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.
GetRegionDiskDiskEncryptionKey     
- KmsKey stringName 
- The name of the encryption key that is stored in Google Cloud KMS.
- RawKey string
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- Sha256 string
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- KmsKey stringName 
- The name of the encryption key that is stored in Google Cloud KMS.
- RawKey string
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- Sha256 string
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kmsKey StringName 
- The name of the encryption key that is stored in Google Cloud KMS.
- rawKey String
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 String
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kmsKey stringName 
- The name of the encryption key that is stored in Google Cloud KMS.
- rawKey string
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 string
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms_key_ strname 
- The name of the encryption key that is stored in Google Cloud KMS.
- 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
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kmsKey StringName 
- The name of the encryption key that is stored in Google Cloud KMS.
- rawKey String
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 String
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
GetRegionDiskGuestOsFeature     
- Type string
- The type of supported feature. Read Enabling guest operating system features to see a list of available options. Possible values: ["MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE"]
- Type string
- The type of supported feature. Read Enabling guest operating system features to see a list of available options. Possible values: ["MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE"]
- type String
- The type of supported feature. Read Enabling guest operating system features to see a list of available options. Possible values: ["MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE"]
- type string
- The type of supported feature. Read Enabling guest operating system features to see a list of available options. Possible values: ["MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE"]
- type str
- The type of supported feature. Read Enabling guest operating system features to see a list of available options. Possible values: ["MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE"]
- type String
- The type of supported feature. Read Enabling guest operating system features to see a list of available options. Possible values: ["MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE"]
GetRegionDiskSourceSnapshotEncryptionKey      
- KmsKey stringName 
- The name of the encryption key that is stored in Google Cloud KMS.
- RawKey string
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- Sha256 string
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- KmsKey stringName 
- The name of the encryption key that is stored in Google Cloud KMS.
- RawKey string
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- Sha256 string
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kmsKey StringName 
- The name of the encryption key that is stored in Google Cloud KMS.
- rawKey String
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 String
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kmsKey stringName 
- The name of the encryption key that is stored in Google Cloud KMS.
- rawKey string
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 string
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kms_key_ strname 
- The name of the encryption key that is stored in Google Cloud KMS.
- 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
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
- kmsKey StringName 
- The name of the encryption key that is stored in Google Cloud KMS.
- rawKey String
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
- sha256 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-betaTerraform Provider.