Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

getNetworkAreaMembers

NOTE: This feature requires Consul Enterprise.

The consul.getNetworkAreaMembers data source provides a list of the Consul servers present in a specific network area.

Example Usage

using Pulumi;
using Consul = Pulumi.Consul;

class MyStack : Stack
{
    public MyStack()
    {
        var dc2NetworkArea = new Consul.NetworkArea("dc2NetworkArea", new Consul.NetworkAreaArgs
        {
            PeerDatacenter = "dc2",
            RetryJoins = 
            {
                "1.2.3.4",
            },
            UseTls = true,
        });
        var dc2NetworkAreaMembers = dc2NetworkArea.Id.Apply(id => Consul.GetNetworkAreaMembers.InvokeAsync(new Consul.GetNetworkAreaMembersArgs
        {
            Uuid = id,
        }));
        this.Members = dc2NetworkAreaMembers.Apply(dc2NetworkAreaMembers => dc2NetworkAreaMembers.Members);
    }

    [Output("members")]
    public Output<string> Members { get; set; }
}

Coming soon!

import pulumi
import pulumi_consul as consul

dc2_network_area = consul.NetworkArea("dc2NetworkArea",
    peer_datacenter="dc2",
    retry_joins=["1.2.3.4"],
    use_tls=True)
dc2_network_area_members = dc2_network_area.id.apply(lambda id: consul.get_network_area_members(uuid=id))
pulumi.export("members", dc2_network_area_members.members)
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";

const dc2NetworkArea = new consul.NetworkArea("dc2NetworkArea", {
    peerDatacenter: "dc2",
    retryJoins: ["1.2.3.4"],
    useTls: true,
});
const dc2NetworkAreaMembers = dc2NetworkArea.id.apply(id => consul.getNetworkAreaMembers({
    uuid: id,
}));
export const members = dc2NetworkAreaMembers.members;

Using getNetworkAreaMembers

function getNetworkAreaMembers(args: GetNetworkAreaMembersArgs, opts?: InvokeOptions): Promise<GetNetworkAreaMembersResult>
def get_network_area_members(datacenter: Optional[str] = None, token: Optional[str] = None, uuid: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetNetworkAreaMembersResult
func GetNetworkAreaMembers(ctx *Context, args *GetNetworkAreaMembersArgs, opts ...InvokeOption) (*GetNetworkAreaMembersResult, error)

Note: This function is named GetNetworkAreaMembers in the Go SDK.

public static class GetNetworkAreaMembers {
    public static Task<GetNetworkAreaMembersResult> InvokeAsync(GetNetworkAreaMembersArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Uuid string

The UUID of the area to list.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

Token string

The ACL token to use. This overrides the token that the agent provides by default.

Uuid string

The UUID of the area to list.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

Token string

The ACL token to use. This overrides the token that the agent provides by default.

uuid string

The UUID of the area to list.

datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

token string

The ACL token to use. This overrides the token that the agent provides by default.

uuid str

The UUID of the area to list.

datacenter str

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

token str

The ACL token to use. This overrides the token that the agent provides by default.

getNetworkAreaMembers Result

The following output properties are available:

Datacenter string

The node’s Consul datacenter.

Id string

The provider-assigned unique ID for this managed resource.

Members List<GetNetworkAreaMembersMember>

The list of Consul servers in this network area

Uuid string

The UUID of the Network Area being queried.

Token string
Datacenter string

The node’s Consul datacenter.

Id string

The provider-assigned unique ID for this managed resource.

Members []GetNetworkAreaMembersMember

The list of Consul servers in this network area

Uuid string

The UUID of the Network Area being queried.

Token string
datacenter string

The node’s Consul datacenter.

id string

The provider-assigned unique ID for this managed resource.

members GetNetworkAreaMembersMember[]

The list of Consul servers in this network area

uuid string

The UUID of the Network Area being queried.

token string
datacenter str

The node’s Consul datacenter.

id str

The provider-assigned unique ID for this managed resource.

members Sequence[GetNetworkAreaMembersMember]

The list of Consul servers in this network area

uuid str

The UUID of the Network Area being queried.

token str

Supporting Types

GetNetworkAreaMembersMember

Address string

The IP address of the server.

Build string

The Consul version running on the node.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

Id string

The node ID of the server.

Name string

The node name of the server, with its datacenter appended.

Port int

The server RPC port the node.

Protocol int

The protocol version being spoken by the node.

Role string

Role is always "server" since only Consul servers can participate in network areas.

Rtt int

An estimated network round trip time from the server answering the query to the given server, in nanoseconds. This is computed using network coordinates.

Status string

The current health status of the node, as determined by the network area distributed failure detector. This will be "alive", "leaving", or "failed". A "failed" status means that other servers are not able to probe this server over its server RPC interface.

Address string

The IP address of the server.

Build string

The Consul version running on the node.

Datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

Id string

The node ID of the server.

Name string

The node name of the server, with its datacenter appended.

Port int

The server RPC port the node.

Protocol int

The protocol version being spoken by the node.

Role string

Role is always "server" since only Consul servers can participate in network areas.

Rtt int

An estimated network round trip time from the server answering the query to the given server, in nanoseconds. This is computed using network coordinates.

Status string

The current health status of the node, as determined by the network area distributed failure detector. This will be "alive", "leaving", or "failed". A "failed" status means that other servers are not able to probe this server over its server RPC interface.

address string

The IP address of the server.

build string

The Consul version running on the node.

datacenter string

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

id string

The node ID of the server.

name string

The node name of the server, with its datacenter appended.

port number

The server RPC port the node.

protocol number

The protocol version being spoken by the node.

role string

Role is always "server" since only Consul servers can participate in network areas.

rtt number

An estimated network round trip time from the server answering the query to the given server, in nanoseconds. This is computed using network coordinates.

status string

The current health status of the node, as determined by the network area distributed failure detector. This will be "alive", "leaving", or "failed". A "failed" status means that other servers are not able to probe this server over its server RPC interface.

address str

The IP address of the server.

build str

The Consul version running on the node.

datacenter str

The datacenter to use. This overrides the agent’s default datacenter and the datacenter in the provider setup.

id str

The node ID of the server.

name str

The node name of the server, with its datacenter appended.

port int

The server RPC port the node.

protocol int

The protocol version being spoken by the node.

role str

Role is always "server" since only Consul servers can participate in network areas.

rtt int

An estimated network round trip time from the server answering the query to the given server, in nanoseconds. This is computed using network coordinates.

status str

The current health status of the node, as determined by the network area distributed failure detector. This will be "alive", "leaving", or "failed". A "failed" status means that other servers are not able to probe this server over its server RPC interface.

Package Details

Repository
https://github.com/pulumi/pulumi-consul
License
Apache-2.0
Notes
This Pulumi package is based on the consul Terraform Provider.