import * as pulumi from "@pulumi/pulumi"; /** * The `vsphere.ComputeClusterHostGroup` resource can be used to manage groups * of hosts in a cluster, either created by the * `vsphere.ComputeCluster` resource or looked up * by the `vsphere.ComputeCluster` data source. * * This resource mainly serves as an input to the * `vsphere.ComputeClusterVmHostRule` * resource - see the documentation for that resource for further details on how * to use host groups. * * > **NOTE:** This resource requires vCenter and is not available on direct ESXi * connections. * * ## Example Usage * * ```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", * haEnabled: true, * }); * const clusterHostGroup = new vsphere.ComputeClusterHostGroup("cluster_host_group", { * name: "test-cluster-host-group", * computeClusterId: computeCluster.id, * hostSystemIds: [hostsGetHost.map(__item => __item.id)], * }); * ``` * * ## Import * * An existing group can be imported into this resource by * * supplying both the path to the cluster, and the name of the host group. If the * * name or cluster is not found, or if the group is of a different type, an error * * will be returned. An example is below: * * [docs-import]: https://developer.hashicorp.com/terraform/cli/import * * ```sh * $ pulumi import vsphere:index/computeClusterHostGroup:ComputeClusterHostGroup cluster_host_group \ * ``` * * '{"compute_cluster_path": "/dc1/host/cluster1", \ * * "name": "pulumi-test-cluster-host-group"}' */ export declare class ComputeClusterHostGroup extends pulumi.CustomResource { /** * Get an existing ComputeClusterHostGroup 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?: ComputeClusterHostGroupState, opts?: pulumi.CustomResourceOptions): ComputeClusterHostGroup; /** * Returns true if the given object is an instance of ComputeClusterHostGroup. 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 ComputeClusterHostGroup; /** * The managed object reference * ID of the cluster to put the group in. Forces a new * resource if changed. */ readonly computeClusterId: pulumi.Output; /** * The managed object IDs of * the hosts to put in the cluster. * * > **NOTE:** The namespace for cluster names on this resource (defined by the * `name` argument) is shared with the * `vsphere.ComputeClusterVmGroup` * resource. Make sure your names are unique across both resources. */ readonly hostSystemIds: pulumi.Output; /** * The name of the host group. This must be unique in the * cluster. Forces a new resource if changed. */ readonly name: pulumi.Output; /** * Create a ComputeClusterHostGroup 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: ComputeClusterHostGroupArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ComputeClusterHostGroup resources. */ export interface ComputeClusterHostGroupState { /** * The managed object reference * ID of the cluster to put the group in. Forces a new * resource if changed. */ computeClusterId?: pulumi.Input; /** * The managed object IDs of * the hosts to put in the cluster. * * > **NOTE:** The namespace for cluster names on this resource (defined by the * `name` argument) is shared with the * `vsphere.ComputeClusterVmGroup` * resource. Make sure your names are unique across both resources. */ hostSystemIds?: pulumi.Input[]>; /** * The name of the host group. This must be unique in the * cluster. Forces a new resource if changed. */ name?: pulumi.Input; } /** * The set of arguments for constructing a ComputeClusterHostGroup resource. */ export interface ComputeClusterHostGroupArgs { /** * The managed object reference * ID of the cluster to put the group in. Forces a new * resource if changed. */ computeClusterId: pulumi.Input; /** * The managed object IDs of * the hosts to put in the cluster. * * > **NOTE:** The namespace for cluster names on this resource (defined by the * `name` argument) is shared with the * `vsphere.ComputeClusterVmGroup` * resource. Make sure your names are unique across both resources. */ hostSystemIds?: pulumi.Input[]>; /** * The name of the host group. This must be unique in the * cluster. Forces a new resource if changed. */ name?: pulumi.Input; }