@pulumi/vsphere
Version:
A Pulumi package for creating vsphere resources
84 lines • 3.26 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getComputeClusterHostGroupOutput = exports.getComputeClusterHostGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* The `vsphere.ComputeClusterHostGroup` data source can be used to discover
* the IDs ESXi hosts in a host group and return host group attributes to other
* resources.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const datacenter = vsphere.getDatacenter({
* name: "dc-01",
* });
* const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
* name: "cluster-01",
* datacenterId: datacenter.id,
* }));
* const hostGroup = cluster.then(cluster => vsphere.getComputeClusterHostGroup({
* name: "hostgroup-01",
* computeClusterId: cluster.id,
* }));
* const hostRule = new vsphere.ComputeClusterVmHostRule("host_rule", {
* computeClusterId: cluster.then(cluster => cluster.id),
* name: "pulumi-host-rule1",
* vmGroupName: "vmgroup-01",
* affinityHostGroupName: hostGroup.then(hostGroup => hostGroup.name),
* });
* ```
*/
function getComputeClusterHostGroup(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("vsphere:index/getComputeClusterHostGroup:getComputeClusterHostGroup", {
"computeClusterId": args.computeClusterId,
"name": args.name,
}, opts);
}
exports.getComputeClusterHostGroup = getComputeClusterHostGroup;
/**
* The `vsphere.ComputeClusterHostGroup` data source can be used to discover
* the IDs ESXi hosts in a host group and return host group attributes to other
* resources.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const datacenter = vsphere.getDatacenter({
* name: "dc-01",
* });
* const cluster = datacenter.then(datacenter => vsphere.getComputeCluster({
* name: "cluster-01",
* datacenterId: datacenter.id,
* }));
* const hostGroup = cluster.then(cluster => vsphere.getComputeClusterHostGroup({
* name: "hostgroup-01",
* computeClusterId: cluster.id,
* }));
* const hostRule = new vsphere.ComputeClusterVmHostRule("host_rule", {
* computeClusterId: cluster.then(cluster => cluster.id),
* name: "pulumi-host-rule1",
* vmGroupName: "vmgroup-01",
* affinityHostGroupName: hostGroup.then(hostGroup => hostGroup.name),
* });
* ```
*/
function getComputeClusterHostGroupOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("vsphere:index/getComputeClusterHostGroup:getComputeClusterHostGroup", {
"computeClusterId": args.computeClusterId,
"name": args.name,
}, opts);
}
exports.getComputeClusterHostGroupOutput = getComputeClusterHostGroupOutput;
//# sourceMappingURL=getComputeClusterHostGroup.js.map