A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.hashicorp.com/terraform/language/backend/local below:

Backend Type: local | Terraform

Kind: Enhanced

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

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

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

The following configuration options are supported:

This section describes legacy features that we've preserved for backward compatibility but that we no longer recommend. See below for more details.

For configurations that include a backend "local" block or that default to the local backend by not specifying a backend at all, most commands that either read or write state snapshots from the backend accept the following additional arguments:

These three options are preserved for backward-compatibility with earlier workflows that predated the introduction of built-in remote state, where users would write wrapper scripts that fetch prior state before running Terraform and then save the new state after Terraform exits, in which case the three arguments would typically all be paths within a temporary directory used just for one operation.

Because these old workflows predate the introduction of the possibility of multiple workspaces, setting them overrides Terraform's usual behavior of selecting a different state filename based on the selected workspace. If you use all three of these options then the selected workspace has no effect on which filenames Terraform will select for state files, and so you'll need to select different filenames yourself if you wish to keep workspace state files distinct from one another.

These three options have no effect for configurations that have a different backend type selected.

We do not recommend using these options in new systems, even if you are running Terraform in automation. Instead, select a different backend which supports remote state and configure it within your root module, which ensures that everyone working on your configuration will automatically retrieve and store state in the correct shared location without any special command line options.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4