@pulumi/vsphere
Version:
A Pulumi package for creating vsphere resources
76 lines • 3.03 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.getComputeClusterOutput = exports.getComputeCluster = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* 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 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.ComputeCluster`
* resource for more information about clusters and how to managed the resource
* in this provider.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const datacenter = vsphere.getDatacenter({
* name: "dc-01",
* });
* const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({
* name: "cluster-01",
* datacenterId: datacenter.id,
* }));
* ```
*/
function getComputeCluster(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("vsphere:index/getComputeCluster:getComputeCluster", {
"datacenterId": args.datacenterId,
"name": args.name,
}, opts);
}
exports.getComputeCluster = getComputeCluster;
/**
* 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 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.ComputeCluster`
* resource for more information about clusters and how to managed the resource
* in this provider.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const datacenter = vsphere.getDatacenter({
* name: "dc-01",
* });
* const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({
* name: "cluster-01",
* datacenterId: datacenter.id,
* }));
* ```
*/
function getComputeClusterOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("vsphere:index/getComputeCluster:getComputeCluster", {
"datacenterId": args.datacenterId,
"name": args.name,
}, opts);
}
exports.getComputeClusterOutput = getComputeClusterOutput;
//# sourceMappingURL=getComputeCluster.js.map