Commit 19b1f86
Auto-pull new workspace image when registry digest advances
`docker_container.image` was a floating `:base` tag string, which Docker's
cache treats as "already have it" — `coder update` / workspace restart
would keep running the old image even after CI pushed a new one.
Add a `docker_registry_image` data source that reads the current remote
digest and a `docker_image` resource with `pull_triggers = [<digest>]` so
every `terraform apply` re-checks the registry: when the digest changes,
the image is re-pulled, `image_id` changes, and `docker_container.workspace`
replans to recreate with the new image. `projects_volume` (per-workspace)
survives the recreate; `coder-shared` and `coder-<owner>-home-persist`
aren't in state so they're untouched.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 941cd8a commit 19b1f86
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
405 | 419 | | |
406 | 420 | | |
407 | | - | |
| 421 | + | |
408 | 422 | | |
409 | 423 | | |
410 | 424 | | |
| |||
0 commit comments