0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-30 18:42:58 +00:00
Commit Graph

99 Commits

Author SHA1 Message Date
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
Szczepan Wiśniowski
ed3dfeae99
fix(provider): Deprecate virtual_environment block (#288)
refactor(provider): Allow specifying attributes outside of virtual_environment block

Also deprecate virtual_environment block, update docs and examples.

Fixes #117
Apparently CDKTF skips schemas without attributes, it has been fixed but it is available only in prerelease currently (https://github.com/hashicorp/terraform-cdk/pull/2736)

Release-As: 0.17.0
2023-04-04 19:55:48 -04:00
Pavel Boldyrev
1bfc29e2cc
fix(firewall): fw controls bugfixes (#287)
fix(firewall): fw controls bugfixes

- fix alias examples in docs
- docs & examples improvements
- add support for security group insertion

Release-As: 0.17.0-rc2
2023-04-04 00:42:35 +00:00
Pavel Boldyrev
98e1cff7fe
feat: Add firewall resources (#246)
* refactoring existing cluster / firewall API for better composition

* add basic security groups API
fix linter errors

* add rules API

* fix after renaming resourceVirtualEnvironmentClusterIPSet

* fix linter errors

* make linter happy

* even more refactoring

* tidy up datasources

* in refactoring spree

* update examples

* fix firewall resource/datasource & client error handling

* add ipset(s) datasource

* update docs

* add security group resource with rules

* docs

* fix security group update, TODO: rule update

* fix after rebase

* add rule update, extract common rule schema, refactor group

* fix linter  errors

* bump linter for ci

* make alias and ipset reusable

* make security group reusable

* refactor datasources

* add security group datasources

* fix linter errors

* update docs

TODO: documentation for group datasources

* add sg docs, update doc index

* minor cleanup

* fix examples & tests

* stub for firewall-level options and rules

* extract firewall interface

* add firewall options and rules on the cluster level

TODO: issues with rule list management

* refactor all resources format AGAIN, now more flat, without complex subresources

* sort out hierarchy of APIs and remove duplication in API wrappers

* bring back security group

* finally, working rules

* restore cluster firewall option

* add containers support

* add options

* move rules back under security group, update docs

* fix vm_id / container_id attrs

* add examples

* cleanup

* more cleanup


Release-As: 0.17.0-rc1
2023-04-02 18:01:10 -04:00
Pavel Boldyrev
c2d3f46474
feat(vm): Add bare minimum VM datasource (#268)
* feat(vm): Add a bare minimum VM datasource

* fix linter errors

* fix doc

* add lookup across all nodes in the cluster, add filter by tags

* stable vm list

* fix linter errors

* pr feedback: switch to dynamic id for vms

* add datasource examples

* add unit tests

* Update virtual_environment_vms.md
2023-03-22 01:52:58 +00:00
Pavel Boldyrev
914631f58b
fix(build): Fix make example-init for TF 1.4 (#262)
* fix(build): Fix make example-init for TF 1.4

* add 1.4.2 to versions list
2023-03-16 22:09:41 -04:00
Pavel Boldyrev
fcf9810252
feat(vm): update VM disc import logic (#241)
* feat(vm): updated VM disc import logic

fixes: #187, #203

* ignore linter error
2023-02-17 16:53:06 -05:00
Moyiz
5c8ae3c3f8
feat(lxc): Add support for container tags (#212) 2023-01-21 21:39:12 -05:00
Pavel Boldyrev
dd9ffe190c
feat(lxc): Add option to customize RootFS size at LXC creation (#207)
* feat(lxc): Add option to customize RootFS size at LXC creation

* force container re-create if size changes
2023-01-15 23:17:45 -05:00
Abdelfadeel Farag
3c02cb1389
feat: add support for network_device MTU (#176)
* add support for network_device MTU

* add mtu to the example templates

* change default mtu 1500 -> 0, update docs

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2022-12-12 23:07:02 -05:00
Abdelfadeel Farag
290734655c
feat: add support for "ssd" disk flag for VM (#181)
* feat: add support for ssd flag

* update docs, add `ssd` to examples

* restore original .md formatting

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2022-12-12 22:31:33 -05:00
Szczepan Wiśniowski
722e01053b
fix: Check if any interface has global unicast address instead of all interfaces (#182)
* fix: Check if any interface has global unicast address instead of all interfaces

This allows us to have multiple interfaces and only one (instead of all) has to have assigned ip

* add multiple network devices to the example VM

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2022-12-11 16:29:25 -05:00
Pavel Boldyrev
63dc5cb8f6
fix: handling datastore_id in LXC template (#180) 2022-12-10 11:51:29 -05:00
michalg91
27665554de
fix: Remove cloned ide2 before creating new one (#174) (#175)
* fix: Remove cloned ide2 before creating new one (#174)

* add test case to `/examples`

Co-authored-by: Michał Gawryś <mgawrys@netbyte.pl>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2022-12-09 22:32:43 -05:00
Pavel Boldyrev
ade1d49117
feat: add support for VM tags (#169) 2022-11-25 23:23:50 -05:00
Pavel Boldyrev
9e34dfb362
feat: Add support for custom cloud-init vendor data file (#162)
* feat: Add support for custom cloud-init vendor data file

Add new argument `initialization`.`vendor_data_file_id` to specify a file ID form snippets.

* add vendor cloud-init to examples

* add missing `vendor` to unmarshal

* remove debug lines
2022-11-17 20:33:41 -05:00
Pavel Boldyrev
b09389f0a9
fix: Non-default VM disk format is not preserved in TF state (#134)
Fix disk format parsing from the volume string.
Add basic unit tests for disk volume string parsing.
2022-10-14 18:27:30 -04:00
Pavel Boldyrev
42e0e725a5
Add support for "discard" disk option for VM (#128) 2022-09-28 19:13:41 -04:00
Pavel Boldyrev
e9d2d607c1
Add support for "iothread" disk option for VM (#97) 2022-07-24 16:53:57 -04:00
Pavel Boldyrev
a595cba835
Add support for darwin_arm64 in Makefile & bump deps in examples (#56) 2022-04-02 00:39:35 -04:00
Pavel Boldyrev
d3f323e66b
map -> tomap TF API change 2021-09-09 20:41:59 -04:00
Pavel Boldyrev
380f07c3e2
Update project to use bpg/terraform-provider-proxmox 2021-09-09 12:20:19 -04:00
Dan Petersen
427db3d44a fix: example and makefile issues 2021-02-13 02:46:29 +01:00
Dan Petersen
53f1e93f21 Minor update to changelog and versions.tf. Added initial test workflow as a replacement for Travis 2021-02-10 00:13:53 +01:00
Dan Petersen
0fd8d3dae7 fix: missing reference to standalone terraform plugin and duplicate output names in example 2021-01-02 22:48:42 +01:00