UNPKG

@pulumi/vsphere

Version:

A Pulumi package for creating vsphere resources

74 lines 2.61 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getTagOutput = exports.getTag = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The `vsphere.Tag` data source can be used to reference tags that are not * managed by this provider. Its attributes are exactly the same as the `vsphere.Tag` * resource, and, like importing, the data source takes a name and * category to search on. The `id` and other attributes are then populated with * the data found by the search. * * > **NOTE:** Tagging is not supported on direct ESXi hosts connections and * requires vCenter Server. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const category = vsphere.getTagCategory({ * name: "example-category", * }); * const tag = category.then(category => vsphere.getTag({ * name: "example-tag", * categoryId: category.id, * })); * ``` */ function getTag(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("vsphere:index/getTag:getTag", { "categoryId": args.categoryId, "name": args.name, }, opts); } exports.getTag = getTag; /** * The `vsphere.Tag` data source can be used to reference tags that are not * managed by this provider. Its attributes are exactly the same as the `vsphere.Tag` * resource, and, like importing, the data source takes a name and * category to search on. The `id` and other attributes are then populated with * the data found by the search. * * > **NOTE:** Tagging is not supported on direct ESXi hosts connections and * requires vCenter Server. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const category = vsphere.getTagCategory({ * name: "example-category", * }); * const tag = category.then(category => vsphere.getTag({ * name: "example-tag", * categoryId: category.id, * })); * ``` */ function getTagOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("vsphere:index/getTag:getTag", { "categoryId": args.categoryId, "name": args.name, }, opts); } exports.getTagOutput = getTagOutput; //# sourceMappingURL=getTag.js.map