Example backend configuration for HCP Terraform remote state and runs.

Section: Remote State Patterns

Remote backend snippet

hcl
hcl
terraform {
  backend "remote" {
    organization = "acme"
    workspaces {
      name = "networking-prod"
    }
  }
}
Explanation

Example backend configuration for HCP Terraform remote state and runs.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Remote State Patterns
Ignore files for remote runs
Exclude paths from uploaded configuration when using remote CLI-driven runs.
OpenIn sheetgitignoresame section
Plan with alternate state path
Use a non-default local state path for commands that support it.
OpenIn sheetbashsame section
Migrate state during init
Move state to a newly configured backend during re-init.
OpenIn sheetbash2 tag match
Force-copy backend state
Automatically copy existing state to a new backend without prompting.
OpenIn sheetbash2 tag match
List workspaces
Show available Terraform CLI workspaces for the current configuration.
OpenIn sheetbash1 tag match
Import existing object
Associate an existing infrastructure object with a resource address in state.
OpenIn sheetbash1 tag match