github.com/eliastor/durgaform@v0.0.0-20220816172711-d0ab2d17673e/website/docs/language/settings/backends/etcdv3.mdx (about)

     1  ---
     2  page_title: 'Backend Type: etcdv3'
     3  description: Terraform can store state remotely in etcd 3.x.
     4  ---
     5  
     6  # etcdv3 (deprecated)
     7  
     8  -> **Note:** The `etcdv3` backend is deprecated and will be removed in a future Terraform release.
     9  
    10  Stores the state in the [etcd](https://etcd.io/) KV store with a given prefix.
    11  
    12  This backend supports [state locking](/language/state/locking).
    13  
    14  ## Example Configuration
    15  
    16  ```hcl
    17  terraform {
    18    backend "etcdv3" {
    19      endpoints = ["etcd-1:2379", "etcd-2:2379", "etcd-3:2379"]
    20      lock      = true
    21      prefix    = "terraform-state/"
    22    }
    23  }
    24  ```
    25  
    26  Note that for the access credentials we recommend using a
    27  [partial configuration](/language/settings/backends/configuration#partial-configuration).
    28  
    29  ## Data Source Configuration
    30  
    31  ```hcl
    32  data "terraform_remote_state" "foo" {
    33    backend = "etcdv3"
    34    config = {
    35      endpoints = ["etcd-1:2379", "etcd-2:2379", "etcd-3:2379"]
    36      lock      = true
    37      prefix    = "terraform-state/"
    38    }
    39  }
    40  ```
    41  
    42  ## Configuration Variables
    43  
    44  !> **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 state and plan files. Refer to [Credentials and Sensitive Data](/language/settings/backends/configuration#credentials-and-sensitive-data) for details.
    45  
    46  The following configuration options / environment variables are supported:
    47  
    48  - `endpoints` - (Required) The list of 'etcd' endpoints which to connect to.
    49  - `username` / `ETCDV3_USERNAME` - (Optional) Username used to connect to the etcd cluster.
    50  - `password` / `ETCDV3_PASSWORD` - (Optional) Password used to connect to the etcd  cluster.
    51  - `prefix` - (Optional) An optional prefix to be added to keys when to storing state in etcd. Defaults to `""`.
    52  - `lock` - (Optional) Whether to lock state access. Defaults to `true`.
    53  - `cacert_path` - (Optional) The path to a PEM-encoded CA bundle with which to verify certificates of TLS-enabled etcd servers.
    54  - `cert_path` - (Optional) The path to a PEM-encoded certificate to provide to etcd for secure client identification.
    55  - `key_path` - (Optional) The path to a PEM-encoded key to provide to etcd for secure client identification.
    56  - `max_request_bytes` - (Optional) The max request size to send to etcd. This can be increased to enable storage of larger state. You must set the corresponding server-side flag [--max-request-bytes](https://etcd.io/docs/current/dev-guide/limit/#request-size-limit) as well and the value should be less than the client setting. Defaults to `2097152` (2.0 MiB). **Please Note:** Increasing etcd's request size limit may negatively impact overall latency.