terraform/website/docs/language/settings/backends/etcd.html.md

46 lines
1000 B
Markdown
Raw Normal View History

2017-02-15 19:47:30 +01:00
---
layout: "language"
2017-02-15 21:19:38 +01:00
page_title: "Backend Type: etcd"
sidebar_current: "docs-backends-types-standard-etcdv2"
2017-02-15 19:47:30 +01:00
description: |-
2017-09-09 00:40:05 +02:00
Terraform can store state remotely in etcd 2.x.
2017-02-15 19:47:30 +01:00
---
# etcd
2017-02-15 21:19:38 +01:00
**Kind: Standard (with no locking)**
Stores the state in [etcd 2.x](https://coreos.com/etcd/docs/latest/v2/README.html) at a given path.
2017-02-15 19:47:30 +01:00
2017-02-15 21:19:38 +01:00
## Example Configuration
2017-02-15 19:47:30 +01:00
```hcl
2017-02-15 21:19:38 +01:00
terraform {
backend "etcd" {
path = "path/to/terraform.tfstate"
2017-02-15 21:19:38 +01:00
endpoints = "http://one:4001 http://two:4001"
}
}
2017-02-15 19:47:30 +01:00
```
## Data Source Configuration
2017-02-15 19:47:30 +01:00
```hcl
2017-02-15 19:47:30 +01:00
data "terraform_remote_state" "foo" {
backend = "etcd"
config = {
path = "path/to/terraform.tfstate"
endpoints = "http://one:4001 http://two:4001"
}
2017-02-15 19:47:30 +01:00
}
```
## Configuration variables
The following configuration options are supported:
* `path` - (Required) The path where to store the state
* `endpoints` - (Required) A space-separated list of the etcd endpoints
* `username` - (Optional) The username
* `password` - (Optional) The password