github.com/loicalbertin/terraform@v0.6.15-0.20170626182346-8e2583055467/website/docs/backends/types/gcs.html.md (about)

     1  ---
     2  layout: "backend-types"
     3  page_title: "Backend Type: gcs"
     4  sidebar_current: "docs-backends-types-standard-gcs"
     5  description: |-
     6    Terraform can store the state remotely, making it easier to version and work with in a team.
     7  ---
     8  
     9  # gcs
    10  
    11  **Kind: Standard (with no locking)**
    12  
    13  Stores the state as a given key in a given bucket on [Google Cloud Storage](https://cloud.google.com/storage/).
    14  
    15  ## Example Configuration
    16  
    17  ```hcl
    18  terraform {
    19    backend "gcs" {
    20      bucket  = "tf-state-prod"
    21      path    = "path/terraform.tfstate"
    22      project = "myproject"
    23    }
    24  }
    25  ```
    26  
    27  ## Example Referencing
    28  
    29  ```hcl
    30  data "terraform_remote_state" "foo" {
    31    backend = "gcs"
    32    config {
    33      bucket  = "terraform-state-prod"
    34      path    = "network/terraform.tfstate"
    35      project = "goopro"
    36    }
    37  }
    38  
    39  resource "template_file" "bar" {
    40    template = "${greeting}"
    41  
    42    vars {
    43      greeting = "${data.terraform_remote_state.foo.greeting}"
    44    }
    45  }
    46  ```
    47  
    48  ## Configuration variables
    49  
    50  The following configuration options are supported:
    51  
    52   * `bucket` - (Required) The name of the GCS bucket
    53   * `path` - (Required) The path where to place/look for state file inside the bucket
    54   * `credentials` / `GOOGLE_CREDENTIALS` - (Required) Google Cloud Platform account credentials in json format