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`][tf-vsphere-cluster-resource] resource or looked up * by the [`vsphere.ComputeCluster`][tf-vsphere-cluster-data-source] data source. * * [tf-vsphere-cluster-resource]: /docs/providers/vsphere/r/compute_cluster.html * [tf-vsphere-cluster-data-source]: /docs/providers/vsphere/d/compute_cluster.html * * This resource mainly serves as an input to the * [`vsphere.ComputeClusterVmHostRule`][tf-vsphere-cluster-vm-host-rule-resource] * resource - see the documentation for that resource for further details on how * to use host groups. * * [tf-vsphere-cluster-vm-host-rule-resource]: /docs/providers/vsphere/r/compute_cluster_vm_host_rule.html * * > **NOTE:** This resource requires vCenter and is not available on direct ESXi * connections. * * ## Example Usage * * The example below is the exact same configuration as the * [example][tf-vsphere-cluster-resource-example] in the * [`vsphere.ComputeCluster`][tf-vsphere-cluster-resource] resource, but in * addition, it creates a host group with the same hosts that get put into the * cluster. * * [tf-vsphere-cluster-resource-example]: /docs/providers/vsphere/r/compute_cluster.html#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: "pulumi-compute-cluster-test", * datacenterId: datacenterGetDatacenter.then(datacenterGetDatacenter => datacenterGetDatacenter.id), * hostSystemIds: [hostsGetHost.map(__item => __item.id)], * drsEnabled: true, * drsAutomationLevel: "fullyAutomated", * haEnabled: true, * }); * const clusterHostGroup = new vsphere.ComputeClusterHostGroup("cluster_host_group", { * name: "pulumi-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 * terraform import vsphere_compute_cluster_host_group.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][docs-about-morefs] of the cluster to put the group in. Forces a new * resource if changed. * * [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider */ readonly computeClusterId: pulumi.Output; /** * The [managed object IDs][docs-about-morefs] 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`][tf-vsphere-cluster-vm-group-resource] * resource. Make sure your names are unique across both resources. * * [tf-vsphere-cluster-vm-group-resource]: /docs/providers/vsphere/r/compute_cluster_vm_group.html */ 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][docs-about-morefs] of the cluster to put the group in. Forces a new * resource if changed. * * [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider */ computeClusterId?: pulumi.Input; /** * The [managed object IDs][docs-about-morefs] 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`][tf-vsphere-cluster-vm-group-resource] * resource. Make sure your names are unique across both resources. * * [tf-vsphere-cluster-vm-group-resource]: /docs/providers/vsphere/r/compute_cluster_vm_group.html */ 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][docs-about-morefs] of the cluster to put the group in. Forces a new * resource if changed. * * [docs-about-morefs]: /docs/providers/vsphere/index.html#use-of-managed-object-references-by-the-vsphere-provider */ computeClusterId: pulumi.Input; /** * The [managed object IDs][docs-about-morefs] 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`][tf-vsphere-cluster-vm-group-resource] * resource. Make sure your names are unique across both resources. * * [tf-vsphere-cluster-vm-group-resource]: /docs/providers/vsphere/r/compute_cluster_vm_group.html */ 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; }