-
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
Add new incus_server
resource
#139
Comments
I'd probably have it be This is one that will most likely need an import to be useful as most servers/clusters will have pre-existing configuration. |
incus_server
resource
So it would look like this: incus_server {
config = {
" core.https_address" = "[::]:8443"
// ...
}
} |
I did some research and I'm not sure if we can configure this properly with a Terraform resource because of how Terraform works. That is, Terraform has the concept of resources that are created, updated or removed. For an Incus server, there would only be updates and no other lifecycle methods, so the Terraform framework itself is not meant to do that. So I see the Terraform provider to manage the resources within an Incus server, but not the Incus server itself. That would more likely be done with Ansible? |
you can create, update and remove. the config, will have to have everything. my incus server config:
so, you can
|
I think you have misunderstood me. It's not about the Incus API and whether it can be done with it, it's just about how Terraform works and this use case is not about creating, updating or removing a resource within Incus, it's about configuring Incus itself. If we want to do this with Terraform, the resource definition would have to look like this, which I think is very far-fetched and not worth implementing: incus_config "http_address {
key = "core.https_address"
value = "[::]:8443"
} For the configuration of the Incus server itself, I suggest that we use the Ansible playbooks: https://github.com/lxc/incus-deploy |
In my opinion, this provider was created to manage everything inside incus. It's inside incus, and the provider should handle it. It makes sense for ansible to configure ceph, ovn and install incus, configurations in the OS (like if there's an It's fine to do a block config inside incus_server, like you proposed. |
I agree it's a bit of a weird one as you can only have one server config, you can't add more It's somewhat similar to what we have with the default profile situation, you can't create it, you can't delete it, you can only update it. @trunet do you have an example of any other similar Terraform providers doing this? |
I understand your point about the profile situation. we don't use default for this reason. I found some cases which are similar to a "whole cluster config": Could we have some configs which could be done from terraform in the form of an attribute? We could start with Scriptlet is constantly evolving here, and is difficult to ansible-playbook all clusters/servers we have everytime there's a change in it. |
Would be nice to have a way to set server configurations. In my use-case
instances.placement.scriptlet
.I propose creating
incus_config
resource.References:
The text was updated successfully, but these errors were encountered: