github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/website/docs/language/settings/backends/http.html.md (about)

     1  ---
     2  layout: "language"
     3  page_title: "Backend Type: http"
     4  sidebar_current: "docs-backends-types-standard-http"
     5  description: |-
     6    Terraform can store state remotely at any valid HTTP endpoint.
     7  ---
     8  
     9  # http
    10  
    11  **Kind: Standard (with optional locking)**
    12  
    13  Stores the state using a simple [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) client.
    14  
    15  State will be fetched via GET, updated via POST, and purged with DELETE. The method used for updating is configurable.
    16  
    17  When locking support is enabled it will use LOCK and UNLOCK requests providing the lock info in the body. The endpoint should
    18  return a 423: Locked or 409: Conflict with the holding lock info when it's already taken, 200: OK for success. Any other status
    19  will be considered an error. The ID of the holding lock info will be added as a query parameter to state updates requests.
    20  
    21  ## Example Usage
    22  
    23  ```hcl
    24  terraform {
    25    backend "http" {
    26      address = "http://myrest.api.com/foo"
    27      lock_address = "http://myrest.api.com/foo"
    28      unlock_address = "http://myrest.api.com/foo"
    29    }
    30  }
    31  ```
    32  
    33  ## Data Source Configuration
    34  
    35  ```hcl
    36  data "terraform_remote_state" "foo" {
    37    backend = "http"
    38    config = {
    39      address = "http://my.rest.api.com"
    40    }
    41  }
    42  ```
    43  
    44  ## Configuration variables
    45  
    46  The following configuration options / environment variables are supported:
    47  
    48   * `address` / `TF_HTTP_ADDRESS` - (Required) The address of the REST endpoint
    49   * `update_method` / `TF_HTTP_UPDATE_METHOD` - (Optional) HTTP method to use
    50     when updating state. Defaults to `POST`.
    51   * `lock_address` / `TF_HTTP_LOCK_ADDRESS` - (Optional) The address of the lock
    52     REST endpoint. Defaults to disabled.
    53   * `lock_method` / `TF_HTTP_LOCK_METHOD` - (Optional) The HTTP method to use
    54     when locking. Defaults to `LOCK`.
    55   * `unlock_address` / `TF_HTTP_UNLOCK_ADDRESS` - (Optional) The address of the
    56     unlock REST endpoint. Defaults to disabled.
    57   * `unlock_method` / `TF_HTTP_UNLOCK_METHOD` - (Optional) The HTTP method to use
    58     when unlocking. Defaults to `UNLOCK`.
    59   * `username` / `TF_HTTP_USERNAME` - (Optional) The username for HTTP basic
    60     authentication
    61   * `password` / `TF_HTTP_PASSWORD` - (Optional) The password for HTTP basic
    62     authentication
    63   * `skip_cert_verification` - (Optional) Whether to skip TLS verification.
    64     Defaults to `false`.
    65   * `retry_max` / `TF_HTTP_RETRY_MAX` – (Optional) The number of HTTP request
    66     retries. Defaults to `2`.
    67   * `retry_wait_min` / `TF_HTTP_RETRY_WAIT_MIN` – (Optional) The minimum time in
    68     seconds to wait between HTTP request attempts. Defaults to `1`.
    69   * `retry_wait_max` / `TF_HTTP_RETRY_WAIT_MAX` – (Optional) The maximum time in
    70     seconds to wait between HTTP request attempts. Defaults to `30`.