Commit c56cc1d
Stop destroying shared volumes on workspace delete; pin web-shell 0.5.0
docker_volume.shared and docker_volume.home_persist were declared in the
per-workspace terraform state, so `terraform destroy` on any workspace
also tried to remove them. They're deployment-wide / per-owner — Docker
refused removal while other workspaces still had them mounted, failing
the destroy and leaving partial state.
Removed both docker_volume resources and reference the volumes by literal
name in docker_container.workspace. Docker auto-creates named volumes on
first container attach (standard `-v name:/path` semantics), so first
workspace for an owner silently creates coder-<owner>-home-persist and
first workspace anywhere creates coder-shared. Subsequent workspaces
reuse them; delete only tears down the container and workspace-scoped
volumes.
Trade-off: auto-created volumes have no coder.owner / coder.owner_id
labels. Doesn't affect runtime — only orphan-cleanup tooling that filters
by label.
Also pin web-shell to 0.5.0 (was floating on `latest`) so image builds
are reproducible across CI runs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b345208 commit c56cc1d
2 files changed
Lines changed: 8 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | 361 | | |
389 | 362 | | |
390 | 363 | | |
| |||
446 | 419 | | |
447 | 420 | | |
448 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
449 | 427 | | |
450 | 428 | | |
451 | | - | |
| 429 | + | |
452 | 430 | | |
453 | 431 | | |
454 | 432 | | |
| |||
460 | 438 | | |
461 | 439 | | |
462 | 440 | | |
463 | | - | |
| 441 | + | |
464 | 442 | | |
465 | 443 | | |
466 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments