Skip to content

Commit ac92895

Browse files
blinkagent[bot]blink-so[bot]DevelopmentCats
authored
docs(azure-linux): clarify resource lifecycle on stop vs delete (#713)
The existing README for the Azure Linux template only mentioned that the VM is ephemeral and the managed disk is persistent, but did not explain that the resource group, virtual network, subnet, and network interface also persist when a workspace is stopped. This led to confusion where users expected all Azure resources to be cleaned up on stop, when in reality only the VM is destroyed. ## Changes - Added the persistent networking/infrastructure resources to the resource list - Added "What happens on stop" section explaining which resources persist and why - Added "What happens on delete" section confirming all resources are cleaned up - Moved the existing note about ephemeral tools/files into a "Workspace restarts" subsection for clarity Created on behalf of @DevelopmentCats Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com> Co-authored-by: DevCats <christofer@coder.com>
1 parent 563dbc4 commit ac92895

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

  • registry/coder/templates/azure-linux

registry/coder/templates/azure-linux/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,21 @@ This template provisions the following resources:
2727

2828
- Azure VM (ephemeral, deleted on stop)
2929
- Managed disk (persistent, mounted to `/home/coder`)
30+
- Resource group, virtual network, subnet, and network interface (persistent, required by the managed disk and VM)
3031

31-
This means, when the workspace restarts, any tools or files outside of the home directory are not persisted. To pre-bake tools into the workspace (e.g. `python3`), modify the VM image, or use a [startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/script). Alternatively, individual developers can [personalize](https://coder.com/docs/dotfiles) their workspaces with dotfiles.
32+
### What happens on stop
33+
34+
When a workspace is **stopped**, only the VM is destroyed. The managed disk, resource group, virtual network, subnet, and network interface all persist. This is by design — the managed disk retains your `/home/coder` data across workspace restarts, and the other resources remain because the disk depends on them.
35+
36+
This means you will see these Azure resources in your subscription even when a workspace is stopped. This is expected behavior.
37+
38+
### What happens on delete
39+
40+
When a workspace is **deleted**, all resources are destroyed, including the resource group, networking resources, and managed disk.
41+
42+
### Workspace restarts
43+
44+
Since the VM is ephemeral, any tools or files outside of the home directory are not persisted across restarts. To pre-bake tools into the workspace (e.g. `python3`), modify the VM image, or use a [startup script](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/script). Alternatively, individual developers can [personalize](https://coder.com/docs/dotfiles) their workspaces with dotfiles.
3245

3346
> [!NOTE]
3447
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.

0 commit comments

Comments
 (0)