UNPKG

@pulumi/vsphere

Version:

A Pulumi package for creating vsphere resources

64 lines 2.16 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.getHostOutput = exports.getHost = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The `vsphere.Host` data source can be used to discover the ID of an ESXi host. * This can then be used with resources or data sources that require an ESX * host's managed object reference ID. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const host = datacenter.then(datacenter => vsphere.getHost({ * name: "esxi-01.example.com", * datacenterId: datacenter.id, * })); * ``` */ function getHost(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("vsphere:index/getHost:getHost", { "datacenterId": args.datacenterId, "name": args.name, }, opts); } exports.getHost = getHost; /** * The `vsphere.Host` data source can be used to discover the ID of an ESXi host. * This can then be used with resources or data sources that require an ESX * host's managed object reference ID. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const host = datacenter.then(datacenter => vsphere.getHost({ * name: "esxi-01.example.com", * datacenterId: datacenter.id, * })); * ``` */ function getHostOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("vsphere:index/getHost:getHost", { "datacenterId": args.datacenterId, "name": args.name, }, opts); } exports.getHostOutput = getHostOutput; //# sourceMappingURL=getHost.js.map