» 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.
  • workspace_dir - (Optional) The path to non-default workspaces.