import * as pulumi from "@pulumi/pulumi"; /** * The `vsphere.DatastoreCluster` resource can be used to create and manage * datastore clusters. This can be used to create groups of datastores with a * shared management interface, allowing for resource control and load balancing * through Storage DRS. * * For more information on vSphere datastore clusters and Storage DRS, see [this * page][ref-vsphere-datastore-clusters]. * * [ref-vsphere-datastore-clusters]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-resource-management-8-0/creating-a-datastore-cluster.html * * > **NOTE:** This resource requires vCenter and is not available on direct ESXi * connections. * * > **NOTE:** Storage DRS requires a vSphere Enterprise Plus license. * * ## Example Usage * * The following example sets up a datastore cluster and enables Storage DRS with * the default settings. It then creates two NAS datastores using the * `vsphere.NasDatastore` resource and assigns them to * the datastore cluster. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const config = new pulumi.Config(); * const hosts = config.getObject("hosts") || [ * "esxi-01.example.com", * "esxi-02.example.com", * "esxi-03.example.com", * ]; * const datacenter = vsphere.getDatacenter({}); * const hostsGetHost = (new Array(hosts.length)).map((_, i) => i).map(__index => (vsphere.getHost({ * name: hosts[__index], * datacenterId: _arg0_.id, * }))); * const datastoreCluster = new vsphere.DatastoreCluster("datastore_cluster", { * name: "datastore-cluster-test", * datacenterId: datacenter.then(datacenter => datacenter.id), * sdrsEnabled: true, * }); * const datastore1 = new vsphere.NasDatastore("datastore1", { * name: "datastore-test1", * hostSystemIds: [esxiHosts.map(__item => __item.id)], * datastoreClusterId: datastoreCluster.id, * type: "NFS", * remoteHosts: ["nfs"], * remotePath: "/export/test1", * }); * const datastore2 = new vsphere.NasDatastore("datastore2", { * name: "datastore-test2", * hostSystemIds: [esxiHosts.map(__item => __item.id)], * datastoreClusterId: datastoreCluster.id, * type: "NFS", * remoteHosts: ["nfs"], * remotePath: "/export/test2", * }); * ``` * * ## Import * * An existing datastore cluster can be imported into this resource * * via the path to the cluster, via the following command: * * [docs-import]: https://developer.hashicorp.com/terraform/cli/import * * ```sh * $ pulumi import vsphere:index/datastoreCluster:DatastoreCluster datastore_cluster /dc1/datastore/ds-cluster * ``` * * The above would import the datastore cluster named `ds-cluster` that is located * * in the `dc1` datacenter. */ export declare class DatastoreCluster extends pulumi.CustomResource { /** * Get an existing DatastoreCluster 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, state?: DatastoreClusterState, opts?: pulumi.CustomResourceOptions): DatastoreCluster; /** * Returns true if the given object is an instance of DatastoreCluster. 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 DatastoreCluster; /** * A map of custom attribute ids to attribute * value strings to set for the datastore cluster. See * [here][docs-setting-custom-attributes] for a reference on how to set values * for custom attributes. * * [docs-setting-custom-attributes]: /docs/providers/vsphere/r/custom_attribute.html#using-custom-attributes-in-a-supported-resource * * > **NOTE:** Custom attributes are unsupported on direct ESXi connections * and require vCenter. */ readonly customAttributes: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The managed object ID of * the datacenter to create the datastore cluster in. Forces a new resource if * changed. */ readonly datacenterId: pulumi.Output; /** * The relative path to a folder to put this datastore * cluster in. This is a path relative to the datacenter you are deploying the * datastore to. Example: for the `dc1` datacenter, and a provided `folder` of * `foo/bar`, The provider will place a datastore cluster named * `datastore-cluster-test` in a datastore folder located at * `/dc1/datastore/foo/bar`, with the final inventory path being * `/dc1/datastore/foo/bar/datastore-cluster-test`. */ readonly folder: pulumi.Output; /** * The name of the datastore cluster. */ readonly name: pulumi.Output; /** * Advanced configuration options for storage DRS. */ readonly sdrsAdvancedOptions: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The default automation level for all virtual machines in this storage cluster. */ readonly sdrsAutomationLevel: pulumi.Output; /** * When true, storage DRS keeps VMDKs for individual VMs on the same datastore by default. */ readonly sdrsDefaultIntraVmAffinity: pulumi.Output; /** * Enable Storage DRS for this datastore cluster. * Default: `false`. */ readonly sdrsEnabled: pulumi.Output; /** * The threshold, in GB, that storage DRS uses to make decisions to migrate VMs out of a datastore. */ readonly sdrsFreeSpaceThreshold: pulumi.Output; /** * The free space threshold to use. When set to utilization, drsSpaceUtilizationThreshold is used, and when set to * freeSpace, drsFreeSpaceThreshold is used. */ readonly sdrsFreeSpaceThresholdMode: pulumi.Output; /** * The threshold, in percent, of difference between space utilization in datastores before storage DRS makes decisions to * balance the space. */ readonly sdrsFreeSpaceUtilizationDifference: pulumi.Output; /** * Overrides the default automation settings when correcting I/O load imbalances. */ readonly sdrsIoBalanceAutomationLevel: pulumi.Output; /** * The I/O latency threshold, in milliseconds, that storage DRS uses to make recommendations to move disks from this * datastore. */ readonly sdrsIoLatencyThreshold: pulumi.Output; /** * Enable I/O load balancing for this datastore cluster. */ readonly sdrsIoLoadBalanceEnabled: pulumi.Output; /** * The difference between load in datastores in the cluster before storage DRS makes recommendations to balance the load. */ readonly sdrsIoLoadImbalanceThreshold: pulumi.Output; /** * The threshold of reservable IOPS of all virtual machines on the datastore before storage DRS makes recommendations to * move VMs off of a datastore. */ readonly sdrsIoReservableIopsThreshold: pulumi.Output; /** * The threshold, in percent, of actual estimated performance of the datastore (in IOPS) that storage DRS uses to make * recommendations to move VMs off of a datastore when the total reservable IOPS exceeds the threshold. */ readonly sdrsIoReservablePercentThreshold: pulumi.Output; /** * The reservable IOPS threshold to use, percent in the event of automatic, or manual threshold in the event of manual. */ readonly sdrsIoReservableThresholdMode: pulumi.Output; /** * The storage DRS poll interval, in minutes. */ readonly sdrsLoadBalanceInterval: pulumi.Output; /** * Overrides the default automation settings when correcting storage and VM policy violations. */ readonly sdrsPolicyEnforcementAutomationLevel: pulumi.Output; /** * Overrides the default automation settings when correcting affinity rule violations. */ readonly sdrsRuleEnforcementAutomationLevel: pulumi.Output; /** * Overrides the default automation settings when correcting disk space imbalances. */ readonly sdrsSpaceBalanceAutomationLevel: pulumi.Output; /** * The threshold, in percent of used space, that storage DRS uses to make decisions to migrate VMs out of a datastore. */ readonly sdrsSpaceUtilizationThreshold: pulumi.Output; /** * Overrides the default automation settings when generating recommendations for datastore evacuation. */ readonly sdrsVmEvacuationAutomationLevel: pulumi.Output; /** * The IDs of any tags to attach to this resource. */ readonly tags: pulumi.Output; /** * Create a DatastoreCluster 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: DatastoreClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DatastoreCluster resources. */ export interface DatastoreClusterState { /** * A map of custom attribute ids to attribute * value strings to set for the datastore cluster. See * [here][docs-setting-custom-attributes] for a reference on how to set values * for custom attributes. * * [docs-setting-custom-attributes]: /docs/providers/vsphere/r/custom_attribute.html#using-custom-attributes-in-a-supported-resource * * > **NOTE:** Custom attributes are unsupported on direct ESXi connections * and require vCenter. */ customAttributes?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The managed object ID of * the datacenter to create the datastore cluster in. Forces a new resource if * changed. */ datacenterId?: pulumi.Input; /** * The relative path to a folder to put this datastore * cluster in. This is a path relative to the datacenter you are deploying the * datastore to. Example: for the `dc1` datacenter, and a provided `folder` of * `foo/bar`, The provider will place a datastore cluster named * `datastore-cluster-test` in a datastore folder located at * `/dc1/datastore/foo/bar`, with the final inventory path being * `/dc1/datastore/foo/bar/datastore-cluster-test`. */ folder?: pulumi.Input; /** * The name of the datastore cluster. */ name?: pulumi.Input; /** * Advanced configuration options for storage DRS. */ sdrsAdvancedOptions?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The default automation level for all virtual machines in this storage cluster. */ sdrsAutomationLevel?: pulumi.Input; /** * When true, storage DRS keeps VMDKs for individual VMs on the same datastore by default. */ sdrsDefaultIntraVmAffinity?: pulumi.Input; /** * Enable Storage DRS for this datastore cluster. * Default: `false`. */ sdrsEnabled?: pulumi.Input; /** * The threshold, in GB, that storage DRS uses to make decisions to migrate VMs out of a datastore. */ sdrsFreeSpaceThreshold?: pulumi.Input; /** * The free space threshold to use. When set to utilization, drsSpaceUtilizationThreshold is used, and when set to * freeSpace, drsFreeSpaceThreshold is used. */ sdrsFreeSpaceThresholdMode?: pulumi.Input; /** * The threshold, in percent, of difference between space utilization in datastores before storage DRS makes decisions to * balance the space. */ sdrsFreeSpaceUtilizationDifference?: pulumi.Input; /** * Overrides the default automation settings when correcting I/O load imbalances. */ sdrsIoBalanceAutomationLevel?: pulumi.Input; /** * The I/O latency threshold, in milliseconds, that storage DRS uses to make recommendations to move disks from this * datastore. */ sdrsIoLatencyThreshold?: pulumi.Input; /** * Enable I/O load balancing for this datastore cluster. */ sdrsIoLoadBalanceEnabled?: pulumi.Input; /** * The difference between load in datastores in the cluster before storage DRS makes recommendations to balance the load. */ sdrsIoLoadImbalanceThreshold?: pulumi.Input; /** * The threshold of reservable IOPS of all virtual machines on the datastore before storage DRS makes recommendations to * move VMs off of a datastore. */ sdrsIoReservableIopsThreshold?: pulumi.Input; /** * The threshold, in percent, of actual estimated performance of the datastore (in IOPS) that storage DRS uses to make * recommendations to move VMs off of a datastore when the total reservable IOPS exceeds the threshold. */ sdrsIoReservablePercentThreshold?: pulumi.Input; /** * The reservable IOPS threshold to use, percent in the event of automatic, or manual threshold in the event of manual. */ sdrsIoReservableThresholdMode?: pulumi.Input; /** * The storage DRS poll interval, in minutes. */ sdrsLoadBalanceInterval?: pulumi.Input; /** * Overrides the default automation settings when correcting storage and VM policy violations. */ sdrsPolicyEnforcementAutomationLevel?: pulumi.Input; /** * Overrides the default automation settings when correcting affinity rule violations. */ sdrsRuleEnforcementAutomationLevel?: pulumi.Input; /** * Overrides the default automation settings when correcting disk space imbalances. */ sdrsSpaceBalanceAutomationLevel?: pulumi.Input; /** * The threshold, in percent of used space, that storage DRS uses to make decisions to migrate VMs out of a datastore. */ sdrsSpaceUtilizationThreshold?: pulumi.Input; /** * Overrides the default automation settings when generating recommendations for datastore evacuation. */ sdrsVmEvacuationAutomationLevel?: pulumi.Input; /** * The IDs of any tags to attach to this resource. */ tags?: pulumi.Input[]>; } /** * The set of arguments for constructing a DatastoreCluster resource. */ export interface DatastoreClusterArgs { /** * A map of custom attribute ids to attribute * value strings to set for the datastore cluster. See * [here][docs-setting-custom-attributes] for a reference on how to set values * for custom attributes. * * [docs-setting-custom-attributes]: /docs/providers/vsphere/r/custom_attribute.html#using-custom-attributes-in-a-supported-resource * * > **NOTE:** Custom attributes are unsupported on direct ESXi connections * and require vCenter. */ customAttributes?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The managed object ID of * the datacenter to create the datastore cluster in. Forces a new resource if * changed. */ datacenterId: pulumi.Input; /** * The relative path to a folder to put this datastore * cluster in. This is a path relative to the datacenter you are deploying the * datastore to. Example: for the `dc1` datacenter, and a provided `folder` of * `foo/bar`, The provider will place a datastore cluster named * `datastore-cluster-test` in a datastore folder located at * `/dc1/datastore/foo/bar`, with the final inventory path being * `/dc1/datastore/foo/bar/datastore-cluster-test`. */ folder?: pulumi.Input; /** * The name of the datastore cluster. */ name?: pulumi.Input; /** * Advanced configuration options for storage DRS. */ sdrsAdvancedOptions?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The default automation level for all virtual machines in this storage cluster. */ sdrsAutomationLevel?: pulumi.Input; /** * When true, storage DRS keeps VMDKs for individual VMs on the same datastore by default. */ sdrsDefaultIntraVmAffinity?: pulumi.Input; /** * Enable Storage DRS for this datastore cluster. * Default: `false`. */ sdrsEnabled?: pulumi.Input; /** * The threshold, in GB, that storage DRS uses to make decisions to migrate VMs out of a datastore. */ sdrsFreeSpaceThreshold?: pulumi.Input; /** * The free space threshold to use. When set to utilization, drsSpaceUtilizationThreshold is used, and when set to * freeSpace, drsFreeSpaceThreshold is used. */ sdrsFreeSpaceThresholdMode?: pulumi.Input; /** * The threshold, in percent, of difference between space utilization in datastores before storage DRS makes decisions to * balance the space. */ sdrsFreeSpaceUtilizationDifference?: pulumi.Input; /** * Overrides the default automation settings when correcting I/O load imbalances. */ sdrsIoBalanceAutomationLevel?: pulumi.Input; /** * The I/O latency threshold, in milliseconds, that storage DRS uses to make recommendations to move disks from this * datastore. */ sdrsIoLatencyThreshold?: pulumi.Input; /** * Enable I/O load balancing for this datastore cluster. */ sdrsIoLoadBalanceEnabled?: pulumi.Input; /** * The difference between load in datastores in the cluster before storage DRS makes recommendations to balance the load. */ sdrsIoLoadImbalanceThreshold?: pulumi.Input; /** * The threshold of reservable IOPS of all virtual machines on the datastore before storage DRS makes recommendations to * move VMs off of a datastore. */ sdrsIoReservableIopsThreshold?: pulumi.Input; /** * The threshold, in percent, of actual estimated performance of the datastore (in IOPS) that storage DRS uses to make * recommendations to move VMs off of a datastore when the total reservable IOPS exceeds the threshold. */ sdrsIoReservablePercentThreshold?: pulumi.Input; /** * The reservable IOPS threshold to use, percent in the event of automatic, or manual threshold in the event of manual. */ sdrsIoReservableThresholdMode?: pulumi.Input; /** * The storage DRS poll interval, in minutes. */ sdrsLoadBalanceInterval?: pulumi.Input; /** * Overrides the default automation settings when correcting storage and VM policy violations. */ sdrsPolicyEnforcementAutomationLevel?: pulumi.Input; /** * Overrides the default automation settings when correcting affinity rule violations. */ sdrsRuleEnforcementAutomationLevel?: pulumi.Input; /** * Overrides the default automation settings when correcting disk space imbalances. */ sdrsSpaceBalanceAutomationLevel?: pulumi.Input; /** * The threshold, in percent of used space, that storage DRS uses to make decisions to migrate VMs out of a datastore. */ sdrsSpaceUtilizationThreshold?: pulumi.Input; /** * Overrides the default automation settings when generating recommendations for datastore evacuation. */ sdrsVmEvacuationAutomationLevel?: pulumi.Input; /** * The IDs of any tags to attach to this resource. */ tags?: pulumi.Input[]>; }