@pulumi/consul
Version:
A Pulumi package for creating and managing consul resources.
75 lines (74 loc) • 2.59 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* > **Note:** The `consul.getAgentConfig` resource differs from [`consul.getAgentSelf`](https://www.terraform.io/docs/providers/consul/d/agent_self.html),
* providing less information but utilizing stable APIs. `consul.getAgentSelf` will be
* deprecated in a future release.
*
* The `consul.getAgentConfig` data source returns
* [configuration data](https://www.consul.io/api/agent.html#read-configuration)
* from the agent specified in the `provider`.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as consul from "@pulumi/consul";
*
* const remoteAgent = consul.getAgentConfig({});
* export const consulVersion = remoteAgent.then(remoteAgent => remoteAgent.version);
* ```
*/
export declare function getAgentConfig(opts?: pulumi.InvokeOptions): Promise<GetAgentConfigResult>;
/**
* A collection of values returned by getAgentConfig.
*/
export interface GetAgentConfigResult {
/**
* The datacenter the agent is running in
*/
readonly datacenter: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The ID of the node the agent is running on
*/
readonly nodeId: string;
/**
* The name of the node the agent is running on
*/
readonly nodeName: string;
/**
* The first 9 characters of the VCS revision of the build of Consul that is running
*/
readonly revision: string;
/**
* Boolean if the agent is a server or not
*/
readonly server: boolean;
/**
* The version of the build of Consul that is running
*/
readonly version: string;
}
/**
* > **Note:** The `consul.getAgentConfig` resource differs from [`consul.getAgentSelf`](https://www.terraform.io/docs/providers/consul/d/agent_self.html),
* providing less information but utilizing stable APIs. `consul.getAgentSelf` will be
* deprecated in a future release.
*
* The `consul.getAgentConfig` data source returns
* [configuration data](https://www.consul.io/api/agent.html#read-configuration)
* from the agent specified in the `provider`.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as consul from "@pulumi/consul";
*
* const remoteAgent = consul.getAgentConfig({});
* export const consulVersion = remoteAgent.then(remoteAgent => remoteAgent.version);
* ```
*/
export declare function getAgentConfigOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetAgentConfigResult>;