github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/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, defining health checks for a service is not supported. 12 13 ## Example Usage 14 15 ``` 16 resource "consul_service" "google" { 17 address = "www.google.com" 18 name = "google" 19 port = 80 20 tags = ["tag0", "tag1"] 21 } 22 ``` 23 24 ## Argument Reference 25 26 The following arguments are supported: 27 28 * `service_id` - (Optional, string) The id of the service, defaults to the value of `name` if not supplied. 29 30 * `address` - (Optional, string) The address of the service. Defaults to the 31 address of the agent. 32 33 * `name` - (Required, string) The name of the service. 34 35 * `port` - (Optional, int) The port of the service. 36 37 * `tags` - (Optional, set of strings) A list of values that are opaque to Consul, 38 but can be used to distinguish between services or nodes. 39 40 41 ## Attributes Reference 42 43 The following attributes are exported: 44 45 * `service_id` - The id of the service, defaults to the value of `name`. 46 * `address` - The address of the service. 47 * `name` - The name of the service. 48 * `port` - The port of the service. 49 * `tags` - The tags of the service.