github.com/bengesoff/terraform@v0.3.1-0.20141018223233-b25a53629922/website/source/docs/providers/consul/index.html.markdown (about) 1 --- 2 layout: "consul" 3 page_title: "Provider: Consul" 4 sidebar_current: "docs-consul-index" 5 --- 6 7 # Consul Provider 8 9 [Consul](http://www.consul.io) is a tool for service discovery, configuration 10 and orchestration. The Consul provider exposes resources used to interact with a 11 Consul cluster. Configuration of the provider is optional, as it provides 12 defaults for all arguments. 13 14 Use the navigation to the left to read about the available resources. 15 16 ## Example Usage 17 18 ``` 19 # Configure the Consul provider 20 provider "consul" { 21 address = "demo.consul.io:80" 22 datacenter = "nyc1" 23 } 24 25 # Access a key in Consul 26 resource "consul_keys" "app" { 27 key { 28 name = "ami" 29 path = "service/app/launch_ami" 30 default = "ami-1234" 31 } 32 } 33 34 # Use our variable from Consul 35 resource "aws_instance" "app" { 36 ami = "${consul_keys.app.var.ami}" 37 } 38 ``` 39 40 ## Argument Reference 41 42 The following arguments are supported: 43 44 * `address` - (Optional) The HTTP API address of the agent to use. Defaults to "127.0.0.1:8500". 45 * `datacenter` - (Optional) The datacenter to use. Defaults to that of the agent. 46