vsphere.ComputeClusterHostGroup
Explore with Pulumi AI
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.
Create ComputeClusterHostGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ComputeClusterHostGroup(name: string, args: ComputeClusterHostGroupArgs, opts?: CustomResourceOptions);
@overload
def ComputeClusterHostGroup(resource_name: str,
args: ComputeClusterHostGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ComputeClusterHostGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
compute_cluster_id: Optional[str] = None,
host_system_ids: Optional[Sequence[str]] = None,
name: Optional[str] = None)
func NewComputeClusterHostGroup(ctx *Context, name string, args ComputeClusterHostGroupArgs, opts ...ResourceOption) (*ComputeClusterHostGroup, error)
public ComputeClusterHostGroup(string name, ComputeClusterHostGroupArgs args, CustomResourceOptions? opts = null)
public ComputeClusterHostGroup(String name, ComputeClusterHostGroupArgs args)
public ComputeClusterHostGroup(String name, ComputeClusterHostGroupArgs args, CustomResourceOptions options)
type: vsphere:ComputeClusterHostGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ComputeClusterHostGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ComputeClusterHostGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ComputeClusterHostGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ComputeClusterHostGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ComputeClusterHostGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var computeClusterHostGroupResource = new VSphere.ComputeClusterHostGroup("computeClusterHostGroupResource", new()
{
ComputeClusterId = "string",
HostSystemIds = new[]
{
"string",
},
Name = "string",
});
example, err := vsphere.NewComputeClusterHostGroup(ctx, "computeClusterHostGroupResource", &vsphere.ComputeClusterHostGroupArgs{
ComputeClusterId: pulumi.String("string"),
HostSystemIds: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var computeClusterHostGroupResource = new ComputeClusterHostGroup("computeClusterHostGroupResource", ComputeClusterHostGroupArgs.builder()
.computeClusterId("string")
.hostSystemIds("string")
.name("string")
.build());
compute_cluster_host_group_resource = vsphere.ComputeClusterHostGroup("computeClusterHostGroupResource",
compute_cluster_id="string",
host_system_ids=["string"],
name="string")
const computeClusterHostGroupResource = new vsphere.ComputeClusterHostGroup("computeClusterHostGroupResource", {
computeClusterId: "string",
hostSystemIds: ["string"],
name: "string",
});
type: vsphere:ComputeClusterHostGroup
properties:
computeClusterId: string
hostSystemIds:
- string
name: string
ComputeClusterHostGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ComputeClusterHostGroup resource accepts the following input properties:
- Compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- Host
System List<string>Ids 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- Name string
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
- Compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- Host
System []stringIds 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- Name string
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
- compute
Cluster StringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- host
System List<String>Ids 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- name String
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
- compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- host
System string[]Ids 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- name string
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
- compute_
cluster_ strid - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- host_
system_ Sequence[str]ids 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- name str
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
- compute
Cluster StringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- host
System List<String>Ids 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- name String
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
Outputs
All input properties are implicitly available as output properties. Additionally, the ComputeClusterHostGroup resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ComputeClusterHostGroup Resource
Get an existing ComputeClusterHostGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ComputeClusterHostGroupState, opts?: CustomResourceOptions): ComputeClusterHostGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compute_cluster_id: Optional[str] = None,
host_system_ids: Optional[Sequence[str]] = None,
name: Optional[str] = None) -> ComputeClusterHostGroup
func GetComputeClusterHostGroup(ctx *Context, name string, id IDInput, state *ComputeClusterHostGroupState, opts ...ResourceOption) (*ComputeClusterHostGroup, error)
public static ComputeClusterHostGroup Get(string name, Input<string> id, ComputeClusterHostGroupState? state, CustomResourceOptions? opts = null)
public static ComputeClusterHostGroup get(String name, Output<String> id, ComputeClusterHostGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- Host
System List<string>Ids 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- Name string
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
- Compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- Host
System []stringIds 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- Name string
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
- compute
Cluster StringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- host
System List<String>Ids 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- name String
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
- compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- host
System string[]Ids 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- name string
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
- compute_
cluster_ strid - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- host_
system_ Sequence[str]ids 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- name str
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
- compute
Cluster StringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- host
System List<String>Ids 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 thevsphere.ComputeClusterVmGroup
resource. Make sure your names are unique across both resources.- name String
- The name of the host group. This must be unique in the cluster. Forces a new resource if changed.
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:
$ pulumi import vsphere:index/computeClusterHostGroup:ComputeClusterHostGroup cluster_host_group \
‘{“compute_cluster_path”: “/dc1/host/cluster1”, \
“name”: “pulumi-test-cluster-host-group”}’
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphere
Terraform Provider.