GetNodes
The consul..getNodes data source returns a list of Consul nodes that have
been registered with the Consul cluster in a given datacenter. By specifying a
different datacenter in the query_options it is possible to retrieve a list of
nodes from a different WAN-attached Consul datacenter.
Using GetNodes
function getNodes(args: GetNodesArgs, opts?: InvokeOptions): Promise<GetNodesResult>function get_nodes(query_options=None, opts=None)func GetNodes(ctx *Context, args *GetNodesArgs, opts ...InvokeOption) (*GetNodesResult, error)public static class GetNodes {
public static Task<GetNodesResult> InvokeAsync(GetNodesArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Query
Options List<GetNodes Query Option Args> See below.
- Query
Options []GetNodes Query Option See below.
- query
Options GetNodes Query Option[] See below.
- query_
options List[GetNodes Query Option] See below.
GetNodes Result
The following output properties are available:
- Datacenter string
The datacenter the keys are being read from to.
- Id string
The provider-assigned unique ID for this managed resource.
- Node
Ids List<string> A list of the Consul node IDs.
- Node
Names List<string> A list of the Consul node names.
- Nodes
List<Get
Nodes Node> A list of nodes and details about each Consul agent. The list of per-node attributes is detailed below.
- Query
Options List<GetNodes Query Option>
- Datacenter string
The datacenter the keys are being read from to.
- Id string
The provider-assigned unique ID for this managed resource.
- Node
Ids []string A list of the Consul node IDs.
- Node
Names []string A list of the Consul node names.
- Nodes
[]Get
Nodes Node A list of nodes and details about each Consul agent. The list of per-node attributes is detailed below.
- Query
Options []GetNodes Query Option
- datacenter string
The datacenter the keys are being read from to.
- id string
The provider-assigned unique ID for this managed resource.
- node
Ids string[] A list of the Consul node IDs.
- node
Names string[] A list of the Consul node names.
- nodes
Get
Nodes Node[] A list of nodes and details about each Consul agent. The list of per-node attributes is detailed below.
- query
Options GetNodes Query Option[]
- datacenter str
The datacenter the keys are being read from to.
- id str
The provider-assigned unique ID for this managed resource.
- node_
ids List[str] A list of the Consul node IDs.
- node_
names List[str] A list of the Consul node names.
- nodes
List[Get
Nodes Node] A list of nodes and details about each Consul agent. The list of per-node attributes is detailed below.
- query_
options List[GetNodes Query Option]
Supporting Types
GetNodesNode
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
- Id string
The Node ID of the Consul agent. *
meta- Node meta data tag information, if any. *name- The name of the Consul node. *address- The IP address the node is advertising to the Consul cluster. *tagged_addresses- List of explicit LAN and WAN IP addresses for the agent.- Meta Dictionary<string, string>
- Name string
- Tagged
Addresses Dictionary<string, string>
- Address string
- Id string
The Node ID of the Consul agent. *
meta- Node meta data tag information, if any. *name- The name of the Consul node. *address- The IP address the node is advertising to the Consul cluster. *tagged_addresses- List of explicit LAN and WAN IP addresses for the agent.- Meta map[string]string
- Name string
- Tagged
Addresses map[string]string
- address string
- id string
The Node ID of the Consul agent. *
meta- Node meta data tag information, if any. *name- The name of the Consul node. *address- The IP address the node is advertising to the Consul cluster. *tagged_addresses- List of explicit LAN and WAN IP addresses for the agent.- meta {[key: string]: string}
- name string
- tagged
Addresses {[key: string]: string}
- address str
- id str
The Node ID of the Consul agent. *
meta- Node meta data tag information, if any. *name- The name of the Consul node. *address- The IP address the node is advertising to the Consul cluster. *tagged_addresses- List of explicit LAN and WAN IP addresses for the agent.- meta Dict[str, str]
- name str
- tagged
Addresses Dict[str, str]
GetNodesQueryOption
- Allow
Stale bool When
true, the default, allow responses from Consul servers that are followers.- Datacenter string
The Consul datacenter to query. Defaults to the same value found in
query_optionsparameter specified below, or if that is empty, thedatacentervalue found in the Consul agent that this provider is configured to talk to then the datacenter in the provider setup.- Near string
- Node
Meta Dictionary<string, string> - Require
Consistent bool When
trueforce the client to perform a read on at least quorum servers and verify the result is the same. Defaults tofalse.- Token string
Specify the Consul ACL token to use when performing the request. This defaults to the same API token configured by the
consulprovider but may be overriden if necessary.- Wait
Index int Index number used to enable blocking quereis.
- Wait
Time string Max time the client should wait for a blocking query to return.
- Allow
Stale bool When
true, the default, allow responses from Consul servers that are followers.- Datacenter string
The Consul datacenter to query. Defaults to the same value found in
query_optionsparameter specified below, or if that is empty, thedatacentervalue found in the Consul agent that this provider is configured to talk to then the datacenter in the provider setup.- Near string
- Node
Meta map[string]string - Require
Consistent bool When
trueforce the client to perform a read on at least quorum servers and verify the result is the same. Defaults tofalse.- Token string
Specify the Consul ACL token to use when performing the request. This defaults to the same API token configured by the
consulprovider but may be overriden if necessary.- Wait
Index int Index number used to enable blocking quereis.
- Wait
Time string Max time the client should wait for a blocking query to return.
- allow
Stale boolean When
true, the default, allow responses from Consul servers that are followers.- datacenter string
The Consul datacenter to query. Defaults to the same value found in
query_optionsparameter specified below, or if that is empty, thedatacentervalue found in the Consul agent that this provider is configured to talk to then the datacenter in the provider setup.- near string
- node
Meta {[key: string]: string} - require
Consistent boolean When
trueforce the client to perform a read on at least quorum servers and verify the result is the same. Defaults tofalse.- token string
Specify the Consul ACL token to use when performing the request. This defaults to the same API token configured by the
consulprovider but may be overriden if necessary.- wait
Index number Index number used to enable blocking quereis.
- wait
Time string Max time the client should wait for a blocking query to return.
- allow
Stale bool When
true, the default, allow responses from Consul servers that are followers.- datacenter str
The Consul datacenter to query. Defaults to the same value found in
query_optionsparameter specified below, or if that is empty, thedatacentervalue found in the Consul agent that this provider is configured to talk to then the datacenter in the provider setup.- near str
- node_
meta Dict[str, str] - require
Consistent bool When
trueforce the client to perform a read on at least quorum servers and verify the result is the same. Defaults tofalse.- token str
Specify the Consul ACL token to use when performing the request. This defaults to the same API token configured by the
consulprovider but may be overriden if necessary.- wait
Index float Index number used to enable blocking quereis.
- wait
Time str Max time the client should wait for a blocking query to return.
Package Details
- Repository
- https://github.com/pulumi/pulumi-consul
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
consulTerraform Provider.