-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visions of an incus made out of tofu. 🤔 #1
Conversation
required_version = "1.6.2" | ||
required_providers { | ||
incus = { | ||
source = "lxc/incus" | ||
source = "lxc/incus" | ||
version = "0.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about that since I'm deploying with a mix of Terraform and OpenTofu so the version requirement is going to become annoying.
Same thing on the Incus side. I think once we start needing a specific feature to have this work, we'll do a ">=" condition but until then, any version should work fine.
terraform/services/versions.tf
Outdated
required_version = "1.6.2" | ||
required_providers { | ||
incus = { | ||
source = "lxc/incus" | ||
version = "0.1.0" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about version pinning.
lifecycle { | ||
ignore_changes = [ running ] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does that do exactly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It prevents Tofu from turning on and off the instances when the state is controlled externally to Tofu.I prefer to do that with different tooling. In my case, I would use the Incus CLI.
The AWS, etc. providers offer the ability to control the on off state of instances, but it is opt in and discouraged.
Ideally the incus provider would work the same way. Then we would not need to disable it.
But what does it do exactly? It tells Tofu to ignore that part of the state file.
I will clean this up after the weekend. There are a few more commits I have been thinking about adding too. I am away from my computers at the moment, though. |
I pushed a few commits. I proposed new version strategy in 4e21e83. We can still leave them out if you want, but I always use them on my projects. The other ideas I had can wait. I think I might have found a bug in the Incus provider. |
It looks like the DCO is new. I got an email about it this morning. Do you still have interest in this PR? If so, I can find some time to add the DCO signatures. |
Hey @jarrodu, I'm definitely still interested in those changes, just been swamped with the 0.7 and LTS release :) Don't worry about the DCO stuff, once I finally get to spend some time incorporating those changes, I'll squash things into a few commits and add the |
Signed-off-by: Stéphane Graber <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
Signed-off-by: Jarrod Urban <[email protected]>
Signed-off-by: Jarrod Urban <[email protected]>
4e21e83
to
3f1249d
Compare
Did a big rebase and reorg of the changes now, still the exact same changes, just cleaned up in a bunch of separate commits with descriptions and correct sign-off. |
Signed-off-by: Jarrod Urban <[email protected]>
Signed-off-by: Jarrod Urban <[email protected]>
Signed-off-by: Jarrod Urban <[email protected]>
Signed-off-by: Jarrod Urban <[email protected]>
Signed-off-by: Jarrod Urban <[email protected]>
Signed-off-by: Jarrod Urban <[email protected]>
3f1249d
to
5c95565
Compare
Signed-off-by: Stéphane Graber <[email protected]>
Thanks! |
I worked a bit with the Tofu and Ansible code in your project.
I got the Tofu to work on some of my hardware. I was also able to apply the Ansible code, but I got some errors near the end on the server nodes.
These commits are more a stream of consciousness, and are probably pretty opinionated. I thought I would share them with you so that you know that I am working on the project.
Feel free to do a code review. We could chat about some of the changes I made so far. I have more ideas, but they can wait till later.