W3cubDocs

/Terraform

local

Kind: Enhanced

The local backend stores state on the local filesystem, locks that state using system APIs, and performs operations locally.

Example Configuration

terraform {
  backend "local" {
    path = "relative/path/to/terraform.tfstate"
  }
}

Example Reference

data "terraform_remote_state" "foo" {
  backend = "local"

  config {
    path = "${path.module}/../../terraform.tfstate"
  }
}

Configuration variables

The following configuration options are supported:

  • path - (Optional) The path to the tfstate file. This defaults to "terraform.tfstate" relative to the root module by default.

© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/backends/types/local.html