Map multiple CLI workspaces to remote workspaces with a shared prefix.
Section: Remote Run Patterns
Remote backend with prefix
hcl
hcl
terraform {
backend "remote" {
organization = "acme"
workspaces {
prefix = "networking-"
}
}
}Explanation
Map multiple CLI workspaces to remote workspaces with a shared prefix.
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 Run Patterns
Custom TF_DATA_DIR in CI
Isolate Terraform local data in ephemeral build environments.
Alternate CLI config file
Use a project-specific CLI configuration in CI or containers.
Log in to Terraform Cloud/HCP
Open a browser flow to save an API token in the CLI credentials file.
Save plan as pipeline artifact
Persist both binary and JSON plan outputs for later review or policy checks.
Log out from Terraform Cloud/HCP
Remove saved credentials for the current host.