github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/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  description: |-
     6    Consul is a tool for service discovery, configuration and orchestration. The Consul provider exposes resources used to interact with a Consul cluster. Configuration of the provider is optional, as it provides defaults for all arguments.
     7  ---
     8  
     9  # Consul Provider
    10  
    11  [Consul](https://www.consul.io) is a tool for service discovery, configuration
    12  and orchestration. The Consul provider exposes resources used to interact with a
    13  Consul cluster. Configuration of the provider is optional, as it provides
    14  defaults for all arguments.
    15  
    16  Use the navigation to the left to read about the available resources.
    17  
    18  ## Example Usage
    19  
    20  ```hcl
    21  # Configure the Consul provider
    22  provider "consul" {
    23    address    = "demo.consul.io:80"
    24    datacenter = "nyc1"
    25  }
    26  
    27  # Access a key in Consul
    28  resource "consul_keys" "app" {
    29    key {
    30      name    = "ami"
    31      path    = "service/app/launch_ami"
    32      default = "ami-1234"
    33    }
    34  }
    35  
    36  # Use our variable from Consul
    37  resource "aws_instance" "app" {
    38    ami = "${consul_keys.app.var.ami}"
    39  }
    40  ```
    41  
    42  ## Argument Reference
    43  
    44  The following arguments are supported:
    45  
    46  * `address` - (Optional) The HTTP(S) API address of the agent to use. Defaults to "127.0.0.1:8500".
    47  * `scheme` - (Optional) The URL scheme of the agent to use ("http" or "https"). Defaults to "http".
    48  * `http_auth` - (Optional) HTTP Basic Authentication credentials to be used when communicating with Consul, in the format of either `user` or `user:pass`. This may also be specified using the `CONSUL_HTTP_AUTH` environment variable.
    49  * `datacenter` - (Optional) The datacenter to use. Defaults to that of the agent.
    50  * `token` - (Optional) The ACL token to use by default when making requests to the agent.
    51  * `ca_file` - (Optional) A path to a PEM-encoded certificate authority used to verify the remote agent's certificate.
    52  * `cert_file` - (Optional) A path to a PEM-encoded certificate provided to the remote agent; requires use of `key_file`.
    53  * `key_file`- (Optional) A path to a PEM-encoded private key, required if `cert_file` is specified.