diff --git a/cli/testdata/coder_server_--help.golden b/cli/testdata/coder_server_--help.golden
index 37e1b27e19..0c3af0a948 100644
--- a/cli/testdata/coder_server_--help.golden
+++ b/cli/testdata/coder_server_--help.golden
@@ -15,9 +15,11 @@ SUBCOMMANDS:
OPTIONS:
--allow-workspace-renames bool, $CODER_ALLOW_WORKSPACE_RENAMES (default: false)
- DEPRECATED: Allow users to rename their workspaces. Use only for
- temporary compatibility reasons, this will be removed in a future
- release.
+ Allow users to rename their workspaces. WARNING: Renaming a workspace
+ can cause Terraform resources that depend on the workspace name to be
+ destroyed and recreated, potentially causing data loss. Only enable
+ this if your templates do not use workspace names in resource
+ identifiers, or if you understand the risks.
--cache-dir string, $CODER_CACHE_DIRECTORY (default: [cache dir])
The directory to cache temporary files. If unspecified and
diff --git a/cli/testdata/server-config.yaml.golden b/cli/testdata/server-config.yaml.golden
index 07ec24d933..e497206d09 100644
--- a/cli/testdata/server-config.yaml.golden
+++ b/cli/testdata/server-config.yaml.golden
@@ -575,8 +575,10 @@ userQuietHoursSchedule:
# change their quiet hours schedule and the site default is always used.
# (default: true, type: bool)
allowCustomQuietHours: true
-# DEPRECATED: Allow users to rename their workspaces. Use only for temporary
-# compatibility reasons, this will be removed in a future release.
+# Allow users to rename their workspaces. WARNING: Renaming a workspace can cause
+# Terraform resources that depend on the workspace name to be destroyed and
+# recreated, potentially causing data loss. Only enable this if your templates do
+# not use workspace names in resource identifiers, or if you understand the risks.
# (default: false, type: bool)
allowWorkspaceRenames: false
# Configure how emails are sent.
diff --git a/codersdk/deployment.go b/codersdk/deployment.go
index 0f30be0194..cebddc7b4a 100644
--- a/codersdk/deployment.go
+++ b/codersdk/deployment.go
@@ -3095,13 +3095,16 @@ Write out the current server config as YAML to stdout.`,
YAML: "webTerminalRenderer",
},
{
- Name: "Allow Workspace Renames",
- Description: "DEPRECATED: Allow users to rename their workspaces. Use only for temporary compatibility reasons, this will be removed in a future release.",
- Flag: "allow-workspace-renames",
- Env: "CODER_ALLOW_WORKSPACE_RENAMES",
- Default: "false",
- Value: &c.AllowWorkspaceRenames,
- YAML: "allowWorkspaceRenames",
+ Name: "Allow Workspace Renames",
+ Description: "Allow users to rename their workspaces. " +
+ "WARNING: Renaming a workspace can cause Terraform resources that depend on the " +
+ "workspace name to be destroyed and recreated, potentially causing data loss. " +
+ "Only enable this if your templates do not use workspace names in resource identifiers, or if you understand the risks.",
+ Flag: "allow-workspace-renames",
+ Env: "CODER_ALLOW_WORKSPACE_RENAMES",
+ Default: "false",
+ Value: &c.AllowWorkspaceRenames,
+ YAML: "allowWorkspaceRenames",
},
// Healthcheck Options
{
diff --git a/docs/admin/templates/extending-templates/resource-persistence.md b/docs/admin/templates/extending-templates/resource-persistence.md
index bd74fbde74..a0ccbeea60 100644
--- a/docs/admin/templates/extending-templates/resource-persistence.md
+++ b/docs/admin/templates/extending-templates/resource-persistence.md
@@ -57,6 +57,8 @@ To prevent this, use immutable IDs:
- `coder_workspace.me.owner_id`
- `coder_workspace.me.id`
+You should also avoid using `coder_workspace.me.name` if your deployment allows workspace renaming via `CODER_ALLOW_WORKSPACE_RENAMES` or `--allow-workspace-renames`.
+
```tf
data "coder_workspace" "me" {
}
diff --git a/docs/reference/cli/server.md b/docs/reference/cli/server.md
index 7b8ebdd67e..8ee415b425 100644
--- a/docs/reference/cli/server.md
+++ b/docs/reference/cli/server.md
@@ -1311,7 +1311,7 @@ The renderer to use when opening a web terminal. Valid values are 'canvas', 'web
| YAML | allowWorkspaceRenames |
| Default | false |
-DEPRECATED: Allow users to rename their workspaces. Use only for temporary compatibility reasons, this will be removed in a future release.
+Allow users to rename their workspaces. WARNING: Renaming a workspace can cause Terraform resources that depend on the workspace name to be destroyed and recreated, potentially causing data loss. Only enable this if your templates do not use workspace names in resource identifiers, or if you understand the risks.
### --health-check-refresh
diff --git a/enterprise/cli/testdata/coder_server_--help.golden b/enterprise/cli/testdata/coder_server_--help.golden
index 4b1a1b2ddb..9734bbb298 100644
--- a/enterprise/cli/testdata/coder_server_--help.golden
+++ b/enterprise/cli/testdata/coder_server_--help.golden
@@ -16,9 +16,11 @@ SUBCOMMANDS:
OPTIONS:
--allow-workspace-renames bool, $CODER_ALLOW_WORKSPACE_RENAMES (default: false)
- DEPRECATED: Allow users to rename their workspaces. Use only for
- temporary compatibility reasons, this will be removed in a future
- release.
+ Allow users to rename their workspaces. WARNING: Renaming a workspace
+ can cause Terraform resources that depend on the workspace name to be
+ destroyed and recreated, potentially causing data loss. Only enable
+ this if your templates do not use workspace names in resource
+ identifiers, or if you understand the risks.
--cache-dir string, $CODER_CACHE_DIRECTORY (default: [cache dir])
The directory to cache temporary files. If unspecified and