UNPKG

@pulumi/vsphere

Version:

A Pulumi package for creating vsphere resources

120 lines 4.43 kB
"use strict"; // *** 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.getResourcePoolOutput = exports.getResourcePool = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The `vsphere.ResourcePool` data source can be used to discover the ID of a * resource pool in vSphere. This is useful to return the ID of a resource pool * that you want to use to create virtual machines in using the * `vsphere.VirtualMachine` resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const pool = datacenter.then(datacenter => vsphere.getResourcePool({ * name: "resource-pool-01", * datacenterId: datacenter.id, * })); * ``` * * ### Specifying the Root Resource Pool for a Standalone ESXi Host * * > **NOTE:** Returning the root resource pool for a cluster can be done * directly via the `vsphere.ComputeCluster` * data source. * * All compute resources in vSphere have a resource pool, even if one has not been * explicitly created. This resource pool is referred to as the _root resource * pool_ and can be looked up by specifying the path. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const pool = vsphere.getResourcePool({ * name: "esxi-01.example.com/Resources", * datacenterId: datacenter.id, * }); * ``` * * For more information on the root resource pool, see * [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere * documentation. * * [vmware-docs-resource-pools]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-resource-management-8-0/managing-resource-pools.html */ function getResourcePool(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("vsphere:index/getResourcePool:getResourcePool", { "datacenterId": args.datacenterId, "name": args.name, }, opts); } exports.getResourcePool = getResourcePool; /** * The `vsphere.ResourcePool` data source can be used to discover the ID of a * resource pool in vSphere. This is useful to return the ID of a resource pool * that you want to use to create virtual machines in using the * `vsphere.VirtualMachine` resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const pool = datacenter.then(datacenter => vsphere.getResourcePool({ * name: "resource-pool-01", * datacenterId: datacenter.id, * })); * ``` * * ### Specifying the Root Resource Pool for a Standalone ESXi Host * * > **NOTE:** Returning the root resource pool for a cluster can be done * directly via the `vsphere.ComputeCluster` * data source. * * All compute resources in vSphere have a resource pool, even if one has not been * explicitly created. This resource pool is referred to as the _root resource * pool_ and can be looked up by specifying the path. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const pool = vsphere.getResourcePool({ * name: "esxi-01.example.com/Resources", * datacenterId: datacenter.id, * }); * ``` * * For more information on the root resource pool, see * [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere * documentation. * * [vmware-docs-resource-pools]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-resource-management-8-0/managing-resource-pools.html */ function getResourcePoolOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("vsphere:index/getResourcePool:getResourcePool", { "datacenterId": args.datacenterId, "name": args.name, }, opts); } exports.getResourcePoolOutput = getResourcePoolOutput; //# sourceMappingURL=getResourcePool.js.map