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

282 Commits

Author SHA1 Message Date
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
Pavel Boldyrev
27dbcad5cd
chore: minor cleanups and doc updates (#1108)
* Fix some obvious errors, remove dead code
* Add instructions for manually adding public key to authorized_keys file
* Add GitHub context dump step and update testacc workflow condition
---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-03-09 23:20:44 -05:00
Pavel Boldyrev
171dd2f234
chore(docs): minor improvements around SSH private key usage (#1091)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-03-05 00:57:37 +00: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
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
2c6d3ad01d
feat(provider): add support for private key authentication for SSH (#1076)
* feat(provider): add support for private key authentication for SSH

Also fix bunch of issues with acceptance tests

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-03-02 11:10:42 -05: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
60fb679e9f
fix(file): use sudo for snippets upload (#1004)
* fix(file): use `sudo` for snippets upload

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

* fix: linter

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

* fix: no more rm -rf

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

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-02-05 21:28:28 -05:00
Eusebius1920
6bd8ba566a
docs: update sudo configuration to a more restrictive variant (#1001)
Signed-off-by: Daniel Schlosser <8429638+Eusebius1920@users.noreply.github.com>
Co-authored-by: Daniel Schlosser <8429638+Eusebius1920@users.noreply.github.com>
2024-02-04 00:38:26 -05:00
Pavel Boldyrev
49a76bb1a1
fix(docs): fix documentation tree structure in the TF registry (#980)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-27 22:16:53 -05:00
Pavel Boldyrev
c39494b939
feat(docs): rename howtos -> guides and publish to the Terraform Registry (#971)
feat(docs): rename howtos -> guides and publish on the registry page

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-27 16:45:56 -05:00
Pavel Boldyrev
da1d7804af
feat(provider): add SOCKS5 proxy support for SSH connections (#970)
* feat(provider): add support for SOCKS5 proxy for SSH connection.

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

* fix: linter

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

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-27 20:09:14 +00:00
Pavel Boldyrev
01a8f9779c
fix(vm): regression: sudo: command not found when creating a VM (#966)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-26 20:27:25 -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
9d764e5889
feat(provider): use sudo to execute commands over SSH (#950)
* feat(provider): use `sudo` to execute commands over SSH

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

* fix: simplify everything, use sudo per command

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

* feat: add documentation

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

* minor doc fix

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

* chore: cleanup docs

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

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-21 21:44:12 -05:00
Robert Kaussow
01ff2cb7db
feat: add min-tls option to provider config (#931)
* feat: add min-tls option to provider config

Signed-off-by: Robert Kaussow <mail@thegeeklab.de>

* fix: clenup code and add min-tls to file resource

Signed-off-by: Robert Kaussow <mail@thegeeklab.de>

* fix: linter errors, wrong schema type in file resource

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

* chore: update docs

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

---------

Signed-off-by: Robert Kaussow <mail@thegeeklab.de>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-19 20:26:14 -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
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]
85109cbe3d
chore(docs): update activesupport (7.1.2 → 7.1.3) (#925)
| datasource | package       | from  | to    |
| ---------- | ------------- | ----- | ----- |
| rubygems   | activesupport | 7.1.2 | 7.1.3 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-17 19:06:42 -05:00
renovate[bot]
93283ef3ab
chore(docs): update jekyll (3.9.3 → 3.9.4) (#921)
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| rubygems   | jekyll  | 3.9.3 | 3.9.4 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-17 18:45:48 -05:00
renovate[bot]
2f074d6b2d
chore(deps): update just-the-docs (0.5.4 → 0.7.0) (#898)
| datasource | package       | from  | to    |
| ---------- | ------------- | ----- | ----- |
| rubygems   | just-the-docs | 0.5.4 | 0.7.0 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-16 05:20:06 +00:00
renovate[bot]
9a0b8979be
chore(deps): update activesupport (7.0.7.1 → 7.1.2) (#897)
| datasource | package       | from    | to    |
| ---------- | ------------- | ------- | ----- |
| rubygems   | activesupport | 7.0.7.1 | 7.1.2 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-16 00:18:49 -05:00
renovate[bot]
2edf2cbb1d
chore(deps): update tzinfo-data (1.2023.3 → 1.2023.4) (#896)
| datasource | package     | from     | to       |
| ---------- | ----------- | -------- | -------- |
| rubygems   | tzinfo-data | 1.2023.3 | 1.2023.4 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-16 04:26:00 +00:00
renovate[bot]
65f429e81c
chore(deps): update jekyll (3.9.3 → 3.9.4) (#894)
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| rubygems   | jekyll  | 3.9.3 | 3.9.4 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-15 23:25:00 -05:00
Tom Stokes
10dbfddc57
fix(docs): fix indentation in virtual_environment_container.md (#882)
Fix incorrect indentation in `disk` block which caused the `size` parameter to render incorrectly.

Signed-off-by: Tom Stokes <tomstokes@radixengineering.com>
2024-01-11 19:34:01 -05:00
Pavel Boldyrev
74e0ef3b1e
fix(doc): typos in proxmox_virtual_environment_file resource (#872)
fix(doc): typos in `proxmox_virtual_environment_file` resource doc

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-09 21:40:55 -05:00
Pavel Boldyrev
2677445802
chore(docs): update provider documentation with more details about token use (#846)
* chore(doc): cleanup changelog

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

* fix(doc): update provider's documentation

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>

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-01-03 22:45:11 -05: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
bitchecker
34df9773c3
fix(provider): allow FQDN for ssh.node.address in provider's config (#824)
* 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>
2023-12-20 19:40:11 -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
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
Taras
8bf26099e0
feat(lxc)!: allow to update features, add mount type support (#765)
* 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>
2023-12-06 16:18:05 -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
d5193b3e9b
fix(docs): improve documentation for container feature flags (#747)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-11-28 14:30:01 -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
DanielHabenicht
3280370155
feat(file): rename content type backup -> dump for backups (#724)
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>
2023-11-16 20:54:48 -05:00
Daniele De Lorenzi
0eeb7a7fd9
feat(vm): Add Win 11 as os type (#720) 2023-11-16 13:55:34 +00:00
TheNotary
0bf3a2aea3
chore(docs): update hostpci id to mentions requirement around root user (#710)
Signed-off-by: TheNotary <799247+TheNotary@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-11-12 02:03:38 +00:00
DanielHabenicht
e45c1c8126
fix(docs): add SSH info box to ressources needing it (#690)
* Update virtual_environment_file.md
* Update proxmox_virtual_environment_file readme

Signed-off-by: DanielHabenicht <daniel-habenicht@outlook.de>

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-11-11 20:11:16 -05:00
TheNotary
d61cdc2b5c
chore(docs): update VM ip address to mention the CIDR suffic requirement (#697)
docs: update VM ip address to mention the CIDR suffic requirement

Signed-off-by: TheNotary <799247+TheNotary@users.noreply.github.com>
2023-11-09 18:44:11 -05:00
Pavel Boldyrev
3f582d8163
fix(provider): sanitize PVE endpoint value (#686)
Ignore `/api2/json` path in case it is present in the endpoint.

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-11-06 00:30:43 +00: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
e2e5b4e344
fix(docs): document qemu-guest-agent behavior (#670)
fix(docs): Document qemu-guest-agent behavior

Modify example to start with disabled guest agent.

Signed-off-by: Oto Petřík <oto.petrik@gmail.com>
2023-10-30 21:10:34 -04:00
Pavel Boldyrev
f6f05a56e4
fix(doc): update README.md and file resource documentation (#659)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-10-29 14:12:24 -04:00
Pavel Boldyrev
a30f96c348
feat(vm): add configurable timeout for VM create operation (#648)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-10-24 22:13:15 -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
Oto Petřík
06ad00463c
feat(provider): configure temp directory (#607)
* 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>
2023-10-07 21:00:34 -04:00
Simon Caron
d36cf4eab8
feat(lxc): add support for the start_on_boot option (#605)
* 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>
2023-10-07 20:08:09 -04: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
Pavel Boldyrev
5e24a75d09
feat(file): add optional overwrite flag to the file resource (#593)
* chore: add file test

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

* add file updated test, file_name / ID is getting changed :/

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

* more tests, refactor file's read, more consistency in the attributes
TODO: need to check backward compatibility

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

* fix error message, enable import test

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

* more tests

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

* more tests for owerwrite, update docs

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

* fix tests on CI

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

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-09-28 22:07:04 -04:00
Pavel Boldyrev
03f3ed7871
fix(cluster): inconsistencies in applying cluster options (#573)
* fix(cluster): inconsistencies in applying cluster options

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

* address review comments

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

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-09-23 08:04:52 -04:00
Eric B
7dde53cf1c
chore(docs): update proxmox_virtual_environment_file documentation (#580)
* Update virtual_environment_file.md

* Update virtual_environment_file.md

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-09-21 20:33:47 -04:00
Pavel Boldyrev
5720fe4673
fix(network): remove computed flag from mtu attribute (#572)
* chore(code): refactor & update network tests

* fix(network): remove `computed` flag from `mtu` attribute

* chore: revert accidentally committed files

* chore: update docs
2023-09-19 21:41:25 -04:00
Pavel Boldyrev
7d064a8b27
chore(code): re-organize and cleanup "fwk provider"'s code (#568)
* chore(code): code cleanup / renaming

* chore(code): flatten and rename fw provider package

* chore(code): refactor & update network tests
2023-09-17 22:50:24 +00:00
Rafał Safin
de8b4ec41a
feat(cluster): add cluster options resource (#548) 2023-09-12 07:49:03 -04:00
Pavel Boldyrev
7ace07dfa4
feat(file): FORMAT CHANGE: update import id, so it matches the resource's format: <node_name>/<datastore_id>:<content_type>/<file> (#543)
* feat(file): FORMAT CHANGE: update **import id**, so it matches the resource's format: `<node_name>/<datastore_id>:<content_type>/<file>`

* better example
2023-09-04 20:29:58 +00:00
Simon Caron
8ce9006eed
feat(lxc): add support for keyctl and fuse features (#537) 2023-09-04 10:44:49 -04:00
Rafał Safin
124cac247c
feat(provider): add optional SSH port param to node in provider ssh block (#520)
* feat: Add optional SSH port param to node in provider ssh block

* fix: minor cleanups

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-09-02 19:43:08 -04:00
dependabot[bot]
cd7927bec3
chore(deps): bump activesupport from 7.0.6 to 7.0.7.1 in /docs (#522)
Bumps [activesupport](https://github.com/rails/rails) from 7.0.6 to 7.0.7.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.0.7.2/activesupport/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.0.6...v7.0.7.1)

---
updated-dependencies:
- dependency-name: activesupport
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-29 00:22:05 +00:00
Oto Petřík
5599c7afe4
fix(provider): User-settable VLAN ID and name (#518)
* fix(provider): User-settable VLAN ID and name

By default resource `proxmox_virtual_environment_network_linux_vlan`
uses `name` to determine both the actual raw device for VLAN and
VLAN ID.

Since ifupdown2 (manually installed on PVE6, installed by default
since PVE7), it is possible to have VLAN name not tied to VLAN ID.

Make `interface` and `vlan` configurable by user.

* fix: update schema to ensure the correct docs generation.

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-08-28 20:19:10 -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
03c9b36b86
feat(ha): add support for Proxmox High Availability objects (#498)
* chore: fix a pair of typos in comments

* feat(api): list High Availability groups

  * New clients created for HA and HA groups (via
    `Cluster().HA().Groups()`)
  * `List(ctx)` method that lists the cluster's High Availability groups

* feat(ha): added the `proxmox_virtual_environment_hagroups` data source

  * This data source returns the list of HA groups in its value's
    `group_ids` field

* fix(api): changed incorrect copy-pasted error message

* feat(api): get a HA group's full information

  * Added a `Get()` method to the HA group client, which fetches a
    single group's information based on its identifier.

* feat(ha): added the `proxmox_virtual_environment_hagroup` data source

  * This data source can read information about a single Proxmox High
    Availabillity group from the cluster.

* chore(ha): fixed linter error

* test(ha): added schema tests for the HA groups data sources

* fix(ha): use -1 as a node's priority when no priority is defined

  * It used to default to 0, which is a valid value for priorities.

* chore(ha): converted the `hagroups` datasource to the Terraform plugin SDK

* chore(refactoring): common definition for `id` attributes

* chore(ha): ported the HA group datasource to the Terraform plugin framework

* feat(ha): return HA group identifiers as a set rather than a list

* docs(ha): added examples for the hagroups/hagroup datasources

* docs(ha): added documentation for the hagroup{,s} datasources

* chore(ha): fixed linter errors

* chore(ha): workaround for the linter's split personality disorder

* fix(ha): fixed reading the restricted flag

* chore(refactoring): use `ExpandPath` for paths to the HA groups API

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

* feat: CustomBool to Terraform attribute value conversion method

* chore(refactoring): use `CustomBool` for boolean fields in the API data

* chore(refactoring): renamed "members" to "nodes" in the HA group datasource

* fix: typo in comment

* chore(refactoring): split HA group API data and added the update request body

* fix(api): fixed copy-pasted error message

* feat(api): method to create/update a HA group

* feat(api): HA group deletion method

* fix(api): made the digest optional for HA groups

* feat(ha): added unimplemented hagroup resource

* fix(ha): fixed copy-pasted comment

* feat(ha): schema definition for the HA group resource

* feat: helper function that converts string attr values to string pointers

* fix(ha): ensure node priorities are <= 1000 in HA groups

* fix(ha): add the digest attribute to the schema

* feat(ha): model definition for the HA group resource

* fix(api): fixed incorrect error message

* fix(api): fixed HA group creation / update

  * I had somehow misunderstood the Proxmox API doc and thought creation
    and update went through the same endpoint. This has been fixed by
    adding separate data structures and separate methods for both
    actions.

* feat: Terraform/Proxmox API conversion utilities

* chore(refactoring): HA group model and reading code moved to separate file

* feat(ha): HA group creation

* fix(api): renamed method (missed during previous refactor)

* feat(ha): `Read()` method implemented for the `hagroup` resource

* chore(refactoring): more consistent variable naming

* fix(ha): fixed the behaviour of `Read()` when the resource is deleted externally

* feat(ha): implement HA group deletion

* feat(ha): HA group update implemented

* fix(ha): prevent empty or untrimmed HA group comments

* feat(ha): HA group import

* docs(ha): HA group resource examples

* docs(ha): generated documentation for the `hagroup` resource

* chore(ha): fixed linter errors

* chore(refactoring): updated the code based on changes to the datasource PR

* fix(api): fixed boolean fields in the HA group create/update structures

* fix(ha): removed digest from the HA group resource and datasource

  * The digest is generated by Proxmox from the *whole* HA groups
    configuration, so any update to one group causes changes in all
    other groups.
  * Because of that, using it causes failures when updating two or more
    HA groups.
  * It is also a pretty useless value to have in the datasource, as it
    is global and not actually related to the individual data items

* chore(refactoring): removed obsolete type conversion code

* chore(refactoring): use `ExpandPath` in the HA groups API client

* feat(ha): custom type for HA resource states

* feat(ha): custom type for HA resource types

* fix(api): fixed JSON decoding for HA resource states and types

  * Values were being decoded directly from the raw bytes.
  * Added tests for JSON marshaling/unmarshaling

* feat(api): custom type for HA resource identifiers

  * Structure with a type and name
  * Conversion to/from strings
  * Marshaling to/Unmarshaling from JSON
  * URL encoding

* feat(api): list and get HA resources

* feat(ha): HA resources list datasource

* feat(ha): added method that converts HA resource data to Terraform values

* fix(api): HA resource max relocation/restarts are optional

* feat(ha): Terraform validator for HA resource IDs

* feat(ha): HA resource datasource

* chore(refactoring): moved HA resource model to separate file

* feat(api): data structures for HA resource creation and update

* feat(api): HA resource creation, update and deletion

* fix(api): incorrect mapping in common HA resource data

* feat: utility function to create attribute validators based on parse functions

* feat: validators for HA resource identifiers, states and types

* fix(api): incorrect comment for the update request body

* feat(ha): Terraform resource for Proxmox HA resources

* chore(reafactoring): removed old HA resource ID validator

* docs: examples related to HA resources added

* docs: added documentation related to HA resources management

* fix: update doc generation, fix minor typos

* fix: rename & split utils package, replace `iota`

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-08-20 21:42:12 +00: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
dependabot[bot]
2e16fbb44b
chore(deps-dev): bump commonmarker from 0.23.9 to 0.23.10 in /docs (#472)
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.9 to 0.23.10.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/v0.23.10/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.9...v0.23.10)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-10 15:19:22 +00:00
dandaolrian
f901e711dd
feat(file): ensure upload of ISO/VSTMPL is completed upon resource creation (#471)
* feat(provider): ensure upload of ISO/VSTMPL completes before starting VM and add timeout to config for this

* remove `ForceNew: true` for the timeout attribute

* minor docs update

---------

Co-authored-by: dandaolrian <dandaolrian@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-08-10 11:01:14 -04: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
5a3b1ccaf7
fix(user): make password attribute optional (#463) 2023-08-05 22:57:08 +00:00
Pavel Boldyrev
a3b95c8053
chore: update dependencies, cleanup docs (#446) 2023-07-30 16:24:53 +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
Pavel Boldyrev
8e2d18053f
chore(docs): Update README.md (#442)
* chore(docs): update gems

* chore(docs): update README.md
2023-07-26 23:55:38 +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
e9a9fd76da
feat: add more valid cpu types (#411)
* add more valid cpu types

(cherry picked from commit c62e76707b897912628adc7dda0871b3146c7aa8)

* add docs

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-07-05 01:41:10 +00:00
Leah
4147ff6a29
feat: add import support for a lot of resources (#390)
* add import support for a lot of resources

* fix lints

* set user_id after importing

(cherry picked from commit c3d09ed00f6e1d7b0bb3ab01a1fc5c81510aa2e1)

* add tests, fix empty ID

* add import docs

* fix lint
2023-07-04 21:37:14 -04:00
Rafał Safin
b0b5fa1532
fix(docs): minor firewall options page improvement (#396)
docs: minor firewall options docs improvement
2023-07-02 23:34:06 +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
Pablo Escobar Lopez
0aa33f0929
fix(docs): Update documentation for resource proxmox_virtual_environment_firewall_ipset (#366)
Fix docs for resource proxmox_virtual_environment_firewall_ipset
2023-06-06 22:37:08 -04:00
Pavel Boldyrev
9587c6383c
chore(doc): project documentation update (#356) 2023-06-01 11:48:41 +00:00
Pavel Boldyrev
80c94a5126
feat(v): Add ability to override node IP used for SSH connection (#355)
* feat(v): Add ability to override node IP used for SSH connection

* add documentation
2023-05-31 21:15:48 -04:00
Pavel Boldyrev
ab54aa1092
feat(core): Add API Token authentication (#350)
* feat(core): Add API Token authentication

* fix linter errrors

* update docs
2023-05-29 21:56:21 -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
dependabot[bot]
672249246f
chore(deps): bump nokogiri from 1.14.2 to 1.14.3 in /docs (#299)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.14.2 to 1.14.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.14.2...v1.14.3)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-04-14 23:38:25 +00:00
dependabot[bot]
fc4a6e8ace
chore(deps): bump commonmarker from 0.23.8 to 0.23.9 in /docs (#298)
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.8 to 0.23.9.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.8...v0.23.9)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-14 19:36:31 -04:00
Pavel Boldyrev
f4783f8cda
fix(firewall): Add support for firewall flag for LXC/VM net adapters (#295) 2023-04-09 23:59:40 +00:00
Henri Williams
f9e263ad5e
feat(vm): add support for boot_order argument for VM (#219)
* feat(vm): add support for 'boot_order and boot_disk flags for VM

* refactoring (1)

* refactor to use only boot_order argument

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-04-07 15:35:38 -04: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
dependabot[bot]
fc08e19f86
chore(deps): bump activesupport from 7.0.4.2 to 7.0.4.3 in /docs (#285)
Bumps [activesupport](https://github.com/rails/rails) from 7.0.4.2 to 7.0.4.3.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.0.4.3/activesupport/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.0.4.2...v7.0.4.3)

---
updated-dependencies:
- dependency-name: activesupport
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-02 18:23:30 -04: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
db7afe2e4a
chore: add missing docs (#283)
* added documentation for #282

* add contributor's note to the PR template
2023-04-02 19:35:10 +00: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
696ecb05d8
chore(docs): Minor documentation Improvements (#266)
* add port to endpoint + examples to the root doc

* clarify disk `interface` values
2023-03-18 01:31:19 +00:00
dependabot[bot]
ce8bd3008b
chore(deps): bump activesupport from 6.1.7.1 to 6.1.7.3 in /docs (#263)
Bumps [activesupport](https://github.com/rails/rails) from 6.1.7.1 to 6.1.7.3.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.0.4.3/activesupport/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v6.1.7.1...v6.1.7.3)

---
updated-dependencies:
- dependency-name: activesupport
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 22:12:22 -04:00
Pavel Boldyrev
5b9e6eba05
add missing custom CPU model documentation 2023-03-12 21:07:51 -04:00
Tuomas Salmi
4d447390e6
feat(lxc): Add option for nested container feature (#251)
feat: Add option for nested container feature
2023-03-08 20:26:04 -05:00
dependabot[bot]
ffa39c13e0
chore(deps): bump activesupport from 6.0.6.1 to 6.1.7.1 in /docs (#235)
Bumps [activesupport](https://github.com/rails/rails) from 6.0.6.1 to 6.1.7.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.0.4.2/activesupport/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v6.0.6.1...v6.1.7.1)

---
updated-dependencies:
- dependency-name: activesupport
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 23:42:17 -05:00
Cameron
19185611b3
feat(lxc): Add unprivileged option (#225)
* feat: Add unprivileged parameter for containers

* feat: make modifying the unprivileged option recreate the resource

* feat: add unprivileged to tests

* docs: Add unprivileged argument

---------

Co-authored-by: cditchfield <cditchfield@thoughtmachine.net>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-02-05 17:30:05 -05:00
Pavel Boldyrev
e0864c098a
chore(deps): bump gem dependencies in /docs (#221) 2023-01-25 05:01:59 +00:00
dependabot[bot]
cef0227ef5
chore(deps): bump commonmarker from 0.23.6 to 0.23.7 in /docs (#220)
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.6 to 0.23.7.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.6...v0.23.7)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-24 23:37:33 -05:00
Pavel Boldyrev
06bd5aef0f
chore: set up code coverage (#215)
* chore: set up code coverage

* reformat docs
2023-01-22 23:58:52 -05:00
Moyiz
5c8ae3c3f8
feat(lxc): Add support for container tags (#212) 2023-01-21 21:39:12 -05:00
Pavel Boldyrev
bf9e31ecfc
chore: lint and reformat the code (#204)
* chore: reformat code

* chore: add commitlint config

* reformat README.md

* add linter config

* lint & reformat docs

* go linter: only new issues

* fix some linting errors

* more reformatting

* disable linter warning for some duplicated code
2023-01-16 18:07:30 -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
kaje783
8bd3fd7b1d
feat(vm): add support for "args" flag for VM (#205)
* feat: add support for "args" flag for VM

* switch from args to kvmarguments, update type

* cosmetics: `kvmarguments` -> `kvm_arguments`

also update doc to match description from the official PVE documentation.

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-01-14 21:42:10 -05:00
Gertjan Roggemans
79a2101933
feat(vm): Add cloud-init network-config support (#197)
* feat: Add cloud-init network-config support

* add documentation entry

* fix re-apply use case

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-01-01 18:17:08 -05:00
Frank Villaro-Dixon
60a68184cf
feat(vm): OnBoot: change default to true (#191)
vm: OnBoot: change default to `true`

The `on_boot` parameter is used to start a VM when the
node reboots. As the VM infrastructure should not really care whether
an hypervisor has rebooted, we change the default value from `false` to
`true` in order to make it explicit not to start the VM on reboot.

Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>

Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
2022-12-29 14:30:32 -05:00
Pavel Boldyrev
01d20504a1
feat: Add hostpci support (#194)
* feat: Add `hostpci` support

* document `machine` argument

* fix `rombar` argument name
2022-12-28 22:14:48 -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
Pascal Wiedenbeck
0df14f9d6a
feat: add the ability to clone to non-shared storage on different nodes (#178)
* feat: add workaround for cloning to non-shared storage

* fix: fix wrong API params used

* test: add new var to tests

* fix: lint issues

* docs: add new argument to docs

* docs: fix function documentation

* fix: better work with heterogeneous datastores

* docs: clarify clone behavior

* fix: go lint issues

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2022-12-12 16:28:53 -05:00
dependabot[bot]
33bb919b4f
chore(deps): bump nokogiri from 1.13.9 to 1.13.10 in /docs (#177) 2022-12-08 00:00:47 -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
8116053239
chore: update docs (#161)
* chore: update docs

* add auto-label for /docs
2022-10-26 00:13:09 +00:00
dependabot[bot]
523c244856
chore(deps): bump nokogiri from 1.13.8 to 1.13.9 in /docs (#147) 2022-10-21 09:24:51 -04:00
dependabot[bot]
769dea4c48
Bump commonmarker from 0.23.5 to 0.23.6 in /docs (#127)
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.5 to 0.23.6.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.5...v0.23.6)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-27 20:58:46 -04:00
Pavel Boldyrev
442b60c8f9
Fix storing of "disk.iothread" in TF state
Add missing doc entry

Relates to #87
2022-07-29 21:54:58 -04:00
dependabot[bot]
7799010cbb
Bump tzinfo from 1.2.9 to 1.2.10 in /docs (#95)
* Bump tzinfo from 1.2.9 to 1.2.10 in /docs

Bumps [tzinfo](https://github.com/tzinfo/tzinfo) from 1.2.9 to 1.2.10.
- [Release notes](https://github.com/tzinfo/tzinfo/releases)
- [Changelog](https://github.com/tzinfo/tzinfo/blob/master/CHANGES.md)
- [Commits](https://github.com/tzinfo/tzinfo/compare/v1.2.9...v1.2.10)

---
updated-dependencies:
- dependency-name: tzinfo
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* update Gemfile.lock

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2022-07-23 20:54:44 -04:00
Pavel Boldyrev
192cbd5e3d
Upgrade the provider codebase to use Terraform SDK v2 (#91)
* Update TF SDK using `tf-sdk-migrator v2upgrade`
Address some linter issues
Clean up `resource_virtual_environment_file.go` (still, error handling is not ideal)

* few minor cleanups

* Clean up, add context and diagnostics to `resource_virtual_environment_vm.go`

* Clean up, add context and diagnostics to `resource_virtual_environment_container.go`

* Clean up, add context and diagnostics to `resource_virtual_environment_container.go`

* Update remaining resources and data sources

* fix `make example`... now it actually uses the built provider 🤦

* propagate Context everywhere
use tflog.* for logging

* add support for debug flag

* fix old issues with:
- setting `resource_virtual_environment_file.changed` attribute
- setting `resource_virtual_environment_cluster_ipset.cidr` attributes
- setting `data_source_virtual_environment_user.groups` and `.keys` attributes

* bump dependencies

* minor cleanups

* Bump Go to v1.18
Dropped support for TF v0.x

* more cleanups

* update README.md

* update PR template

* update release.yml
2022-07-14 12:20:30 -04:00
dependabot[bot]
416d737a7f
Bump octokit from 4.23.0 to 4.25.0 in /docs (#84)
Bumps [octokit](https://github.com/octokit/octokit.rb) from 4.23.0 to 4.25.0.
- [Release notes](https://github.com/octokit/octokit.rb/releases)
- [Changelog](https://github.com/octokit/octokit.rb/blob/4-stable/RELEASE.md)
- [Commits](https://github.com/octokit/octokit.rb/compare/v4.23.0...v4.25.0)

---
updated-dependencies:
- dependency-name: octokit
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-17 17:39:15 -04:00
Pavel Boldyrev
836131b7c0
Bump dependencies (#78) 2022-05-29 22:34:02 -04:00
Pavel Boldyrev
86719256dc
Update docs (#57)
* more docs update

* add some badges

* cleanup .MDs

* update .lock

* add cloud-config to the example doc
2022-05-23 23:43:12 -04:00
dependabot[bot]
f95ed68b2b
Bump nokogiri from 1.13.4 to 1.13.6 in /docs (#72)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.4 to 1.13.6.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.4...v1.13.6)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-19 13:43:56 -04:00
dependabot[bot]
57c162d4d5
Bump nokogiri from 1.13.3 to 1.13.4 in /docs (#59)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.3 to 1.13.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/v1.13.4/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.3...v1.13.4)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 10:55:51 -04:00
Pavel Boldyrev
ae39b8b481
Bump docs dependencies 2022-03-04 00:04:14 -05:00
dependabot[bot]
bcd20085c4
Bump nokogiri from 1.12.5 to 1.13.3 in /docs (#43)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.12.5 to 1.13.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.12.5...v1.13.3)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-26 12:35:49 -05:00
dependabot[bot]
35775087ac
Bump nokogiri from 1.12.4 to 1.12.5 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.12.4 to 1.12.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.12.4...v1.12.5)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-28 06:03:59 +00:00
Pavel Boldyrev
bd798531e3
rename branch master -> main 2021-09-09 12:33:48 -04:00
Pavel Boldyrev
380f07c3e2
Update project to use bpg/terraform-provider-proxmox 2021-09-09 12:20:19 -04:00
Pavel Boldyrev
a688bb7ed8
Bump kramdown from 2.3.0 to 2.3.1 in /docs 2021-09-09 11:41:28 -04:00
Pavel Boldyrev
c3ce3fc056
Merge pull request #4 from bpg/dependabot/bundler/docs/nokogiri-1.12.4 2021-09-08 22:49:11 -04:00
dependabot[bot]
097caa691c
Bump nokogiri from 1.11.1 to 1.12.4 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.1 to 1.12.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.1...v1.12.4)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-09 02:48:50 +00:00
Pavel Boldyrev
406ad44bb5
Merge pull request #5 from bpg/dependabot/bundler/docs/rexml-3.2.5 2021-09-08 22:48:48 -04:00
dependabot[bot]
55e779b1f8
Bump addressable from 2.7.0 to 2.8.0 in /docs
Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/sporkmonger/addressable/releases)
- [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.7.0...addressable-2.8.0)

---
updated-dependencies:
- dependency-name: addressable
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-09 00:47:54 +00:00
dependabot[bot]
30f533ddd4
Bump rexml from 3.2.4 to 3.2.5 in /docs
Bumps [rexml](https://github.com/ruby/rexml) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.2.4...v3.2.5)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-09 00:47:46 +00:00