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

123 Commits

Author SHA1 Message Date
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
2785c40d44
fix(vm): regression: vga.clipboard attribute check (#1340)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-05-30 01:36:47 +00:00
Pavel Boldyrev
2e34c57f6c
chore(vm2): cleanup cpu implementation, refactor rearrange acc tests (#1311)
* chore(vm2): cleanup `cpu` implementation, refactor rearrange acc tests

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-05-18 23:31:50 -04:00
DevMiner
bd195d6606
feat(vm): add initial support for IDE (#1237)
* feat(vm): add initial support for IDE

Very broken, doesn't properly work at the moment, WIP

Signed-off-by: DevMiner <devminer@devminer.xyz>

* add acceptance test for ide disks, fixed few issues

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

* update VM example

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

---------

Signed-off-by: DevMiner <devminer@devminer.xyz>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-04-29 20:11:07 -04:00
joris
46d323d31b
fix(vm): error 'resizing of efidisks is not supported' when clonning a VM with re-defined efi_disk (#1206)
* fix(vm): compare efiType value instead of address

Signed-off-by: tyxieblub <5111464+tyxieblub@users.noreply.github.com>

* update example to reproduce the error case

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

---------

Signed-off-by: tyxieblub <5111464+tyxieblub@users.noreply.github.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-04-11 23:09:56 -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
Serge
9fee8c1e2e
feat(vm): add proxmox_virtual_environment_node datasource (#1151)
* feat(vm): add proxmox_virtual_environment_node datasource

It helps to get CPU model, number of cores and sockets.

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

* fix node_name ref
* add acceptance test

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 20:17:09 -04:00
dyadMisha
6a5beccf91
fix(examples): datastore_id is missing in initialization block for vm (#1136)
fix: datastore_id is missing in initialization block

otherwise it defaults to dvInitializationDatastoreID

Signed-off-by: dyadMisha <37950256+dyadMisha@users.noreply.github.com>
2024-03-17 21:01:19 -04:00
renovate[bot]
29d60f5932
chore(docs): update terraform local (2.4.1 → 2.5.1) (#1116)
| datasource         | package         | from  | to    |
| ------------------ | --------------- | ----- | ----- |
| terraform-provider | hashicorp/local | 2.4.1 | 2.5.1 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-11 20:53:51 -04: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
Pavel Boldyrev
3195b3cdf4
feat(file)!: snippets upload using SSH input stream (#1085)
* feat(file)!: safer snippets upload using SSH input stream
* fixes for acceptance tests on windows
* enable other OS-es for acceptance tests
* update example templates to use api token auth

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-03-02 19:06:59 -05:00
Pavel Boldyrev
3c5276093a
fix(user): expiration_date attribute handling (#1066)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-02-27 03:06:58 +00:00
Pavel Boldyrev
c64fcd2948
feat(file): add overwrite_unmanaged attribute to virtual_environment_download_file resource (#1064)
* feat(file): add `overwrite_unmanaged` attribute to `virtual_environment_download_file` resource
* misc(ci): add a check for uncommitted generated docs
* misc(ci): better dependency cache

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-02-25 21:33:17 -05:00
Pavel Boldyrev
b648e5bcb0
chore(vm): refactoring, add acceptance tests (#1040)
cleaning up and refactoring the VM code, add some acceptance tests around disks, few minor bugfixes

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-02-19 16:56:13 -05:00
Jason Kossis
c9c3067b61
feat(lxc): add container startup options (#923)
Signed-off-by: Jason Kossis <jkossis@gmail.om>
Co-authored-by: Jason Kossis <jkossis@gmail.om>
2024-01-17 20:45:30 -05:00
renovate[bot]
9e7d7d17cb
chore(docs): Update Terraform tls (3.4.0 → 4.0.5) in docs (#908)
| datasource         | package       | from  | to    |
| ------------------ | ------------- | ----- | ----- |
| terraform-provider | hashicorp/tls | 3.4.0 | 4.0.5 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-16 00:25:36 -05:00
renovate[bot]
699f19d135
chore(docs): update terraform tls (3.1.0 → 3.4.0) in docs (#904)
| datasource         | package       | from  | to    |
| ------------------ | ------------- | ----- | ----- |
| terraform-provider | hashicorp/tls | 3.1.0 | 3.4.0 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-16 05:01:45 +00:00
renovate[bot]
c116db592b
chore(deps): update terraform local (2.2.2 → 2.4.1) (#902)
| datasource         | package         | from  | to    |
| ------------------ | --------------- | ----- | ----- |
| terraform-provider | hashicorp/local | 2.2.2 | 2.4.1 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-16 04:28:11 +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
40102a6a50
fix(lxc): add missing onboot param on container clone create (#838)
* fix(lxc): add missing start params on container clone create

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

* fix(lxc): remove set started attr on container clone

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

* chore(lxc): add `start_on_boot` to example templates

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>
2023-12-28 10:48:53 -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
0ffe75afa4
fix(vm): update smbios during clone (#827)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-12-21 02:28:43 +00: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
Pavel Boldyrev
25deebba26
fix(lxc): fixes for datastore-backed volume mounts (#772)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-12-06 23:39:35 +00: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
3fd6b6b2ce
fix(vm): update validation and docs for machine attribute (#681)
* 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>
2023-11-05 22:49:01 +00:00
Daniel Mühlbachler-Pietrzykowski
cec4e65868
feat(vm): add support for USB devices passthrough (#666)
* 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>
2023-10-30 21:41:44 -04:00
Oto Petřík
aeb5e88bc9
feat(vm): add 'path_in_datastore' disk argument (#606)
* 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>
2023-10-11 22:13:09 -04:00
Pavel Boldyrev
be5251dd5a
feat(vm): add option to enable multiqueue in network devices (#614)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-10-09 16:01:24 +00:00
Pavel Boldyrev
0b8f2e2c6f
fet(vm): allow scsi and sata interfaces for CloudInit Drive (#598)
* fet(vm): allow `scsi` and `sata` interfaces for CloudInit Drive

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-10-01 22:23:11 -04:00
Rafał Safin
de8b4ec41a
feat(cluster): add cluster options resource (#548) 2023-09-12 07:49:03 -04:00
Risto Oikarinen
26970541c4
feat(vm): support PCI device resource mapping (#500)
* feat(vm): support PCI device resource mapping

* fix: linter error

* fix: minor cleanup

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-08-20 18:00:11 -04:00
Emmanuel Benoît
a2853606ad
feat(vm): support for migration when the node name is modified (#501)
* feat(vm): support for migration when the node name is modified

  * Added a `migrate` VM flag which changes the provider's behaviour
    when the VM's `node_name` is updated. If `true`, the VM will be
    migrated to the specified node instead of being re-created.

  * Added a `timeout_migrate` setting to control the timeout for VM
    migration.

  * Fixed a bug in the API's migration data structure that prevented
    the online migration flag to be set.

* fix: update description

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-08-18 22:02:50 -04:00
Emmanuel Benoît
547593661f
feat(vm): support for non-default CloudInit interface and CloudInit storage change (#486) 2023-08-13 09:55:38 -04:00
Moustafa Baiou
244e061779
fix(user): make password attribute optional (#474)
* fix(user): make password attribute optional

The password is already optional in the terraform schema, but still serialized and sent as an empty string via the client. This addresses the request body serialization.

Addresses #462

* add example template

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-08-10 15:07:49 +00:00
Pavel Boldyrev
85ff60d4bd
feat(vm): add support for SMBIOS settings (#454)
* feat(vm): add support for SMBIOS settings

* fix linter errors

* fix smbios error at clone
2023-08-06 00:31:17 +00:00
Pavel Boldyrev
b045746a94
feat(vm): add support for start/shutdown order configuration (#445) 2023-07-29 22:55:12 -04:00
Pavel Boldyrev
cfe3d96576
feat(vm): add support for disk cache option (#443) 2023-07-29 13:29:14 -04:00
Pavel Boldyrev
a9a7329d9f
feat(core): migrate version datasource to TF plugin framework (#440)
* feat: migrate `version` datasource to tf framework

* set up documentation generator

* add generated docs for network resources

* fix test mux server, add import examples to network resources

* fix network tests

* fix shell examples
2023-07-29 02:10:02 +00:00
Leah
beef9b1219
feat(lxc): add support for lxc mount points (#394)
* feat(lxc): add support for lxc mount points

* update docs and examples

* improve error handling for container creation / start operations, fix size propagation for storage mounts

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-07-16 20:41:07 -04:00
Pavel Boldyrev
b86fa239dd
fix(vm): add interface argument to cdrom block (#429)
* fix(vm): add `interface` argument to `cdrom` block

* doc formatting
2023-07-16 16:55:49 +00:00
Leah
e9a74e9037
feat(vm): efi disk, cpu numa (#384)
* efi disks support

* make size a string

* add cpu numa support

* add docs

* fix description

* string size fixes

(cherry picked from commit 254724d1d10c5191d294f0377adac49ad41dc880)

* fix lints

* fix(vm): replace `size` with `type` for efi disk

also
- add support for `pre-enrolled-keys`
- add example
- fix handling of `numa` flag when it's not in the template
- cleanup linter errors

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-07-01 08:50:21 -04:00
Pavel Boldyrev
7aa25b8d05
feat(vm): add support for meta-data in cloud-init (#378) 2023-06-24 00:06:05 -04:00
Pavel Boldyrev
343e8045c1
feat(vm): add network device resources (#376)
* wip

* experimenting with terraform plugin framework

* cleaning up poc and adding tests

* adding read / update / delete

* update bridge_vlan_aware and MTU

* add ipv6 and simplify IP support

* fix provider's schema

* add docs

* run linter from cmdline

* disable TF acceptance tests

* add VLAN

* update docs

* add examole

* cleanup
2023-06-23 22:47:25 +00:00
Oto Petřík
2a5abb10fc
fix(vm): Make vm_id computed (#367)
* fix(vm): Make vm_id computed, fix #364

Defaulting vm_id to -1 prevents resources depending on vm_id value.
Make vm_id computed, also update existing vm_id = -1 with correct vm_id.

* update examples to use auto-generated `vm_id`s

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-06-07 19:40:39 -04:00
zoop
9fa92423b5
feat: SSH-Agent Support (#306)
* chore: add agent configuration bool

* feat: add ssh-agent authentication mechanism for linux

* chore: make sure ssh-agent auth is only executed on linux

* chore: add ssh user override

* chore: add ssh configuration block, check ssh config during VirtualEnvironmentClient creation

* fix: handle case of empty ssh config block

* chore: add ssh password auth fallback logic

* fix: remove not needed runtime

* fix linter errors & re-format

* allow ssh agent on all POSIX systems

* add `agent_socket` parameter

* update docs and examples

---------

Co-authored-by: zoop <zoop@zoop.li>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-05-22 13:34:24 -04:00
Remko Molier
97ca22abbb
fix(vm): Fix IPv6 handling (#319)
* fix: Fix IPv6 handling in resource "virtual_environment_vm"

* also use "*IPv6Address" keys

---------

Co-authored-by: Remko Molier <remko.molier@kuehne-nagel.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-05-03 20:36:10 -04:00
Pavel Boldyrev
2fa922930f
chore: cleanup and fix linter errors (#290) 2023-04-05 00:04:12 +00:00