Class GetComputeCluster
Inheritance
System.Object
GetComputeCluster
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.VSphere
Assembly: Pulumi.VSphere.dll
Syntax
public static class GetComputeCluster
Methods
View SourceInvokeAsync(GetComputeClusterArgs, InvokeOptions)
The vsphere..ComputeCluster data source can be used to discover the ID of a
cluster in vSphere. This is useful to fetch the ID of a cluster that you want
to use for virtual machine placement via the
vsphere..VirtualMachine resource, allowing
you to specify the cluster's root resource pool directly versus using the alias
available through the vsphere..ResourcePool
data source.
You may also wish to see the
vsphere..ComputeClusterresource for further details about clusters or how to work with them.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var datacenter = Output.Create(VSphere.GetDatacenter.InvokeAsync(new VSphere.GetDatacenterArgs
{
Name = "dc1",
}));
var computeCluster = Output.Create(VSphere.GetComputeCluster.InvokeAsync(new VSphere.GetComputeClusterArgs
{
DatacenterId = data.Vsphere_datacenter.Dc.Id,
Name = "compute-cluster1",
}));
}
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetComputeClusterResult> InvokeAsync(GetComputeClusterArgs args, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetComputeClusterArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetComputeClusterResult> |