The consul_agent_config
data source returns
configuration data
from the agent specified in the provider
.
data "consul_agent_config" "remote_agent" {}
output "consul_version" {
value = "${data.consul_agent_config.remote_agent.version}"
}
The following attributes are exported:
datacenter
- The datacenter the agent is running innode_id
- The ID of the node the agent is running onnode_name
- The name of the node the agent is running onserver
- Boolean if the agent is a server or notrevision
- The first 9 characters of the VCS revision of the build of Consul that is runningversion
- The version of the build of Consul that is running