import * as pulumi from "@pulumi/pulumi"; /** * The `vsphere.DpmHostOverride` resource can be used to add a DPM override to a * cluster for a particular host. This allows you to control the power management * settings for individual hosts in the cluster while leaving any unspecified ones * at the default power management settings. * * For more information on DPM within vSphere clusters, see [this * page][ref-vsphere-cluster-dpm]. * * [ref-vsphere-cluster-dpm]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-resource-management-8-0/using-drs-clusters-to-manage-resources/managing-power-resources.html * * > **NOTE:** This resource requires vCenter and is not available on direct ESXi * connections. * * ## Example Usage * * The following example creates a compute cluster comprised of three hosts, * making use of the * `vsphere.ComputeCluster` resource. DPM * will be disabled in the cluster as it is the default setting, but we override * the setting of the first host referenced by the * `vsphere.Host` data source (`esxi1`) by using * the `vsphere.DpmHostOverride` resource so it will be powered off when the * cluster does not need it to service virtual machines. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const config = new pulumi.Config(); * const datacenter = config.get("datacenter") || "dc-01"; * const hosts = config.getObject("hosts") || [ * "esxi-01.example.com", * "esxi-02.example.com", * "esxi-03.example.com", * ]; * const datacenterGetDatacenter = vsphere.getDatacenter({ * name: datacenter, * }); * const hostsGetHost = (new Array(hosts.length)).map((_, i) => i).map(__index => (vsphere.getHost({ * name: hosts[__index], * datacenterId: _arg0_.id, * }))); * const computeCluster = new vsphere.ComputeCluster("compute_cluster", { * name: "compute-cluster-test", * datacenterId: dc.id, * hostSystemIds: [hostsGetHost.map(__item => __item.id)], * drsEnabled: true, * drsAutomationLevel: "fullyAutomated", * }); * const dpmHostOverride = new vsphere.DpmHostOverride("dpm_host_override", { * computeClusterId: computeCluster.id, * hostSystemId: hostsGetHost[0].then(hostsGetHost => hostsGetHost.id), * dpmEnabled: true, * dpmAutomationLevel: "automated", * }); * ``` * * ## Import * * An existing override can be imported into this resource by * * supplying both the path to the cluster, and the path to the host, to `terraform * * import`. If no override exists, an error will be given. An example is below: * * [docs-import]: https://developer.hashicorp.com/terraform/cli/import * * ```sh * $ pulumi import vsphere:index/dpmHostOverride:DpmHostOverride dpm_host_override \ * ``` * * '{"compute_cluster_path": "/dc1/host/cluster1", \ * * "host_path": "/dc1/host/esxi1"}' */ export declare class DpmHostOverride extends pulumi.CustomResource { /** * Get an existing DpmHostOverride 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?: DpmHostOverrideState, opts?: pulumi.CustomResourceOptions): DpmHostOverride; /** * Returns true if the given object is an instance of DpmHostOverride. 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 DpmHostOverride; /** * The managed object reference * ID of the cluster to put the override in. Forces a new * resource if changed. */ readonly computeClusterId: pulumi.Output; /** * The automation level for host power * operations on this host. Can be one of `manual` or `automated`. Default: * `manual`. * * > **NOTE:** Using this resource _always_ implies an override, even if one of * `dpmEnabled` or `dpmAutomationLevel` is omitted. Take note of the defaults * for both options. */ readonly dpmAutomationLevel: pulumi.Output; /** * Enable DPM support for this host. Default: * `false`. */ readonly dpmEnabled: pulumi.Output; /** * The managed object ID of the host. */ readonly hostSystemId: pulumi.Output; /** * Create a DpmHostOverride 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: DpmHostOverrideArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DpmHostOverride resources. */ export interface DpmHostOverrideState { /** * The managed object reference * ID of the cluster to put the override in. Forces a new * resource if changed. */ computeClusterId?: pulumi.Input; /** * The automation level for host power * operations on this host. Can be one of `manual` or `automated`. Default: * `manual`. * * > **NOTE:** Using this resource _always_ implies an override, even if one of * `dpmEnabled` or `dpmAutomationLevel` is omitted. Take note of the defaults * for both options. */ dpmAutomationLevel?: pulumi.Input; /** * Enable DPM support for this host. Default: * `false`. */ dpmEnabled?: pulumi.Input; /** * The managed object ID of the host. */ hostSystemId?: pulumi.Input; } /** * The set of arguments for constructing a DpmHostOverride resource. */ export interface DpmHostOverrideArgs { /** * The managed object reference * ID of the cluster to put the override in. Forces a new * resource if changed. */ computeClusterId: pulumi.Input; /** * The automation level for host power * operations on this host. Can be one of `manual` or `automated`. Default: * `manual`. * * > **NOTE:** Using this resource _always_ implies an override, even if one of * `dpmEnabled` or `dpmAutomationLevel` is omitted. Take note of the defaults * for both options. */ dpmAutomationLevel?: pulumi.Input; /** * Enable DPM support for this host. Default: * `false`. */ dpmEnabled?: pulumi.Input; /** * The managed object ID of the host. */ hostSystemId: pulumi.Input; }