* fix(vm): missing disks when importing VM to a TF state
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix: add error handling
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* Use GetDatastoreFile instead of ListDatastoreFiles
Signed-off-by: CppBunny <noah@vantiggel.be>
* make linter happy
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: CppBunny <noah@vantiggel.be>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
The default value of "ignore" was missing from the disk discard
parameter of the terraform module. This commit sets the default to
"ignore" instead of the current "".
This fixes terraform incorrectly flagging that the state is different than
what is currently running on the proxmox node when the discard option isn't
defined under the disk object.
Signed-off-by: Daniel Lowry <development@daniellowry.co.uk>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
fix: accept ipv6 in dns servers initialization
Signed-off-by: Guillaume <4112243+LEI@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix(provider): removed ip check/limitation to mkProviderSSHNode
It is now possible to use an FQDN instead of an IP Address when the SSH
node is configured
Changes to be committed:
modified: proxmoxtf/provider/schema.go
Signed-off-by: bitchecker <ciro.deluca@autistici.org>
* fix(docs): Updating documentation after the code updates
Signed-off-by: bitchecker <ciro.deluca@autistici.org>
---------
Signed-off-by: bitchecker <ciro.deluca@autistici.org>
* Added NetworkDevices and IPs
Removed previous limitation to 8 network interfaces/ips and moved to
new proxmox limit (up to 32)
Modifiche di cui verrà eseguito il commit:
modificato: proxmox/nodes/vms/vms_types.go
Signed-off-by: bitchecker <ciro.deluca@autistici.org>
* Code alignment for vm resource
After updates to vm_types structure definition, updated the resource
code in order to reflect changes
Modifiche di cui verrà eseguito il commit:
modificato: proxmoxtf/resource/vm.go
Signed-off-by: bitchecker <ciro.deluca@autistici.org>
* fix few typos, fix struct to state mapping
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: bitchecker <ciro.deluca@autistici.org>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* bug(vm): fix hostpci devices not showing up in refresh plan
Signed-off-by: Michael Iseli <michael.iseli@bsi-software.com>
* fix pci & usb devices set on read, fix test
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: Michael Iseli <michael.iseli@bsi-software.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix(vm): panic at read when cloud-init drive is on directory storage
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix linter, add tests
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* feat(lxc): allow to update features, add mount type support
Signed-off-by: tarik02 <taras.fomin@gmail.com>
* updates according to the MR
Signed-off-by: tarik02 <taras.fomin@gmail.com>
* update according to the pull request
Signed-off-by: tarik02 <taras.fomin@gmail.com>
---------
Signed-off-by: tarik02 <taras.fomin@gmail.com>
* fix(vm): unable to clone as non-root due to `hook_script`
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix linter error
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
specify right content type for backups
This now matches with the folder used by proxmox for backups
Also update documentation to reflect the change
Signed-off-by: DanielHabenicht <daniel-habenicht@outlook.de>
* fix(provider): use int64 for vm and disk storage
Signed-off-by: DanielHabenicht <daniel-habenicht@outlook.de>
* revert changes for memory
Signed-off-by: DanielHabenicht <daniel-habenicht@outlook.de>
* revert changes for memory
Signed-off-by: DanielHabenicht <daniel-habenicht@outlook.de>
* fix test
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix int -> int64 conversion for disk size
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: DanielHabenicht <daniel-habenicht@outlook.de>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
fix: display warning if directory is not found
Signed-off-by: DanielHabenicht <daniel-habenicht@outlook.de>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
For SSH access, try in order:
- IPv4 address of the interface with IPv4 Gateway (if there is one)
- IPv6 address of the interface with IPv6 Gateway (if there is one)
- fallback to the first interface with IPv4 address
Signed-off-by: Oto Petřík <oto.petrik@gmail.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* fix(vm): update validation and docs for `machine` attribute.
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* chore: remove certificate resource from acceptance tests
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* feat: support usb devices for vm; fixes#665
Signed-off-by: Daniel Muehlbachler-Pietrzykowski <daniel@muehlbachler.io>
* chore: fix linter errors
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: Daniel Muehlbachler-Pietrzykowski <daniel@muehlbachler.io>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Disks imported using `file_id` argument do not have FileVolume set,
that makes PathInDatastore return an empty string, which makes
IsOwnedBy return fales for any vm id.
The end result is the inability to resize imported disks,
this fixes it.
Signed-off-by: Oto Petřík <oto.petrik@gmail.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* feat(vm): add 'path_in_datastore' disk argument
Provide access to actual in-datastore path to disk image,
and experimental support for attaching other VM's disks or host devices.
Signed-off-by: Oto Petřík <oto.petrik@gmail.com>
* chore: added to `/example` for acceptance testing
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: Oto Petřík <oto.petrik@gmail.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* feat(provider): configure temp directory
Resource 'proxmox_virtual_environment_file' often requires lot of disk
space in /tmp, which can be space-limited.
Instead of requiring to set TMPDIR environment variable before running
terraform, make it a provider configuration option.
Signed-off-by: Oto Petřík <oto.petrik@gmail.com>
* fix: lint error, align names in the `client` struct
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
---------
Signed-off-by: Oto Petřík <oto.petrik@gmail.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
* feat(lxc): add support for the `start_on_boot` option
Signed-off-by: Simon Caron <simon.caron.8@gmail.com>
* Move code next to started blocks + update default value
Signed-off-by: Simon Caron <simon.caron.8@gmail.com>
---------
Signed-off-by: Simon Caron <simon.caron.8@gmail.com>
Co-authored-by: Simon Caron <simon.caron.8@gmail.com>