@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
212 lines (211 loc) • 6.92 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Get information about a Google Compute Persistent disks.
*
* [the official documentation](https://cloud.google.com/compute/docs/disks) and its [API](https://cloud.google.com/compute/docs/reference/latest/disks).
*
* ## Example Usage
*
* ```typescript
* 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,
* }});
* ```
*/
export declare function getDisk(args: GetDiskArgs, opts?: pulumi.InvokeOptions): Promise<GetDiskResult>;
/**
* A collection of arguments for invoking getDisk.
*/
export interface GetDiskArgs {
/**
* The name of a specific disk.
*
* - - -
*/
name: string;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: string;
/**
* A reference to the zone where the disk resides.
*/
zone?: string;
}
/**
* A collection of values returned by getDisk.
*/
export interface GetDiskResult {
readonly accessMode: string;
readonly architecture: string;
readonly asyncPrimaryDisks: outputs.compute.GetDiskAsyncPrimaryDisk[];
readonly createSnapshotBeforeDestroy: boolean;
readonly createSnapshotBeforeDestroyPrefix: string;
/**
* Creation timestamp in RFC3339 text format.
*/
readonly creationTimestamp: string;
/**
* The optional description of this resource.
*/
readonly description: string;
readonly diskEncryptionKeys: outputs.compute.GetDiskDiskEncryptionKey[];
readonly diskId: string;
readonly effectiveLabels: {
[key: string]: string;
};
readonly enableConfidentialCompute: boolean;
readonly guestOsFeatures: outputs.compute.GetDiskGuestOsFeature[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The image from which to initialize this disk.
*/
readonly image: string;
readonly interface: string;
/**
* The fingerprint used for optimistic locking of this resource. Used
* internally during updates.
*/
readonly labelFingerprint: string;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
readonly labels: {
[key: string]: string;
};
/**
* Last attach timestamp in RFC3339 text format.
*/
readonly lastAttachTimestamp: string;
/**
* Last detach timestamp in RFC3339 text format.
*/
readonly lastDetachTimestamp: string;
readonly licenses: string[];
readonly multiWriter: boolean;
readonly name: string;
readonly params: outputs.compute.GetDiskParam[];
/**
* Physical block size of the persistent disk, in bytes.
*/
readonly physicalBlockSizeBytes: number;
readonly project?: string;
readonly provisionedIops: number;
readonly provisionedThroughput: number;
readonly pulumiLabels: {
[key: string]: string;
};
readonly resourcePolicies: string[];
/**
* The URI of the created resource.
*/
readonly selfLink: string;
/**
* Size of the persistent disk, specified in GB.
*/
readonly size: number;
/**
* The source snapshot used to create this disk.
*/
readonly snapshot: string;
readonly sourceDisk: string;
readonly sourceDiskId: string;
/**
* The customer-supplied encryption key of the source image.
*/
readonly sourceImageEncryptionKeys: outputs.compute.GetDiskSourceImageEncryptionKey[];
/**
* 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.
*/
readonly sourceImageId: string;
readonly sourceInstantSnapshot: string;
readonly sourceInstantSnapshotId: string;
/**
* The customer-supplied encryption key of the source snapshot.
*/
readonly sourceSnapshotEncryptionKeys: outputs.compute.GetDiskSourceSnapshotEncryptionKey[];
/**
* 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.
*/
readonly sourceSnapshotId: string;
readonly sourceStorageObject: string;
readonly storagePool: string;
/**
* URL of the disk type resource describing which disk type to use to
* create the disk.
*/
readonly type: string;
/**
* Links to the users of the disk (attached instances) in form:
* project/zones/zone/instances/instance
*/
readonly users: string[];
/**
* A reference to the zone where the disk resides.
*/
readonly zone?: string;
}
/**
* Get information about a Google Compute Persistent disks.
*
* [the official documentation](https://cloud.google.com/compute/docs/disks) and its [API](https://cloud.google.com/compute/docs/reference/latest/disks).
*
* ## Example Usage
*
* ```typescript
* 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,
* }});
* ```
*/
export declare function getDiskOutput(args: GetDiskOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDiskResult>;
/**
* A collection of arguments for invoking getDisk.
*/
export interface GetDiskOutputArgs {
/**
* The name of a specific disk.
*
* - - -
*/
name: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* A reference to the zone where the disk resides.
*/
zone?: pulumi.Input<string>;
}