Backend Local

Here’s an example with the local backend.


terraform {
  backend "local" {
    path = "terraform.tfstate"

The local statefile is stored at:

ls .terraspace-cache/dev/stacks/demo/terraform.tfstate

Note: When using a local backend, the config/terraform/ file is entirely optional. Terraform defaults to a local backend with the path = "terraform.tfstate". The is provided as an example and shows you how to change the path.

Prefix Path

If you’re wondering how the prefix path .terraspace-cache/dev/stacks/demo was determined. It’s controlled by


Terraspace.configure do |config| = ":CACHE_ROOT/:REGION/:ENV/:BUILD_DIR"

For defaults, see: config/reference

More tools: