nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-003 · Question #115

One remote backend configuration always maps to a single remote workspace.

The correct answer is A. True. The remote backend can work with either a single remote Terraform Cloud workspace, or with multiple similarly-named remote workspaces (like networking-dev and networking-prod). The workspaces block of the backend configuration determines which mode it uses. To use a single…

Implement and maintain state

Question

One remote backend configuration always maps to a single remote workspace.

Options

  • ATrue
  • BFalse

How the community answered

(26 responses)
  • A
    73% (19)
  • B
    27% (7)

Explanation

The remote backend can work with either a single remote Terraform Cloud workspace, or with multiple similarly-named remote workspaces (like networking-dev and networking-prod). The workspaces block of the backend configuration determines which mode it uses. To use a single remote Terraform Cloud workspace, set workspaces.name to the remote workspace's full name (like networking-prod). To use multiple remote workspaces, set workspaces.prefix to a prefix used in all of the desired remote workspace names. For example, set prefix = "networking-" to use Terraform cloud workspaces with names like networking-dev and networking-prod. This is helpful when mapping multiple Terraform CLI workspaces used in a single Terraform configuration to multiple Terraform Cloud workspaces. However, one remote backend configuration always maps to a single remote workspace, either by name or by prefix. You cannot use both name and prefix in the same backend configuration, or omit both. Doing so will result in a configuration error.

Topics

#remote backend#Terraform Cloud#workspaces#state backend

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-003 Practice