TF-004 Use the core Terraform workflow Practice Question
An organization uses Terraform with a remote backend in Azure. After a network outage, a developer attempts to run `terraform apply` and receives the error: "Error: Failed to get existing workspaces: blob (key) not found". What is the most likely cause?
⚠ Common exam trap
HashiCorp often tests the distinction between authentication/authorization errors and resource-not-found errors; the trap here is that candidates may confuse a missing state file with a misconfigured backend or deleted storage account, but the specific 'blob (key) not found' message points directly to the state file blob being absent.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The state file for the current workspace was deleted or corrupted
The error 'blob (key) not found' indicates that Terraform cannot locate the state file for the current workspace in the Azure storage container. After a network outage, the state file may have been deleted or corrupted, preventing Terraform from reading the existing state. This error is specific to the missing blob key, not to authentication or storage account availability.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The Terraform backend configuration has incorrect access key
Why it's wrong here
An incorrect access key or Shared Access Signature (SAS) token for the Azure storage account would result in an `AuthenticationFailed` or `AuthorizationFailed` error from Azure Storage, indicating permission denial to access the storage account or container. Terraform would explicitly report a credentials issue, not that a specific blob (the state file) within an accessible container is missing. The "blob not found" error implies successful authentication but an inability to locate the requested object.
- ✗
The Azure storage account was deleted
Why it's wrong here
If the entire Azure storage account used for the remote backend were deleted, Terraform would typically encounter an error indicating that the storage account itself does not exist or is unreachable. This would manifest as a `StorageAccountNotFound` error or a connection failure, rather than successfully connecting to a storage account and then failing to find a specific blob within it. The "blob not found" error suggests the storage account and container are accessible, but the state file blob is absent.
- ✓
The state file for the current workspace was deleted or corrupted
Why this is correct
When Terraform reports a "blob not found" error in an Azure backend, it specifically means that the expected state file object, identified by its unique blob path (which includes the workspace name), does not exist within the configured storage container. This directly indicates that the state file for the currently selected Terraform workspace has either been inadvertently deleted from the Azure Blob Storage or has become corrupted in a way that makes it unretrievable by its expected key. Terraform successfully connected to the storage account and container but failed to locate the specific state object.
- ✗
The workspace was not created via `terraform workspace new`
Why it's wrong here
If a workspace was not formally created using `terraform workspace new`, Terraform would typically default to the `default` workspace or prompt the user to select an existing one. If an attempt was made to select a non-existent workspace, Terraform would report that the workspace does not exist locally or remotely, rather than a "blob not found" error for a specific state file. The "blob not found" error implies Terraform *is* looking for a state file associated with a specific workspace, but that file is absent.
Go deeper
Related to this question
About these practice questions
This TF-004 question is part of Courseiva's 428-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This TF-004 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the TF-004 exam.