-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
proxmox_virtual_environment_container managing mount_points #1392
Comments
Hey @GuillaumeSeren 👋🏼 Just to confirm, you have only one mount point, not two, defined in the I suspect the list could end up having a valid value, and a As a workaround I'd suggest to define mount points explicitly without using dynamic blocks, until the issue is fixed. |
Hey @bpg,
No I had 2 mount_points something like this, the addition works it is the removal that do not:
Now the disk is added and mounted in the container,
I am not sure to get it right, but what I did was creating the /mysql/web mount_point manually, Best, |
I was under impression that the result config was something like ...
mount_point {
size = "400G"
path = "/web/mysql"
volume = "local:105/vm-105-disk-1.raw"
}
mount_point {}
... But I see now the problem is the actual delete |
Well, the mount point implementation is broken :( The schema does not have the actual "mount point name" (i.e., I'm not sure yet if this can be fixed in a backward-compatible way. If not, I'd rather postpone this bug to v1+. Working with sets is much more convenient in the plugin framework than in the legacy SDK. |
Hey @bpg , I guess from my use-case the easy choice is to not support those extra mount_points, I would be interested to help/test/dev this new feature if you have any pointer to start from. |
Working with lists/sets of blocks is inherently difficult in the current implementation of the provider. This is partly due to some choices made in the legacy code at the very beginning and partly due to limitations of the SDKv2 API. In an ideal world, these types of attributes should be represented as a map in the config: ...
"mount_points" {
"mp0" = {
size = "400G"
path = "/web/mysql"
volume = "local:105/vm-105-disk-1.raw"
}
"mp1" = { ... }
}
... Then there would be no ambiguity, no issues with ordering, etc. But that's not possible with SDKv2, and this deficiency is my main motivation to move to the FWK implementation in #1231. Since there is a better long-term solution for these problems, I don't want to spend my time on fixes and workarounds in the SDK-based code. @GuillaumeSeren, I do really appreciate your offer, but I need to come up with some conventions and guidelines on how to implement various types of attributes and blocks so we have consistency in the code. I'm making some progress in the VM resource and hopefully can come up with some contribution guidelines in the near future. |
Sure thank you for all the nice responses. Best. |
Marking this issue as stale due to inactivity in the past 180 days. This helps us focus on the active issues. If this issue is reproducible with the latest version of the provider, please comment. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
Hey,
thank you for this great project I really enjoy it,
I think it is very usefull.
Describe the bug
When you try to add anonymous (non pre-created) mount_points (as documented here),
in a container like so you get an error:
To Reproduce
Here the code I use to manage that:
Additional context
TF_LOG=DEBUG terraform apply
):Best,
Guillaume
The text was updated successfully, but these errors were encountered: