Fix local pool: lifecycle ignore_changes to prevent destroy #44
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!44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "46-import-local-pool"
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?
What
Third attempt at #46. The pool was successfully imported into state by !42 but OpenTofu keeps trying to destroy/recreate it because config fields on storage pools trigger force-replacement.
Root Cause
The
incus_storage_poolresource treats changes tosourceandzfs.pool_nameas force-replacement fields. Even with the correct values declared (!43), the state was imported with bare config, so OpenTofu sees a diff and plans replacement.Fix
importblock (pool is already in state)lifecycle { ignore_changes = all }— since IncusOS owns pool config (encryption, ZFS settings), Terraform should never attempt to modify itExpected behavior
tofu planproduces no changes forincus_storage_pool.local. The pool stays in state, containers can reference it, and IncusOS retains full ownership of its config.Closes #46
added 3 commits
main200789c9- Merge branch 'main' into '46-import-local-pool'Compare with previous version
approved this merge request
mentioned in commit
cde30ef87f