Skip to content

Commit 373e17d

Browse files
authored
Merge pull request #1274 from hashicorp/update-error-msg
update error message regarding the option force_delete, which can be …
2 parents 40f7c1b + 85e1fe3 commit 373e17d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ FEATURES:
66
BUG FIXES:
77

88
* `r/tfe_registry_module`: Fix registry module always triggering re-creation when an organization is not present, by @hashimoon [1263](https://github.com/hashicorp/terraform-provider-tfe/pull/1263)
9+
* `r/tfe_workspace`: Change the error message returned when a workspace cannot be safe-deleted to reflect that the error can happen when the latest state is still being processed @uturunku1 [1274](https://github.com/hashicorp/terraform-provider-tfe/pull/1274)
10+
911

1012
## v0.52.0
1113

internal/provider/resource_tfe_workspace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ func resourceTFEWorkspaceImporter(ctx context.Context, d *schema.ResourceData, m
10051005
func errWorkspaceSafeDeleteWithPermission(workspaceID string, err error) error {
10061006
if err != nil {
10071007
if strings.HasPrefix(err.Error(), "conflict") {
1008-
return fmt.Errorf("error deleting workspace %s: %w\nTo delete this workspace without destroying the managed resources, add force_delete = true to the resource config", workspaceID, err)
1008+
return fmt.Errorf("error deleting workspace %s: %w\nThis workspace may either have managed resources in state or has a latest state that's still being processed. Add force_delete = true to the resource config to delete this workspace", workspaceID, err)
10091009
}
10101010
return err
10111011
}

0 commit comments

Comments
 (0)