@pulumi/consul
Version:
A Pulumi package for creating and managing consul resources.
66 lines • 2.28 kB
JavaScript
;
// *** 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.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