github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/consul/r/service.html.markdown (about)

     1  ---
     2  layout: "consul"
     3  page_title: "Consul: consul_service"
     4  sidebar_current: "docs-consul-resource-service"
     5  description: |-
     6    A high-level resource for creating a Service in Consul. Since Consul requires clients to register services with either the catalog or an agent, `consul_service` may register with either the catalog or an agent, depending on the configuration of `consul_service`. For now, `consul_service` always registers services with the agent running at the address defined in the `consul` resource. Health checks are not currently supported.
     7  ---
     8  
     9  # consul_service
    10  
    11  A high-level resource for creating a Service in Consul. Currently,
    12  defining health checks for a service is not supported.
    13  
    14  ## Example Usage
    15  
    16  ```hcl
    17  resource "consul_service" "google" {
    18    address = "www.google.com"
    19    name    = "google"
    20    port    = 80
    21    tags    = ["tag0", "tag1"]
    22  }
    23  ```
    24  
    25  ## Argument Reference
    26  
    27  The following arguments are supported:
    28  
    29  * `service_id` - (Optional, string) The ID of the service, defaults to the value of `name`
    30    if not supplied.
    31  
    32  * `address` - (Optional, string) The address of the service. Defaults to the
    33    address of the agent.
    34  
    35  * `name` - (Required, string) The name of the service.
    36  
    37  * `port` - (Optional, int) The port of the service.
    38  
    39  * `tags` - (Optional, set of strings) A list of values that are opaque to Consul,
    40    but can be used to distinguish between services or nodes.
    41  
    42  
    43  ## Attributes Reference
    44  
    45  The following attributes are exported:
    46  
    47  * `service_id` - The id of the service, defaults to the value of `name`.
    48  * `address` - The address of the service.
    49  * `name` - The name of the service.
    50  * `port` - The port of the service.
    51  * `tags` - The tags of the service.