» consul_agent_config

The consul_agent_config data source returns configuration data from the agent specified in the provider.

» Example Usage

data "consul_agent_config" "remote_agent" {}

output "consul_version" {
  value = "${data.consul_agent_config.remote_agent.version}"
}

» Attributes Reference

The following attributes are exported:

  • datacenter - The datacenter the agent is running in
  • node_id - The ID of the node the agent is running on
  • node_name - The name of the node the agent is running on
  • server - Boolean if the agent is a server or not
  • revision - The first 9 characters of the VCS revision of the build of Consul that is running
  • version - The version of the build of Consul that is running