UNPKG

@pulumi/vsphere

Version:

A Pulumi package for creating vsphere resources

58 lines 1.98 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.getDatacenterOutput = exports.getDatacenter = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The `vsphere.Datacenter` data source can be used to discover the ID of a * vSphere datacenter object. This can then be used with resources or data sources * that require a datacenter, such as the `vsphere.Host` * data source. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * ``` */ function getDatacenter(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("vsphere:index/getDatacenter:getDatacenter", { "name": args.name, }, opts); } exports.getDatacenter = getDatacenter; /** * The `vsphere.Datacenter` data source can be used to discover the ID of a * vSphere datacenter object. This can then be used with resources or data sources * that require a datacenter, such as the `vsphere.Host` * data source. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * ``` */ function getDatacenterOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("vsphere:index/getDatacenter:getDatacenter", { "name": args.name, }, opts); } exports.getDatacenterOutput = getDatacenterOutput; //# sourceMappingURL=getDatacenter.js.map