@pulumi/consul
Version:
A Pulumi package for creating and managing consul resources.
119 lines (118 loc) • 5.37 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* [Cluster Peering](https://www.consul.io/docs/connect/cluster-peering) can be used to create connections between two or more independent clusters so that services deployed to different partitions or datacenters can communicate.
*
* The `clusterPeering` resource can be used to establish the peering after a peering token has been generated.
*
* > **Cluster peering is currently in technical preview:** Functionality associated with cluster peering is subject to change. You should never use the technical preview release in secure environments or production scenarios. Features in technical preview may have performance issues, scaling issues, and limited support.
*
* The functionality described here is available only in Consul version 1.13.0 and later.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as consul from "@pulumi/consul";
*
* const eu_us = new consul.PeeringToken("eu-us", {peerName: "eu-cluster"});
* const eu_usPeering = new consul.Peering("eu-us", {
* peerName: "eu-cluster",
* peeringToken: token.peeringToken,
* meta: {
* hello: "world",
* },
* });
* ```
*/
export declare class Peering extends pulumi.CustomResource {
/**
* Get an existing Peering resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PeeringState, opts?: pulumi.CustomResourceOptions): Peering;
/**
* Returns true if the given object is an instance of Peering. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Peering;
readonly deletedAt: pulumi.Output<string>;
/**
* Specifies KV metadata to associate with the peering. This parameter is not required and does not directly impact the cluster peering process.
*/
readonly meta: pulumi.Output<{
[key: string]: string;
} | undefined>;
readonly partition: pulumi.Output<string | undefined>;
readonly peerCaPems: pulumi.Output<string[]>;
readonly peerId: pulumi.Output<string>;
/**
* The name assigned to the peer cluster. The `peerName` is used to reference the peer cluster in service discovery queries and configuration entries such as `service-intentions`. This field must be a valid DNS hostname label.
*/
readonly peerName: pulumi.Output<string>;
readonly peerServerAddresses: pulumi.Output<string[]>;
readonly peerServerName: pulumi.Output<string>;
/**
* The peering token fetched from the peer cluster.
*/
readonly peeringToken: pulumi.Output<string>;
readonly state: pulumi.Output<string>;
/**
* Create a Peering resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: PeeringArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Peering resources.
*/
export interface PeeringState {
deletedAt?: pulumi.Input<string>;
/**
* Specifies KV metadata to associate with the peering. This parameter is not required and does not directly impact the cluster peering process.
*/
meta?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
partition?: pulumi.Input<string>;
peerCaPems?: pulumi.Input<pulumi.Input<string>[]>;
peerId?: pulumi.Input<string>;
/**
* The name assigned to the peer cluster. The `peerName` is used to reference the peer cluster in service discovery queries and configuration entries such as `service-intentions`. This field must be a valid DNS hostname label.
*/
peerName?: pulumi.Input<string>;
peerServerAddresses?: pulumi.Input<pulumi.Input<string>[]>;
peerServerName?: pulumi.Input<string>;
/**
* The peering token fetched from the peer cluster.
*/
peeringToken?: pulumi.Input<string>;
state?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Peering resource.
*/
export interface PeeringArgs {
/**
* Specifies KV metadata to associate with the peering. This parameter is not required and does not directly impact the cluster peering process.
*/
meta?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
partition?: pulumi.Input<string>;
/**
* The name assigned to the peer cluster. The `peerName` is used to reference the peer cluster in service discovery queries and configuration entries such as `service-intentions`. This field must be a valid DNS hostname label.
*/
peerName: pulumi.Input<string>;
/**
* The peering token fetched from the peer cluster.
*/
peeringToken: pulumi.Input<string>;
}