Skip to content

Commit

Permalink
Merge pull request #1274 from hashicorp/update-error-msg
Browse files Browse the repository at this point in the history
update error message regarding the option force_delete, which can be …
  • Loading branch information
uturunku1 committed Mar 8, 2024
2 parents 40f7c1b + 85e1fe3 commit 373e17d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ FEATURES:
BUG FIXES:

* `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)
* `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)


## v0.52.0

Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource_tfe_workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ func resourceTFEWorkspaceImporter(ctx context.Context, d *schema.ResourceData, m
func errWorkspaceSafeDeleteWithPermission(workspaceID string, err error) error {
if err != nil {
if strings.HasPrefix(err.Error(), "conflict") {
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)
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)
}
return err
}
Expand Down

0 comments on commit 373e17d

Please sign in to comment.