-
Notifications
You must be signed in to change notification settings - Fork 176
Open
Labels
Description
Terraform Enterprise version
Terraform version
v1.14.3
Terraform Configuration Files
resource "tfe_workspace" "this" {
name = "..."
organization = data.tfe_organization.this.name
project_id = data.tfe_project.this.id
terraform_version = ">= 1.12, < 2.0"
}
resource "tfe_workspace_run" "this" {
workspace_id = tfe_workspace.this.id
destroy {
manual_confirm = false
retry = true
retry_attempts = 3
retry_backoff_min = 10
retry_backoff_max = 30
wait_for_run = true
}
}
Debug Output
│ Error: error creating run for workspace ws-7xTk3aNBB......: unprocessable entity
│
│ Configuration version is missing
Expected Behavior
The destroy workspace run should execute successfully and must not fail even when the workspace contains no resources.
Use case:
- We create a workspace along with a tfe_workspace_run and several other resources.
- Terraform code that uses this workspace is applied from a separate CI/CD pipeline.
- In some edge cases (unhappy paths), the apply step in (2) fails, leaving the workspace empty (no Terraform resources in the state).
- As part of the workspace lifecycle, we then remove the workspace created in (1). This triggers a destroy run, as expected. However, the destroy run fails with the error
Configuration version is missing.
While this behavior is technically expected when no resources exist, there should be an option to suppress this error and allow the destroy run to succeed.
Actual Behavior
destroy run of tfe_workspace_run fails with Configuration version is missing.
Additional Context
Reactions are currently unavailable