1---
2layout: "language"
3page_title: "Backend Type: etcd"
4sidebar_current: "docs-backends-types-standard-etcdv2"
5description: |-
6  Terraform can store state remotely in etcd 2.x.
7---
8
9# etcd
10
11**Kind: Standard (with no locking)**
12
13Stores the state in [etcd 2.x](https://coreos.com/etcd/docs/latest/v2/README.html) at a given path.
14
15## Example Configuration
16
17```hcl
18terraform {
19  backend "etcd" {
20    path      = "path/to/terraform.tfstate"
21    endpoints = "http://one:4001 http://two:4001"
22  }
23}
24```
25
26## Data Source Configuration
27
28```hcl
29data "terraform_remote_state" "foo" {
30  backend = "etcd"
31  config = {
32    path      = "path/to/terraform.tfstate"
33    endpoints = "http://one:4001 http://two:4001"
34  }
35}
36```
37
38## Configuration variables
39
40The following configuration options are supported:
41
42 * `path` - (Required) The path where to store the state
43 * `endpoints` - (Required) A space-separated list of the etcd endpoints
44 * `username` - (Optional) The username
45 * `password` - (Optional) The password
46