• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Terraform
  • Install
  • Tutorials
    • About the Docs
    • Configuration Language
    • Terraform CLI
    • Terraform Cloud
    • Terraform Enterprise
    • CDK for Terraform
    • Provider Use
    • Plugin Development
    • Registry Publishing
    • Integration Program
  • Registry(opens in new tab)
  • Try Cloud(opens in new tab)
  • Sign up
Terraform Home

Configuration Language

Skip to main content
  • Configuration Language
  • Terraform Language

  • Overview
  • Data Sources
    • Overview
    • Terraform Cloud
      • Backend Configuration
        • local
        • remote
        • artifactory
        • azurerm
        • consul
        • cos
        • etcd
        • etcdv3
        • gcs
        • http
        • Kubernetes
        • manta
        • oss
        • pg
        • s3
        • swift
  • Upgrading to Terraform v1.2
  • v1.x Compatibility Promises

  • Terraform Internals

  • Resources

  • Tutorial Library
  • Certifications
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  • Terraform Registry
    (opens in new tab)

You are viewing documentation for version v1.2.x. View latest version.

  1. Developer
  2. Terraform
  3. Configuration Language v1.2.x
  4. Terraform Settings
  5. Backends
  6. etcd
  • Terraform
  • v1.3.x (latest)
  • v1.1 and earlier

»etcd (deprecated)

Note: The etcd backend is deprecated and will be removed in a future Terraform release.

Stores the state in etcd 2.x at a given path.

This backend does not support state locking.

Example Configuration

terraform {
  backend "etcd" {
    path      = "path/to/terraform.tfstate"
    endpoints = "http://one:4001 http://two:4001"
  }
}

Data Source Configuration

data "terraform_remote_state" "foo" {
  backend = "etcd"
  config = {
    path      = "path/to/terraform.tfstate"
    endpoints = "http://one:4001 http://two:4001"
  }
}

Configuration Variables

Warning: We recommend using environment variables to supply credentials and other sensitive data. If you use -backend-config or hardcode these values directly in your configuration, Terraform will include these values in both the .terraform subdirectory and in plan files. Refer to Credentials and Sensitive Data for details.

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

On this page

  1. etcd (deprecated)
  2. Example Configuration
  3. Data Source Configuration
  4. Configuration Variables
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)