UNPKG

@pulumi/consul

Version:

A Pulumi package for creating and managing consul resources.

66 lines 2.27 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.getNetworkSegmentsOutput = exports.getNetworkSegments = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * > **NOTE:** This feature requires [Consul Enterprise](https://www.consul.io/docs/enterprise/index.html). * * The `consulNetworkSegment` data source can be used to retrieve the network * segments defined in the configuration. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as consul from "@pulumi/consul"; * * export = async () => { * const segments = await consul.getNetworkSegments({}); * return { * segments: segments.segments, * }; * } * ``` */ function getNetworkSegments(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("consul:index/getNetworkSegments:getNetworkSegments", { "datacenter": args.datacenter, "token": args.token, }, opts); } exports.getNetworkSegments = getNetworkSegments; /** * > **NOTE:** This feature requires [Consul Enterprise](https://www.consul.io/docs/enterprise/index.html). * * The `consulNetworkSegment` data source can be used to retrieve the network * segments defined in the configuration. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as consul from "@pulumi/consul"; * * export = async () => { * const segments = await consul.getNetworkSegments({}); * return { * segments: segments.segments, * }; * } * ``` */ function getNetworkSegmentsOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("consul:index/getNetworkSegments:getNetworkSegments", { "datacenter": args.datacenter, "token": args.token, }, opts); } exports.getNetworkSegmentsOutput = getNetworkSegmentsOutput; //# sourceMappingURL=getNetworkSegments.js.map