Class NetworkArea
NOTE: This feature requires Consul Enterprise.
The consul..NetworkArea resource manages a relationship between servers in two
different Consul datacenters.
Unlike Consul's WAN feature, network areas use just the server RPC port for communication, and relationships can be made between independent pairs of datacenters, so not all servers need to be fully connected. This allows for complex topologies among Consul datacenters like hub/spoke and more general trees.
Example Usage
using Pulumi;
using Consul = Pulumi.Consul;
class MyStack : Stack
{
public MyStack()
{
var dc2 = new Consul.NetworkArea("dc2", new Consul.NetworkAreaArgs
{
PeerDatacenter = "dc2",
RetryJoins =
{
"1.2.3.4",
},
UseTls = true,
});
}
}
Inherited Members
Namespace: Pulumi.Consul
Assembly: Pulumi.Consul.dll
Syntax
public class NetworkArea : CustomResource
Constructors
View SourceNetworkArea(String, NetworkAreaArgs, CustomResourceOptions)
Create a NetworkArea resource with the given unique name, arguments, and options.
Declaration
public NetworkArea(string name, NetworkAreaArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| NetworkAreaArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDatacenter
The datacenter to use. This overrides the agent's default datacenter and the datacenter in the provider setup.
Declaration
public Output<string> Datacenter { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PeerDatacenter
The name of the Consul datacenter that will be joined to form the area.
Declaration
public Output<string> PeerDatacenter { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RetryJoins
Specifies a list of Consul servers to attempt to
join. Servers can be given as IP, IP:port, hostname, or hostname:port.
Declaration
public Output<ImmutableArray<string>> RetryJoins { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Token
The ACL token to use. This overrides the token that the agent provides by default.
Declaration
public Output<string> Token { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UseTls
Specifies whether gossip over this area should be
encrypted with TLS if possible. Defaults to false.
Declaration
public Output<bool?> UseTls { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Methods
View SourceGet(String, Input<String>, NetworkAreaState, CustomResourceOptions)
Get an existing NetworkArea resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static NetworkArea Get(string name, Input<string> id, NetworkAreaState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| NetworkAreaState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| NetworkArea |