@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
610 lines (609 loc) • 24.8 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* A volume is a file system container in a storage pool that stores application, database, and user data.
*
* You can create a volume's capacity using the available capacity in the storage pool and you can define and resize the capacity without disruption to any processes.
*
* Storage pool settings apply to the volumes contained within them automatically.
*
* To get more information about Volume, see:
*
* * [API documentation](https://cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.volumes)
* * How-to Guides
* * [Documentation](https://cloud.google.com/netapp/volumes/docs/configure-and-use/volumes/overview)
* * [Quickstart](https://cloud.google.com/netapp/volumes/docs/get-started/quickstarts/create-volume)
*
* ## Example Usage
*
* ### Netapp Volume Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = gcp.compute.getNetwork({
* name: "test-network",
* });
* const defaultStoragePool = new gcp.netapp.StoragePool("default", {
* name: "test-pool",
* location: "us-west2",
* serviceLevel: "PREMIUM",
* capacityGib: "2048",
* network: _default.then(_default => _default.id),
* });
* const testVolume = new gcp.netapp.Volume("test_volume", {
* location: "us-west2",
* name: "test-volume",
* capacityGib: "100",
* shareName: "test-volume",
* storagePool: defaultStoragePool.name,
* protocols: ["NFSV3"],
* deletionPolicy: "DEFAULT",
* });
* ```
*
* ## Import
*
* Volume can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/volumes/{{name}}`
*
* * `{{project}}/{{location}}/{{name}}`
*
* * `{{location}}/{{name}}`
*
* When using the `pulumi import` command, Volume can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:netapp/volume:Volume default projects/{{project}}/locations/{{location}}/volumes/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:netapp/volume:Volume default {{project}}/{{location}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:netapp/volume:Volume default {{location}}/{{name}}
* ```
*/
export declare class Volume extends pulumi.CustomResource {
/**
* Get an existing Volume resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VolumeState, opts?: pulumi.CustomResourceOptions): Volume;
/**
* Returns true if the given object is an instance of Volume. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Volume;
/**
* Reports the resource name of the Active Directory policy being used. Inherited from storage pool.
*/
readonly activeDirectory: pulumi.Output<string>;
/**
* Backup configuration for the volume.
* Structure is documented below.
*/
readonly backupConfig: pulumi.Output<outputs.netapp.VolumeBackupConfig | undefined>;
/**
* Capacity of the volume (in GiB).
*/
readonly capacityGib: pulumi.Output<string>;
/**
* Output only. Size of the volume cold tier data in GiB.
*/
readonly coldTierSizeGib: pulumi.Output<string>;
/**
* Create time of the volume. A timestamp in RFC3339 UTC "Zulu" format. Examples: "2023-06-22T09:13:01.617Z".
*/
readonly createTime: pulumi.Output<string>;
/**
* Policy to determine if the volume should be deleted forcefully.
* Volumes may have nested snapshot resources. Deleting such a volume will fail.
* Setting this parameter to FORCE will delete volumes including nested snapshots.
* Possible values: DEFAULT, FORCE.
*/
readonly deletionPolicy: pulumi.Output<string | undefined>;
/**
* An optional description of this resource.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
readonly effectiveLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Reports the data-at-rest encryption type of the volume. Inherited from storage pool.
*/
readonly encryptionType: pulumi.Output<string>;
/**
* Export policy of the volume for NFSV3 and/or NFSV4.1 access.
* Structure is documented below.
*/
readonly exportPolicy: pulumi.Output<outputs.netapp.VolumeExportPolicy | undefined>;
/**
* Indicates whether the volume is part of a volume replication relationship.
*/
readonly hasReplication: pulumi.Output<boolean>;
/**
* Flag indicating if the volume is a kerberos volume or not, export policy rules control kerberos security modes (krb5, krb5i, krb5p).
*/
readonly kerberosEnabled: pulumi.Output<boolean | undefined>;
/**
* Reports the CMEK policy resurce name being used for volume encryption. Inherited from storage pool.
*/
readonly kmsConfig: pulumi.Output<string>;
/**
* Labels as key value pairs. Example: `{ "owner": "Bob", "department": "finance", "purpose": "testing" }`.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Optional. Flag indicating if the volume will be a large capacity volume or a regular volume.
*/
readonly largeCapacity: pulumi.Output<boolean | undefined>;
/**
* Flag indicating if the volume is NFS LDAP enabled or not. Inherited from storage pool.
*/
readonly ldapEnabled: pulumi.Output<boolean>;
/**
* Name of the pool location. Usually a region name, expect for some STANDARD service level pools which require a zone name.
*/
readonly location: pulumi.Output<string>;
/**
* Reports mount instructions for this volume.
* Structure is documented below.
*/
readonly mountOptions: pulumi.Output<outputs.netapp.VolumeMountOption[]>;
/**
* Optional. Flag indicating if the volume will have an IP address per node for volumes supporting multiple IP endpoints.
* Only the volume with largeCapacity will be allowed to have multiple endpoints.
*/
readonly multipleEndpoints: pulumi.Output<boolean | undefined>;
/**
* The name of the volume. Needs to be unique per location.
*
*
* - - -
*/
readonly name: pulumi.Output<string>;
/**
* VPC network name with format: `projects/{{project}}/global/networks/{{network}}`. Inherited from storage pool.
*/
readonly network: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* The protocol of the volume. Allowed combinations are `['NFSV3']`, `['NFSV4']`, `['SMB']`, `['NFSV3', 'NFSV4']`, `['SMB', 'NFSV3']` and `['SMB', 'NFSV4']`.
* Each value may be one of: `NFSV3`, `NFSV4`, `SMB`.
*/
readonly protocols: pulumi.Output<string[]>;
/**
* Name of the Private Service Access allocated range. Inherited from storage pool.
*/
readonly psaRange: pulumi.Output<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
readonly pulumiLabels: pulumi.Output<{
[key: string]: string;
}>;
/**
* Specifies the replica zone for regional volume.
*/
readonly replicaZone: pulumi.Output<string>;
/**
* Used to create this volume from a snapshot (= cloning) or an backup.
* Structure is documented below.
*/
readonly restoreParameters: pulumi.Output<outputs.netapp.VolumeRestoreParameters | undefined>;
/**
* List of actions that are restricted on this volume.
* Each value may be one of: `DELETE`.
*/
readonly restrictedActions: pulumi.Output<string[] | undefined>;
/**
* Security Style of the Volume. Use UNIX to use UNIX or NFSV4 ACLs for file permissions.
* Use NTFS to use NTFS ACLs for file permissions. Can only be set for volumes which use SMB together with NFS as protocol.
* Possible values are: `NTFS`, `UNIX`.
*/
readonly securityStyle: pulumi.Output<string>;
/**
* Service level of the volume. Inherited from storage pool. Supported values are : PREMIUM, EXTREME, STANDARD, FLEX.
*/
readonly serviceLevel: pulumi.Output<string>;
/**
* Share name (SMB) or export path (NFS) of the volume. Needs to be unique per location.
*/
readonly shareName: pulumi.Output<string>;
/**
* Settings for volumes with SMB access.
* Each value may be one of: `ENCRYPT_DATA`, `BROWSABLE`, `CHANGE_NOTIFY`, `NON_BROWSABLE`, `OPLOCKS`, `SHOW_SNAPSHOT`, `SHOW_PREVIOUS_VERSIONS`, `ACCESS_BASED_ENUMERATION`, `CONTINUOUSLY_AVAILABLE`.
*/
readonly smbSettings: pulumi.Output<string[]>;
/**
* If enabled, a NFS volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots. Will enable "Previous Versions" support for SMB.
*/
readonly snapshotDirectory: pulumi.Output<boolean | undefined>;
/**
* Snapshot policy defines the schedule for automatic snapshot creation.
* To disable automatic snapshot creation you have to remove the whole snapshotPolicy block.
* Structure is documented below.
*/
readonly snapshotPolicy: pulumi.Output<outputs.netapp.VolumeSnapshotPolicy | undefined>;
/**
* State of the volume.
*/
readonly state: pulumi.Output<string>;
/**
* State details of the volume.
*/
readonly stateDetails: pulumi.Output<string>;
/**
* Name of the storage pool to create the volume in. Pool needs enough spare capacity to accommodate the volume.
*/
readonly storagePool: pulumi.Output<string>;
/**
* Tiering policy for the volume.
* Structure is documented below.
*/
readonly tieringPolicy: pulumi.Output<outputs.netapp.VolumeTieringPolicy | undefined>;
/**
* Unix permission the mount point will be created with. Default is 0770. Applicable for UNIX security style volumes only.
*/
readonly unixPermissions: pulumi.Output<string>;
/**
* Used capacity of the volume (in GiB). This is computed periodically and it does not represent the realtime usage.
*/
readonly usedGib: pulumi.Output<string>;
/**
* Specifies the active zone for regional volume.
*/
readonly zone: pulumi.Output<string>;
/**
* Create a Volume resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: VolumeArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Volume resources.
*/
export interface VolumeState {
/**
* Reports the resource name of the Active Directory policy being used. Inherited from storage pool.
*/
activeDirectory?: pulumi.Input<string>;
/**
* Backup configuration for the volume.
* Structure is documented below.
*/
backupConfig?: pulumi.Input<inputs.netapp.VolumeBackupConfig>;
/**
* Capacity of the volume (in GiB).
*/
capacityGib?: pulumi.Input<string>;
/**
* Output only. Size of the volume cold tier data in GiB.
*/
coldTierSizeGib?: pulumi.Input<string>;
/**
* Create time of the volume. A timestamp in RFC3339 UTC "Zulu" format. Examples: "2023-06-22T09:13:01.617Z".
*/
createTime?: pulumi.Input<string>;
/**
* Policy to determine if the volume should be deleted forcefully.
* Volumes may have nested snapshot resources. Deleting such a volume will fail.
* Setting this parameter to FORCE will delete volumes including nested snapshots.
* Possible values: DEFAULT, FORCE.
*/
deletionPolicy?: pulumi.Input<string>;
/**
* An optional description of this resource.
*/
description?: pulumi.Input<string>;
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
effectiveLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Reports the data-at-rest encryption type of the volume. Inherited from storage pool.
*/
encryptionType?: pulumi.Input<string>;
/**
* Export policy of the volume for NFSV3 and/or NFSV4.1 access.
* Structure is documented below.
*/
exportPolicy?: pulumi.Input<inputs.netapp.VolumeExportPolicy>;
/**
* Indicates whether the volume is part of a volume replication relationship.
*/
hasReplication?: pulumi.Input<boolean>;
/**
* Flag indicating if the volume is a kerberos volume or not, export policy rules control kerberos security modes (krb5, krb5i, krb5p).
*/
kerberosEnabled?: pulumi.Input<boolean>;
/**
* Reports the CMEK policy resurce name being used for volume encryption. Inherited from storage pool.
*/
kmsConfig?: pulumi.Input<string>;
/**
* Labels as key value pairs. Example: `{ "owner": "Bob", "department": "finance", "purpose": "testing" }`.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Optional. Flag indicating if the volume will be a large capacity volume or a regular volume.
*/
largeCapacity?: pulumi.Input<boolean>;
/**
* Flag indicating if the volume is NFS LDAP enabled or not. Inherited from storage pool.
*/
ldapEnabled?: pulumi.Input<boolean>;
/**
* Name of the pool location. Usually a region name, expect for some STANDARD service level pools which require a zone name.
*/
location?: pulumi.Input<string>;
/**
* Reports mount instructions for this volume.
* Structure is documented below.
*/
mountOptions?: pulumi.Input<pulumi.Input<inputs.netapp.VolumeMountOption>[]>;
/**
* Optional. Flag indicating if the volume will have an IP address per node for volumes supporting multiple IP endpoints.
* Only the volume with largeCapacity will be allowed to have multiple endpoints.
*/
multipleEndpoints?: pulumi.Input<boolean>;
/**
* The name of the volume. Needs to be unique per location.
*
*
* - - -
*/
name?: pulumi.Input<string>;
/**
* VPC network name with format: `projects/{{project}}/global/networks/{{network}}`. Inherited from storage pool.
*/
network?: 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>;
/**
* The protocol of the volume. Allowed combinations are `['NFSV3']`, `['NFSV4']`, `['SMB']`, `['NFSV3', 'NFSV4']`, `['SMB', 'NFSV3']` and `['SMB', 'NFSV4']`.
* Each value may be one of: `NFSV3`, `NFSV4`, `SMB`.
*/
protocols?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Name of the Private Service Access allocated range. Inherited from storage pool.
*/
psaRange?: pulumi.Input<string>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the replica zone for regional volume.
*/
replicaZone?: pulumi.Input<string>;
/**
* Used to create this volume from a snapshot (= cloning) or an backup.
* Structure is documented below.
*/
restoreParameters?: pulumi.Input<inputs.netapp.VolumeRestoreParameters>;
/**
* List of actions that are restricted on this volume.
* Each value may be one of: `DELETE`.
*/
restrictedActions?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Security Style of the Volume. Use UNIX to use UNIX or NFSV4 ACLs for file permissions.
* Use NTFS to use NTFS ACLs for file permissions. Can only be set for volumes which use SMB together with NFS as protocol.
* Possible values are: `NTFS`, `UNIX`.
*/
securityStyle?: pulumi.Input<string>;
/**
* Service level of the volume. Inherited from storage pool. Supported values are : PREMIUM, EXTREME, STANDARD, FLEX.
*/
serviceLevel?: pulumi.Input<string>;
/**
* Share name (SMB) or export path (NFS) of the volume. Needs to be unique per location.
*/
shareName?: pulumi.Input<string>;
/**
* Settings for volumes with SMB access.
* Each value may be one of: `ENCRYPT_DATA`, `BROWSABLE`, `CHANGE_NOTIFY`, `NON_BROWSABLE`, `OPLOCKS`, `SHOW_SNAPSHOT`, `SHOW_PREVIOUS_VERSIONS`, `ACCESS_BASED_ENUMERATION`, `CONTINUOUSLY_AVAILABLE`.
*/
smbSettings?: pulumi.Input<pulumi.Input<string>[]>;
/**
* If enabled, a NFS volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots. Will enable "Previous Versions" support for SMB.
*/
snapshotDirectory?: pulumi.Input<boolean>;
/**
* Snapshot policy defines the schedule for automatic snapshot creation.
* To disable automatic snapshot creation you have to remove the whole snapshotPolicy block.
* Structure is documented below.
*/
snapshotPolicy?: pulumi.Input<inputs.netapp.VolumeSnapshotPolicy>;
/**
* State of the volume.
*/
state?: pulumi.Input<string>;
/**
* State details of the volume.
*/
stateDetails?: pulumi.Input<string>;
/**
* Name of the storage pool to create the volume in. Pool needs enough spare capacity to accommodate the volume.
*/
storagePool?: pulumi.Input<string>;
/**
* Tiering policy for the volume.
* Structure is documented below.
*/
tieringPolicy?: pulumi.Input<inputs.netapp.VolumeTieringPolicy>;
/**
* Unix permission the mount point will be created with. Default is 0770. Applicable for UNIX security style volumes only.
*/
unixPermissions?: pulumi.Input<string>;
/**
* Used capacity of the volume (in GiB). This is computed periodically and it does not represent the realtime usage.
*/
usedGib?: pulumi.Input<string>;
/**
* Specifies the active zone for regional volume.
*/
zone?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Volume resource.
*/
export interface VolumeArgs {
/**
* Backup configuration for the volume.
* Structure is documented below.
*/
backupConfig?: pulumi.Input<inputs.netapp.VolumeBackupConfig>;
/**
* Capacity of the volume (in GiB).
*/
capacityGib: pulumi.Input<string>;
/**
* Policy to determine if the volume should be deleted forcefully.
* Volumes may have nested snapshot resources. Deleting such a volume will fail.
* Setting this parameter to FORCE will delete volumes including nested snapshots.
* Possible values: DEFAULT, FORCE.
*/
deletionPolicy?: pulumi.Input<string>;
/**
* An optional description of this resource.
*/
description?: pulumi.Input<string>;
/**
* Export policy of the volume for NFSV3 and/or NFSV4.1 access.
* Structure is documented below.
*/
exportPolicy?: pulumi.Input<inputs.netapp.VolumeExportPolicy>;
/**
* Flag indicating if the volume is a kerberos volume or not, export policy rules control kerberos security modes (krb5, krb5i, krb5p).
*/
kerberosEnabled?: pulumi.Input<boolean>;
/**
* Labels as key value pairs. Example: `{ "owner": "Bob", "department": "finance", "purpose": "testing" }`.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field `effectiveLabels` for all of the labels present on the resource.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Optional. Flag indicating if the volume will be a large capacity volume or a regular volume.
*/
largeCapacity?: pulumi.Input<boolean>;
/**
* Name of the pool location. Usually a region name, expect for some STANDARD service level pools which require a zone name.
*/
location: pulumi.Input<string>;
/**
* Optional. Flag indicating if the volume will have an IP address per node for volumes supporting multiple IP endpoints.
* Only the volume with largeCapacity will be allowed to have multiple endpoints.
*/
multipleEndpoints?: pulumi.Input<boolean>;
/**
* The name of the volume. Needs to be unique per location.
*
*
* - - -
*/
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>;
/**
* The protocol of the volume. Allowed combinations are `['NFSV3']`, `['NFSV4']`, `['SMB']`, `['NFSV3', 'NFSV4']`, `['SMB', 'NFSV3']` and `['SMB', 'NFSV4']`.
* Each value may be one of: `NFSV3`, `NFSV4`, `SMB`.
*/
protocols: pulumi.Input<pulumi.Input<string>[]>;
/**
* Used to create this volume from a snapshot (= cloning) or an backup.
* Structure is documented below.
*/
restoreParameters?: pulumi.Input<inputs.netapp.VolumeRestoreParameters>;
/**
* List of actions that are restricted on this volume.
* Each value may be one of: `DELETE`.
*/
restrictedActions?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Security Style of the Volume. Use UNIX to use UNIX or NFSV4 ACLs for file permissions.
* Use NTFS to use NTFS ACLs for file permissions. Can only be set for volumes which use SMB together with NFS as protocol.
* Possible values are: `NTFS`, `UNIX`.
*/
securityStyle?: pulumi.Input<string>;
/**
* Share name (SMB) or export path (NFS) of the volume. Needs to be unique per location.
*/
shareName: pulumi.Input<string>;
/**
* Settings for volumes with SMB access.
* Each value may be one of: `ENCRYPT_DATA`, `BROWSABLE`, `CHANGE_NOTIFY`, `NON_BROWSABLE`, `OPLOCKS`, `SHOW_SNAPSHOT`, `SHOW_PREVIOUS_VERSIONS`, `ACCESS_BASED_ENUMERATION`, `CONTINUOUSLY_AVAILABLE`.
*/
smbSettings?: pulumi.Input<pulumi.Input<string>[]>;
/**
* If enabled, a NFS volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots. Will enable "Previous Versions" support for SMB.
*/
snapshotDirectory?: pulumi.Input<boolean>;
/**
* Snapshot policy defines the schedule for automatic snapshot creation.
* To disable automatic snapshot creation you have to remove the whole snapshotPolicy block.
* Structure is documented below.
*/
snapshotPolicy?: pulumi.Input<inputs.netapp.VolumeSnapshotPolicy>;
/**
* Name of the storage pool to create the volume in. Pool needs enough spare capacity to accommodate the volume.
*/
storagePool: pulumi.Input<string>;
/**
* Tiering policy for the volume.
* Structure is documented below.
*/
tieringPolicy?: pulumi.Input<inputs.netapp.VolumeTieringPolicy>;
/**
* Unix permission the mount point will be created with. Default is 0770. Applicable for UNIX security style volumes only.
*/
unixPermissions?: pulumi.Input<string>;
}