Declare incus_image for NixOS/unstable #47
No reviewers
Labels
No labels
IaC
admin
agent-containers
automation
blockchain
cleanup
data
documentation
hardware
hotfix
infrastructure
maintenance
metrics
ml
monitoring
networking
resilience
security
tailscale
trading
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
midwitmoneymgmt/m3-infra!47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "48-declare-incus-image"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changes
incus_image.nixos_unstableresource that pulls and caches the NixOS/unstable image from the upstreamimages:remoteincus_image.nixos_unstable.fingerprintinstead of the hardcoded"images:nixos/unstable"stringlifecycle { ignore_changes = [image] }to prevent mass rebuild when the pinned image updatesWhy
Previously each container pointed directly at the upstream image server. If upstream published a new NixOS snapshot between container creates, different containers could end up on different base images. This makes the image a single managed resource — upgrades are intentional, not implicit.
Upgrade workflow
tofu applyrefreshes theincus_imageresource (pulls latest NixOS/unstable)lifecycle { ignore_changes = [image] }prevents automatic container rebuildstofu apply -replace=incus_instance.btc_nodeFirst apply
The
incus_imageresource will be created (image pulled to host). Thelifecycleblocks prevent any container changes. Plan should show 1 new resource, 0 changes to existing.Closes #48
assigned to @AlexCaswen
added 1 commit
238ac9cd- Fix incus_image syntax: source_image is a block, not separate argsCompare with previous version
added 1 commit
7668669f- Fix incus_image: aliases list -> alias blockCompare with previous version
approved this merge request
mentioned in commit
90c35937af