diff --git a/cli/rename.go b/cli/rename.go index 168dcffb3e..ac364b80ea 100644 --- a/cli/rename.go +++ b/cli/rename.go @@ -16,10 +16,6 @@ func rename() *cobra.Command { Use: "rename ", Short: "Rename a workspace", Args: cobra.ExactArgs(2), - // Keep hidden until renaming is safe, see: - // * https://github.com/coder/coder/issues/3000 - // * https://github.com/coder/coder/issues/3386 - Hidden: true, RunE: func(cmd *cobra.Command, args []string) error { client, err := CreateClient(cmd) if err != nil { @@ -31,8 +27,9 @@ func rename() *cobra.Command { } _, _ = fmt.Fprintf(cmd.OutOrStdout(), "%s\n\n", - cliui.Styles.Wrap.Render("WARNING: A rename can result in data loss if a resource references the workspace name in the template (e.g volumes)."), + cliui.Styles.Wrap.Render("WARNING: A rename can result in data loss if a resource references the workspace name in the template (e.g volumes). Please backup any data before proceeding."), ) + _, _ = fmt.Fprintf(cmd.OutOrStdout(), "See: %s\n\n", "https://coder.com/docs/coder-oss/latest/templates/resource-persistence#%EF%B8%8F-persistence-pitfalls") _, err = cliui.Prompt(cmd, cliui.PromptOptions{ Text: fmt.Sprintf("Type %q to confirm rename:", workspace.Name), Validate: func(s string) error { diff --git a/cli/testdata/coder_--help.golden b/cli/testdata/coder_--help.golden index 1381a6d0af..8ceef13ee0 100644 --- a/cli/testdata/coder_--help.golden +++ b/cli/testdata/coder_--help.golden @@ -36,6 +36,7 @@ Workspace Commands: create Create a workspace delete Delete a workspace list List workspaces + rename Rename a workspace schedule Schedule automated start and stop times for workspaces show Display details of a workspace's resources and agents speedtest Run upload and download tests from your machine to a workspace