terraform-provider-proxmox: Duplicate disks created
I’ve had the same issues with Proxmox 8 as a lot of people (like #882 and #863), but when I build this project locally from master and use that, then both these problems are solved. However, a new problem arises. The provider is supposed to increase the size of the 2G base image disk that I have, but instead, it seems like it just detaches that disk and creates a new empty one (with the correct size). This new disk is of course not bootable, and the terraform apply command stalls.
Any idea if this is a known problem? It didn’t seem to me like a duplicate of any other open issues right now.
Proxmox: 8.1.3 Provider: local build of latest commit, https://github.com/Telmate/terraform-provider-proxmox/commit/a8675d3967710bab4ac08fad9dbc05eed3ae2c58
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 7
- Comments: 52 (15 by maintainers)
I will try to look into it today or tomorrow.
I compiled the latest code and have been using that and it seems to have fixed this issue and #704. If you need a solution now, I’d suggest you take this route.
There are instructions for compiling from source but if you are compiling it on a Debian based machine, it’d look something like this:
At that point the new provider should be in the
./bindirectory. If you aren’t compiling it on your deployment machine, copy the executable over to the deployer. You’ll need to copy the executable into a particular directory on the deployer. Here are the commands from the aforementioned installation guide:That source path of the
cpcommand will change if you are compiling on a different machine, but that should be easy enough. The last step is to tell Terraform to use this new module. That means updating your terraform to look like this:That should work, but if you ever need to recompile it, terraform will complain about the checksum having changed. To deal with that you can either manually remove the offending checksum from the
.terraform.lock.hclfile with a text editor, or what I personally do is just delete that lock file and regenerate it like so:Also, do realize that this is the latest code that hasn’t even been merged into this repo yet, and a fair amount has changed. So there’s some risk of bugs causing you problems. I’d suggest you test the code in your environment and with your configuration even more than you would a new, official release. I’ve tested it in my environment, but if you’re using different features than me, you could hit some code path that has a bug that I didn’t run into.
If you are in an environment that has a low risk tolerance and you can’t test this out, I have two suggestions:
Having the same issue myself. For now, the provider seems to be unusable.
version = “3.0.1-rc1” is out from telmate provider.
new version comes with different disk schema, I had to update my disk schema in tf file, now it works. its still has some glitches regarding disk type/controller though. anway thx to everyone !
ps:if someone needs a running example with clone_ _from_template+cloudinit+lvm/zfs can ping me.
Hi! Check work RC v3.0.1-rc1 on Terraform 1.6.6 / 1.7.1 with ProxMox 8.0.4 / 8.1.3. The error is gone. Everything works well. Thanks to all!
It is published as a fork under my own name, thegameprofi/proxmox There are multiple version with unreleased changes from this repo. But also, at least the newest version, has problems mounting a cloud-init drive #901
@hestiahacker what should we do? are we have to wait until new version release?
We are also hitting this problem with proxmox 8.1.3 and provider
TheGameProfi/proxmoxversion2.9.15Having the same problem but with TheGameProfi/proxmox. It seems defining file and volume fixes it but you need to know the id beforehand…
Not sure how to go around this.
Sorry, only got now time to check it out.
Tested the newest changes and it worked, and didn’t see any Errors. Released the new fixes inside my Repo.
Thanks Hestia & mleone87 & Tinyblargon for the fix 😃