HashiCorp Consul

Pulumi Official
Package maintained by Pulumi
v3.6.0 published on Tuesday, Apr 12, 2022 by Pulumi

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 = Consul.GetNetworkAreaMembers.Invoke(new Consul.GetNetworkAreaMembersInvokeArgs
        {
            Uuid = dc2NetworkArea.Id,
        });
        this.Members = dc2NetworkAreaMembers.Apply(dc2NetworkAreaMembers => dc2NetworkAreaMembers.Members);
    }

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

Coming soon!

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 = consul.get_network_area_members_output(uuid=dc2_network_area.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 = consul.getNetworkAreaMembersOutput({
    uuid: dc2NetworkArea.id,
});
export const members = dc2NetworkAreaMembers.apply(dc2NetworkAreaMembers => dc2NetworkAreaMembers.members);

Coming soon!

Using getNetworkAreaMembers

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

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

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

public static class GetNetworkAreaMembers 
{
    public static Task<GetNetworkAreaMembersResult> InvokeAsync(GetNetworkAreaMembersArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkAreaMembersResult> Invoke(GetNetworkAreaMembersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkAreaMembersResult> getNetworkAreaMembers(GetNetworkAreaMembersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: consul:index/getNetworkAreaMembers:getNetworkAreaMembers
  Arguments:
    # Arguments dictionary

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 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.

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.

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 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 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
datacenter String

The node's Consul datacenter.

id String

The provider-assigned unique ID for this managed resource.

members List<Property Map>

The list of Consul servers in this network area

uuid String

The UUID of the Network Area being queried.

token String

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 Integer

The server RPC port the node.

protocol Integer

The protocol version being spoken by the node.

role String

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

rtt Integer

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.

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.

Package Details

Repository
https://github.com/pulumi/pulumi-consul
License
Apache-2.0
Notes

This Pulumi package is based on the consul Terraform Provider.