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

25 Commits

Author SHA1 Message Date
Marco Attia
2d9e0b585e
feat: add support for 'import' content type in Proxmox file resources (#1983)
Signed-off-by: Marco Attia <54147992+Vaneixus@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>
2025-06-27 21:23:22 -04:00
cgeopapa
0aa2b505e5
fix(file): fix for datastore does not support content type "dump" (#1752)
* fix(provider): fix for datastore does not support content type "dump"

Signed-off-by: cgeopapa <cgeocodgod@gmail.com>

* fix: move ContentType override further in the flow

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

* fix: update docs

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

---------

Signed-off-by: cgeopapa <cgeocodgod@gmail.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2025-02-08 22:20:12 -05:00
Pavel Boldyrev
ca227179a6
chore(docs): clarify use of dump content type inproxmox_virtual_environment_file resource (#1635)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-11-11 23:26:17 +00:00
Sven Greb
cc9d0e7131
feat(file): add support to set the file mode (#1478)
* feat(file): Add support to set the file mode

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

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

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

Related to GH-570
Related to GH-733

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


---------

Signed-off-by: Sven Greb <development@svengreb.de>
2024-08-13 21:28:48 -04:00
Pavel Boldyrev
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
Pavel Boldyrev
b6af836386
misc: update documentation
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-05-05 22:27:18 -04:00
Pavel Boldyrev
c14b7ebe1d
chore(docs): minor documentation updates (#1200)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-04-10 02:07:22 +00: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Dan Petersen
612ad45a30 Update docs 2021-02-10 05:05:26 +01:00
Dan Petersen
ae82c5768f Rename doc files 2021-02-10 04:48:18 +01:00