0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-30 02:31:10 +00:00
Commit Graph

92 Commits

Author SHA1 Message Date
Pavel Boldyrev
41f35e69fe
shore(docs): update API Token auth section (#1991)
- Added MD059 rule to .markdownlint.json for better markdown formatting.
- Updated CODE_OF_CONDUCT.md to format email address as a link.
- Consolidated privilege descriptions in docs/index.md for clarity.
- Improved formatting in docs/resources/virtual_environment_vm.md for better readability.

* add `gh` to devcontainer
* remove wakatime

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-06-08 10:58:11 -04:00
Pavel Boldyrev
b1b8d1570f
fix(vm): allow scsi and sata for CD-ROM interface (#1971)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-05-21 21:58:55 +00:00
Anton Iacobaeus
28ae95bd09
feat(vm): add support for AMD SEV (#1952)
Signed-off-by: Anton Iacobaeus <anton.iacobaeus@canarybit.eu>
2025-05-12 21:43:15 -04:00
Fina
55b3f7391a
feat(vm): add support for virtiofs (#1900)
Signed-off-by: Fina Wilke <code@felinira.net>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-04-15 13:10:37 -04:00
Pavel Boldyrev
af46a9c71a
fix(vm): remove qcow2 as the default for disk.file_format (#1862)
No more need to explicitly set `file_format = "raw"` when defining new disks!

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-03-29 11:42:07 -04:00
Pavel Boldyrev
75281b2652
chore(docs)!: clarify disk behaviour in clone operation (#1850)
This is a "meta" PR to bump the minor version due potentially breaking changes from #1840.

See documentation for more details.

> When cloning an existing virtual machine, whether it's a template or not, the
> resource will inherit the disks and other configuration from the source VM.
>
> *If* you modify any attributes of an existing disk in the clone, you also need to
> explicitly provide values for any other attributes that differ from the schema defaults
> in the source (e.g., `size`, `discard`, `cache`, `aio`).
> Otherwise, the schema defaults will take effect and override the source values.

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-03-26 14:48:13 -04:00
Pavel Boldyrev
febf239b58
fix(provider): better error handling for non-existent resources (#1824)
* feat(provider): enhance error handling for non-existent resources
* docs(vm): clarify `local-lvm` datastore usage

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-03-12 17:16:40 -04:00
Mikael Nakajima
57c3970d54
fix(vm): fix vm machine type validation in order to support viommu (#1798)
* fix(vm): fix vm machine type validation in order to support viommu

Signed-off-by: Mikael Nakajima <nakamorichi@protonmail.com>

* docs(vm): update machine type documentation with VIOMMU details

Enhance VM machine type documentation to clarify VIOMMU configuration option for q35 machine type

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Mikael Nakajima <nakamorichi@protonmail.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-03-01 03:54:45 +00:00
Pavel Boldyrev
5e726c48d4
feat(vm): add optional reboot_after_update configuration flag (#1777)
* feat(vm): add optional reboot after update configuration

- Add `reboot_after_update` parameter to VM resource
- Update documentation to reflect new configuration option
- Implement logic to control VM reboot after configuration changes
- Provide warning if reboot is required but disabled by configuration

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-02-17 16:24:10 +00:00
Pavel Boldyrev
3119194292
feat(vm): add RNG device support (#1774)
* feat(vm): add RNG device  support

This commit adds support for configuring the Random Number Generator (RNG) device for virtual machines in both the VM resource and datasource. The implementation includes:

- New schema and model for RNG configuration
- Support for setting RNG source, max_bytes, and period
- Updated documentation for RNG configuration
- Test cases for RNG configuration
- Integration with VM creation, update, and read operations

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-02-16 23:53:40 -05:00
Pavel Boldyrev
5f003143f8
feat(vm): deprecate enabled attribute on cdrom/disk devices (#1746)
* feat(vm): deprecate `enabled` attribute on `cdrom`/`disk` devices

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* docs(vm): update CDROM configuration terminology and deprecation note

Improve documentation for virtual machine CD-ROM configuration by:
- Correcting capitalization of "CD-ROM"
- Clarifying deprecation note for `enabled` attribute

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-02-07 22:50:57 -05:00
Mrton0121
8b51e9991e
feat(cpu type): CPU type support for EPYC-v4 (#1611) 2024-11-04 08:29:19 -05:00
Pavel Boldyrev
d226b59e2e
feat(vm): add support for watchdog (#1556)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-30 11:14:55 -04:00
Pavel Boldyrev
0b29ae281e
fix(docs): document specifics of "ballooning device" in the `vm.memor… (#1550)
fix(docs): document specifics of "ballooning device" in the `vm.memory` block

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-24 00:12:20 +00:00
Pavel Boldyrev
e23d2f375c
chore(docs): add example for host disk pass-through to VM (#1547)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-21 13:49:54 +00:00
Pavel Boldyrev
569db6df3b
fix(vm): handle more than 4 hostpci devices (#1543)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-20 19:04:45 -04:00
Tim Wetterek
4f8e18da04
fix(doc): update virtual_environment_vm.md (#1495)
Update virtual_environment_vm.md

Typo in example usage of using downloaded iso for disk

Signed-off-by: Tim Wetterek <tim@wetterek.se>
2024-08-19 11:59:54 -04:00
Sven Greb
cc9d0e7131
feat(file): add support to set the file mode (#1478)
* feat(file): Add support to set the file mode

GH-733 [1] implemented basic support for hook scripts, but the authors
"did not manage to find time to work on" [2] also including support to
set the file mode. This small but important feature makes the use of the
`proxmox_virtual_environment_container.hook_script_file_id` [3] and
`virtual_environment_vm.hook_script_file_id` [34] attributes basically
useless when not combined with the manual step of making the uploaded
file executable (manually running `chmod +x /path/to/script` or using
other methods, based on the storage backend). Using the
`hook_script_file_id` on its own also causes all planned and applies
changes in the same execution to not be saved in the state because the
Proxmox VE API responses with a HTTP `500` because the uploaded and
assigned file is not executable.

This pull request implements the missing feature to set the file mode
by adding a new `file_mode` attribute of type `string` where an
octal-formatted value can be passed, e.g. `0700` or only `600`.
Note that the support for the octal prefixes `0o` and `0x` are not
supported to reduced the complexity, even though Go of course support
it, including the used `os.FileMode` type [5].
Changing the file mode also causes the file to be replaced, which is
true for almost any attribute in the `proxmox_virtual_environment_file`
resource, to ensure that the file mode can also be changed after the
initial creation.

[1]: https://github.com/bpg/terraform-provider-proxmox/pull/733
[2]: https://github.com/bpg/terraform-provider-proxmox/pull/733#issuecomment-2096716738
[3]: https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_container#hook_script_file_id
[4]: https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_vm#hook_script_file_id
[5]: https://pkg.go.dev/os#FileMode

Related to GH-570
Related to GH-733

Signed-off-by: Sven Greb <development@svengreb.de>


---------

Signed-off-by: Sven Greb <development@svengreb.de>
2024-08-13 21:28:48 -04:00
Pavel Boldyrev
de349523fe
feat(vm): add support for disk.serial attribute (#1385)
* feat(vm): add support for `disk.serial` attribute

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-06-11 01:40:03 +00:00
Pavel Boldyrev
1eb64a2522
fix(docs): add more details about the usb block in VM (#1382)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-06-11 00:00:08 +00:00
Charles Rodrigues
63f0cbfd27
fix(docs): update virtual_environment_vm.md (#1377)
Update virtual_environment_vm.md

Signed-off-by: Charles Rodrigues <56375916+chrodrigues@users.noreply.github.com>
2024-06-10 18:06:11 -04:00
Pavel Boldyrev
8892118228
misc: restore 0.59.1 code
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-06-09 23:40:27 -04:00
Pavel Boldyrev
994f367cc2
feat(vm): allow none cdrom (#1347)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-06-03 01:24:06 +00:00
Pavel Boldyrev
d843e46b37
misc(vm2): add support for vga (#1328)
* misc(vm2): add support for `vga`
* fix: use random VM IDs in parallel acc tests

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-05-27 21:30:12 -04:00
Pavel Boldyrev
32de050605
feat(vm): add support for vga.clipboard, virtio-gl type (#1326)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-05-26 21:08:04 +00:00
Pavel Boldyrev
2b7dd08020
feat(vm): remove support for initialization.upgrade attribute (#1295)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-05-15 00:55:29 +00:00
Pavel Boldyrev
b6af836386
misc: update documentation
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-05-05 22:27:18 -04:00
Pavel Boldyrev
b3caf6af82
fix: use raw file format for efi_disk by default (#1249)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-05-01 01:01:23 +00:00
Pavel Boldyrev
0c9c2066fd
fix(vm,lxc,file): improve timeouts handling (#1222)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-04-19 12:38:16 -04:00
Pavel Boldyrev
59972dc1b5
feat(vm): add support for initialization.upgrade attribute (#1203)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-04-10 23:43:39 +00:00
DevMiner
f0a7afa57d
impl(proxmoxtf): Intel E1000E support (#1191)
Signed-off-by: DevMiner <devminer@devminer.xyz>
2024-04-08 20:35:58 -04:00
Serge
dbbd966736
feat(vm): add support for numa architecture attribute (#1156) (#1175)
* feat(vm): add support for numa architecture attribute (#1156)

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>

* fix: numa blocks reordering issue

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-04-06 16:30:13 -04:00
Serge
a2f055a916
feat(vm): add support for memory hugepages and keep_hugepages attributes (#1158)
Allow use hugepages on the VM.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
2024-03-27 18:13:03 -04:00
Serge
83a5971cf6
feat(vm): add support for cpu affinity attribute (#1148) (#1153)
* feat(vm): add support for cpu `affinity` attribute (#1148)

It helps to pin VMs to the special cpu.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>

* add clarification about the format and permission requirements for `affinity`
* do not add `affinity` property to the API call if is not set

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-03-23 21:34:59 -04:00
Pavel Boldyrev
11ca880f28
feat(vm): add support for disconnected attribute in network interface (#1129)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-03-16 01:41:53 +00:00
Pavel Boldyrev
cea65a8a12
feat(vm): add support for protection attribute (#1126)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-03-14 22:23:02 -04:00
Pavel Boldyrev
014b59e04f
feat(vm): add support for disk aio, backup, iops* attributes (#1124)
* feat(vm): add support for disk `aio`, `backup`, `iops*` attributes

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-03-14 00:24:17 -04:00
Ming Xie
85705fdd51
fix(docs): fix wrong startup delay attributes (#1088)
fix(docs): Fix wrong startup delay attributes

Signed-off-by: Ming Xie <git@mxie.dev>
2024-03-04 19:34:13 -05:00
Jack Hodgkiss
cb5fc279cd
feat(vm): add VLAN trunk support (#1086)
* feat(vm): add `VLAN` trunk support

Signed-off-by: Jack Hodgkiss <identity@jackhodgkiss.uk>

* update docs
* better error handling
* add trunks to acceptance test

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Jack Hodgkiss <identity@jackhodgkiss.uk>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-03-03 13:57:58 -05:00
Ming Xie
0d548a7807
fix(docs): Inconsistent indentations in docs (#961)
fix(docs): Inconsistent indentations cause rendering issues

Signed-off-by: Ming Xie <git@mxie.dev>
2024-01-26 20:25:51 -05:00
Pavel Boldyrev
7d94bf73ec
chore(docs): remove static website generator with ruby dependencies (#929)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-18 03:21:50 +00:00
Rafał Safin
58347c09fe
feat(storage): add new resource proxmox_virtual_environment_download_file (#837)
* feat(core): add query url metadata endpoint to nodes client api

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(core): move storage api code to nodestorage folder

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(core): add download url api

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): add  resource_download_file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): finish new resource_download_file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): generate docs for new download file resource, update other docs and examples

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): add basic acc tests for resource download_file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(test): lint new test file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): warning instead of error when file already exists on resource download file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): better validation in resource download file, delete upload task on error

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): better err message in resource download file

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(core): removed unnecessary toint in custom type bool

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(storage): typo in resource download file error

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): download file resource review - 1

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* feat(storage): finish resource download file after review

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(storage): error instead of warnings in parse int errors in sizeRequiresReplaceModifier

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(docs): remove unwanted changes in virtual_environment_file.md

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(test): fix download file base acceptance tests

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(test): fix resource download file acc tests

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix(test): last fix resource download file acc test

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>

* fix: use PVE-compatible jammy LXC image, fix few typos

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Rafał Safin <rafal.safin@rafsaf.pl>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Rafał Safin <rafal.safin@rafsaf.pl>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-02 21:29:13 -05:00
Rafał Safin
16e571dc19
feat(vm, lxc): add new initialization.dns.servers param to vm and container (#832)
feat(vm): add new dns servers param to vm and container, deprecated server param

Signed-off-by: rafsaf <rafal.safin12@gmail.com>
2023-12-22 20:19:21 -05:00
Pavel Boldyrev
9712952e26
feat(vm): add cpu.limit attribute (#814)
* feat(vm): add `cpu.limit` attribute

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* update docs and examples

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-12-17 18:18:41 -05:00
frostyfab
86d0f07e9b
fix(docs): add clone/full parameter for vms (#797)
Add documentation for vm/clone/full parameter related to #551

Signed-off-by: Moritz Winter <siliconaire@frostyfab.de>
2023-12-13 20:59:23 -05:00
Chase H
6ebe8dcc60
feat(vm): support stopping (rather than shutting down) VMs on resource destroy (#783)
* Support stopping VMs on destroy

Signed-off-by: Chase <31072505+ActualTrash@users.noreply.github.com>

* Make the linter happy

Signed-off-by: Chase <31072505+ActualTrash@users.noreply.github.com>

---------

Signed-off-by: Chase <31072505+ActualTrash@users.noreply.github.com>
2023-12-10 23:43:30 -05:00
Rui Lopes
66bba2a027
feat(vm): Add support for setting the VM TPM State device (#743)
* feat(vm): add support for setting the vm tpm state

Signed-off-by: Rui Lopes <rgl@ruilopes.com>

* feat(vm): add encoding / unmarshalling for CustomTPMState

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* feat(vm): fix typos

Signed-off-by: Rui Lopes <rgl@ruilopes.com>

* feat(vm): fix vmGetTPMState

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* feat(docs): add the vm tpm_state documentation

Signed-off-by: Rui Lopes <rgl@ruilopes.com>

* feat(docs): add the vm tpm_state example

Signed-off-by: Rui Lopes <rgl@ruilopes.com>

---------

Signed-off-by: Rui Lopes <rgl@ruilopes.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-12-04 21:53:33 -05:00
Pavel Boldyrev
e2717a9a9e
feat(docs): add initial mini-howtos for VM (#730)
* chore(docs): minor fixes and linting

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* chore(docs): add VM mini-howtos with examples

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* address peer-review feedback

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

* vscode settings

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-11-28 12:38:47 -05:00
simplysoft
0eb04b2a25
feat(vm): Support hook script (#733)
for vms, relates to #570

Signed-off-by: Simplysoft GmbH <1588210+simplysoft@users.noreply.github.com>
2023-11-28 12:06:11 -05:00
Daniele De Lorenzi
0eeb7a7fd9
feat(vm): Add Win 11 as os type (#720) 2023-11-16 13:55:34 +00:00