UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

408 lines (407 loc) • 17.4 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * ## Example Usage * * ### Netapp Volume Replication Create * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = gcp.compute.getNetwork({ * name: "test-network", * }); * const sourcePool = new gcp.netapp.StoragePool("source_pool", { * name: "source-pool", * location: "us-central1", * serviceLevel: "PREMIUM", * capacityGib: "2048", * network: _default.then(_default => _default.id), * }); * const destinationPool = new gcp.netapp.StoragePool("destination_pool", { * name: "destination-pool", * location: "us-west2", * serviceLevel: "PREMIUM", * capacityGib: "2048", * network: _default.then(_default => _default.id), * }); * const sourceVolume = new gcp.netapp.Volume("source_volume", { * location: sourcePool.location, * name: "source-volume", * capacityGib: "100", * shareName: "source-volume", * storagePool: sourcePool.name, * protocols: ["NFSV3"], * deletionPolicy: "FORCE", * }); * const testReplication = new gcp.netapp.VolumeReplication("test_replication", { * location: sourceVolume.location, * volumeName: sourceVolume.name, * name: "test-replication", * replicationSchedule: "EVERY_10_MINUTES", * description: "This is a replication resource", * destinationVolumeParameters: { * storagePool: destinationPool.id, * volumeId: "destination-volume", * shareName: "source-volume", * description: "This is a replicated volume", * }, * deleteDestinationVolume: true, * waitForMirror: true, * }, { * dependsOn: [sourceVolume], * }); * ``` * * ## Import * * VolumeReplication can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/volumes/{{volume_name}}/replications/{{name}}` * * * `{{project}}/{{location}}/{{volume_name}}/{{name}}` * * * `{{location}}/{{volume_name}}/{{name}}` * * When using the `pulumi import` command, VolumeReplication can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:netapp/volumeReplication:VolumeReplication default projects/{{project}}/locations/{{location}}/volumes/{{volume_name}}/replications/{{name}} * ``` * * ```sh * $ pulumi import gcp:netapp/volumeReplication:VolumeReplication default {{project}}/{{location}}/{{volume_name}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:netapp/volumeReplication:VolumeReplication default {{location}}/{{volume_name}}/{{name}} * ``` */ export declare class VolumeReplication extends pulumi.CustomResource { /** * Get an existing VolumeReplication 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?: VolumeReplicationState, opts?: pulumi.CustomResourceOptions): VolumeReplication; /** * Returns true if the given object is an instance of VolumeReplication. 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 VolumeReplication; /** * Create time of the active directory. A timestamp in RFC3339 UTC "Zulu" format. Examples: "2023-06-22T09:13:01.617Z". */ readonly createTime: pulumi.Output<string>; readonly deleteDestinationVolume: pulumi.Output<boolean | undefined>; /** * An description of this resource. */ readonly description: pulumi.Output<string | undefined>; /** * Full resource name of destination volume with format: `projects/{{project}}/locations/{{location}}/volumes/{{volumeId}}` */ readonly destinationVolume: pulumi.Output<string>; /** * Destination volume parameters. * Structure is documented below. */ readonly destinationVolumeParameters: pulumi.Output<outputs.netapp.VolumeReplicationDestinationVolumeParameters | 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; }>; /** * Only replications with mirror_state=MIRRORED can be stopped. A replication in mirror_state=TRANSFERRING * currently receives an update and stopping the update might be undesirable. Set this parameter to true * to stop anyway. All data transferred to the destination will be discarded and content of destination * volume will remain at the state of the last successful update. Default is false. */ readonly forceStopping: pulumi.Output<boolean | undefined>; /** * Condition of the relationship. Can be one of the following: * - true: The replication relationship is healthy. It has not missed the most recent scheduled transfer. * - false: The replication relationship is not healthy. It has missed the most recent scheduled transfer. */ readonly healthy: pulumi.Output<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. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Name of region for this resource. The resource needs to be created in the region of the destination volume. */ readonly location: pulumi.Output<string>; /** * Indicates the state of the mirror between source and destination volumes. Depending on the amount of data * in your source volume, PREPARING phase can take hours or days. mirrorState = MIRRORED indicates your baseline * transfer ended and destination volume became accessible read-only. TRANSFERRING means a MIRRORED volume * currently receives an update. Updated every 5 minutes. */ readonly mirrorState: pulumi.Output<string>; /** * The name of the replication. Needs to be unique per location. * * * - - - */ readonly name: 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 combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * Set to false to stop/break the mirror. Stopping the mirror makes the destination volume read-write * and act independently from the source volume. * Set to true to enable/resume the mirror. WARNING: Resuming a mirror overwrites any changes * done to the destination volume with the content of the source volume. */ readonly replicationEnabled: pulumi.Output<boolean | undefined>; /** * Specifies the replication interval. * Possible values are: `EVERY_10_MINUTES`, `HOURLY`, `DAILY`. */ readonly replicationSchedule: pulumi.Output<string>; /** * Reverting a replication can swap source and destination volume roles. This field indicates if the `location` hosts * the source or destination volume. For resume and revert and resume operations it is critical to understand * which volume is the source volume, since it will overwrite changes done to the destination volume. */ readonly role: pulumi.Output<string>; /** * Full resource name of source volume with format: `projects/{{project}}/locations/{{location}}/volumes/{{volumeId}}` */ readonly sourceVolume: pulumi.Output<string>; /** * Indicates the state of replication resource. State of the mirror itself is indicated in mirrorState. */ readonly state: pulumi.Output<string>; /** * State details of the replication resource. */ readonly stateDetails: pulumi.Output<string>; /** * Replication transfer statistics. All statistics are updated every 5 minutes. * Structure is documented below. */ readonly transferStats: pulumi.Output<outputs.netapp.VolumeReplicationTransferStat[]>; /** * The name of the existing source volume. */ readonly volumeName: pulumi.Output<string>; readonly waitForMirror: pulumi.Output<boolean | undefined>; /** * Create a VolumeReplication 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: VolumeReplicationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VolumeReplication resources. */ export interface VolumeReplicationState { /** * Create time of the active directory. A timestamp in RFC3339 UTC "Zulu" format. Examples: "2023-06-22T09:13:01.617Z". */ createTime?: pulumi.Input<string>; deleteDestinationVolume?: pulumi.Input<boolean>; /** * An description of this resource. */ description?: pulumi.Input<string>; /** * Full resource name of destination volume with format: `projects/{{project}}/locations/{{location}}/volumes/{{volumeId}}` */ destinationVolume?: pulumi.Input<string>; /** * Destination volume parameters. * Structure is documented below. */ destinationVolumeParameters?: pulumi.Input<inputs.netapp.VolumeReplicationDestinationVolumeParameters>; /** * 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>; }>; /** * Only replications with mirror_state=MIRRORED can be stopped. A replication in mirror_state=TRANSFERRING * currently receives an update and stopping the update might be undesirable. Set this parameter to true * to stop anyway. All data transferred to the destination will be discarded and content of destination * volume will remain at the state of the last successful update. Default is false. */ forceStopping?: pulumi.Input<boolean>; /** * Condition of the relationship. Can be one of the following: * - true: The replication relationship is healthy. It has not missed the most recent scheduled transfer. * - false: The replication relationship is not healthy. It has missed the most recent scheduled transfer. */ healthy?: 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>; }>; /** * Name of region for this resource. The resource needs to be created in the region of the destination volume. */ location?: pulumi.Input<string>; /** * Indicates the state of the mirror between source and destination volumes. Depending on the amount of data * in your source volume, PREPARING phase can take hours or days. mirrorState = MIRRORED indicates your baseline * transfer ended and destination volume became accessible read-only. TRANSFERRING means a MIRRORED volume * currently receives an update. Updated every 5 minutes. */ mirrorState?: pulumi.Input<string>; /** * The name of the replication. 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 combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Set to false to stop/break the mirror. Stopping the mirror makes the destination volume read-write * and act independently from the source volume. * Set to true to enable/resume the mirror. WARNING: Resuming a mirror overwrites any changes * done to the destination volume with the content of the source volume. */ replicationEnabled?: pulumi.Input<boolean>; /** * Specifies the replication interval. * Possible values are: `EVERY_10_MINUTES`, `HOURLY`, `DAILY`. */ replicationSchedule?: pulumi.Input<string>; /** * Reverting a replication can swap source and destination volume roles. This field indicates if the `location` hosts * the source or destination volume. For resume and revert and resume operations it is critical to understand * which volume is the source volume, since it will overwrite changes done to the destination volume. */ role?: pulumi.Input<string>; /** * Full resource name of source volume with format: `projects/{{project}}/locations/{{location}}/volumes/{{volumeId}}` */ sourceVolume?: pulumi.Input<string>; /** * Indicates the state of replication resource. State of the mirror itself is indicated in mirrorState. */ state?: pulumi.Input<string>; /** * State details of the replication resource. */ stateDetails?: pulumi.Input<string>; /** * Replication transfer statistics. All statistics are updated every 5 minutes. * Structure is documented below. */ transferStats?: pulumi.Input<pulumi.Input<inputs.netapp.VolumeReplicationTransferStat>[]>; /** * The name of the existing source volume. */ volumeName?: pulumi.Input<string>; waitForMirror?: pulumi.Input<boolean>; } /** * The set of arguments for constructing a VolumeReplication resource. */ export interface VolumeReplicationArgs { deleteDestinationVolume?: pulumi.Input<boolean>; /** * An description of this resource. */ description?: pulumi.Input<string>; /** * Destination volume parameters. * Structure is documented below. */ destinationVolumeParameters?: pulumi.Input<inputs.netapp.VolumeReplicationDestinationVolumeParameters>; /** * Only replications with mirror_state=MIRRORED can be stopped. A replication in mirror_state=TRANSFERRING * currently receives an update and stopping the update might be undesirable. Set this parameter to true * to stop anyway. All data transferred to the destination will be discarded and content of destination * volume will remain at the state of the last successful update. Default is false. */ forceStopping?: 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>; }>; /** * Name of region for this resource. The resource needs to be created in the region of the destination volume. */ location: pulumi.Input<string>; /** * The name of the replication. 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>; /** * Set to false to stop/break the mirror. Stopping the mirror makes the destination volume read-write * and act independently from the source volume. * Set to true to enable/resume the mirror. WARNING: Resuming a mirror overwrites any changes * done to the destination volume with the content of the source volume. */ replicationEnabled?: pulumi.Input<boolean>; /** * Specifies the replication interval. * Possible values are: `EVERY_10_MINUTES`, `HOURLY`, `DAILY`. */ replicationSchedule: pulumi.Input<string>; /** * The name of the existing source volume. */ volumeName: pulumi.Input<string>; waitForMirror?: pulumi.Input<boolean>; }