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>function get_network_area_members(datacenter=None, token=None, uuid=None, opts=None)func GetNetworkAreaMembers(ctx *Context, args *GetNetworkAreaMembersArgs, opts ...InvokeOption) (*GetNetworkAreaMembersResult, error)public static class GetNetworkAreaMembers {
public static Task<GetNetworkAreaMembersResult> InvokeAsync(GetNetworkAreaMembersArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
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<Get
Network Area Members Member> 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
[]Get
Network Area Members Member 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
Get
Network Area Members Member[] 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
List[Get
Network Area Members Member] The list of Consul servers in this network area
- uuid str
The UUID of the Network Area being queried.
- token str
Supporting Types
GetNetworkAreaMembersMember
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- 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 float
The server RPC port the node.
- protocol float
The protocol version being spoken by the node.
- role str
Role is always
"server"since only Consul servers can participate in network areas.- rtt float
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
consulTerraform Provider.