@pulumi/consul
Version:
A Pulumi package for creating and managing consul resources.
102 lines (101 loc) • 3.23 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* > **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,
* };
* }
* ```
*/
export declare function getNetworkSegments(args?: GetNetworkSegmentsArgs, opts?: pulumi.InvokeOptions): Promise<GetNetworkSegmentsResult>;
/**
* A collection of arguments for invoking getNetworkSegments.
*/
export interface GetNetworkSegmentsArgs {
/**
* The datacenter to use. This overrides the
* agent's default datacenter and the datacenter in the provider setup.
*/
datacenter?: string;
/**
* The ACL token to use. This overrides the
* token that the agent provides by default.
*
* @deprecated The token argument has been deprecated and will be removed in a future release.
Please use the token argument in the provider configuration
*/
token?: string;
}
/**
* A collection of values returned by getNetworkSegments.
*/
export interface GetNetworkSegmentsResult {
/**
* The datacenter the segments are being read from.
*/
readonly datacenter: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The list of network segments.
*/
readonly segments: string[];
/**
* @deprecated The token argument has been deprecated and will be removed in a future release.
Please use the token argument in the provider configuration
*/
readonly token?: string;
}
/**
* > **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,
* };
* }
* ```
*/
export declare function getNetworkSegmentsOutput(args?: GetNetworkSegmentsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetNetworkSegmentsResult>;
/**
* A collection of arguments for invoking getNetworkSegments.
*/
export interface GetNetworkSegmentsOutputArgs {
/**
* The datacenter to use. This overrides the
* agent's default datacenter and the datacenter in the provider setup.
*/
datacenter?: pulumi.Input<string>;
/**
* The ACL token to use. This overrides the
* token that the agent provides by default.
*
* @deprecated The token argument has been deprecated and will be removed in a future release.
Please use the token argument in the provider configuration
*/
token?: pulumi.Input<string>;
}