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

1469 Commits

Author SHA1 Message Date
Pavel Boldyrev
68b337691b
fix after rebase
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-23 19:36:43 -04:00
Pavel Boldyrev
40af440cce
fix some linter errors
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-22 21:34:24 -04:00
Pavel Boldyrev
d91a559fb5
clone works
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-22 21:34:23 -04:00
Pavel Boldyrev
9f64647ed2
sorting out delete of optional + computed attrs
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-22 21:34:22 -04:00
Pavel Boldyrev
9eb497fa95
stopped at clone
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-22 21:34:21 -04:00
Pavel Boldyrev
b779317dba
create and read back basic cloud-init
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-22 21:34:17 -04:00
Pavel Boldyrev
2f766c1e8a
initial schema
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-22 21:33:50 -04:00
bpg-autobot[bot]
40373922fc
chore(main): release 0.65.0 (#1528)
Co-authored-by: bpg-autobot[bot] <155200059+bpg-autobot[bot]@users.noreply.github.com>
2024-09-21 20:02:42 -04:00
Pavel Boldyrev
14a62a712a
chore(lxc): update list of supported OS-es in operating_system.type (#1548)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-21 23:20:37 +00:00
Pavel Boldyrev
e23d2f375c
chore(docs): add example for host disk pass-through to VM (#1547)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-21 13:49:54 +00:00
renovate[bot]
b5a4e32d7a
chore(deps): update github.com/hashicorp/terraform-plugin-* (#1545)
| datasource | package                                         | from    | to      |
| ---------- | ----------------------------------------------- | ------- | ------- |
| go         | github.com/hashicorp/terraform-plugin-framework | v1.11.0 | v1.12.0 |
| go         | github.com/hashicorp/terraform-plugin-go        | v0.23.0 | v0.24.0 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-20 23:06:35 +00:00
Pavel Boldyrev
569db6df3b
fix(vm): handle more than 4 hostpci devices (#1543)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-20 19:04:45 -04:00
renovate[bot]
13ceab8205
chore(ci): update jetbrains/qodana-action action (v2024.1.9 → v2024.2.3) (#1544)
| datasource  | package                 | from      | to        |
| ----------- | ----------------------- | --------- | --------- |
| github-tags | JetBrains/qodana-action | v2024.1.9 | v2024.2.3 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-20 02:21:12 +00:00
Pavel Boldyrev
8f9b036857
chore(docs): improve network_linux_bridge documentation (#1538)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-16 22:32:05 +00:00
Pavel Boldyrev
44e2814adf
fix(file): respect download_file.override attr when checking for th… (#1537)
fix(file): respect `download_file.override` attr when checking for the file size change during update

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-16 22:02:25 +00:00
renovate[bot]
f1ce62eeeb
chore(docs): update terraform local (2.5.1 → 2.5.2) (#1535)
| datasource         | package         | from  | to    |
| ------------------ | --------------- | ----- | ----- |
| terraform-provider | hashicorp/local | 2.5.1 | 2.5.2 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-14 11:33:14 -04:00
renovate[bot]
a89cfbf045
chore(docs): update terraform tls (4.0.5 → 4.0.6) (#1536)
| datasource         | package       | from  | to    |
| ------------------ | ------------- | ----- | ----- |
| terraform-provider | hashicorp/tls | 4.0.5 | 4.0.6 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-14 11:32:59 -04:00
Pavel Boldyrev
f4ee6291cc
feat(vm): remove deprecated vga.enabled (#1533)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-11 22:20:29 +00:00
renovate[bot]
831207b0e3
chore(ci): update actions/create-github-app-token action (v1.10.4 → v1.11.0) (#1532)
| datasource  | package                         | from    | to      |
| ----------- | ------------------------------- | ------- | ------- |
| github-tags | actions/create-github-app-token | v1.10.4 | v1.11.0 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-11 22:12:03 +00:00
renovate[bot]
b96532f884
chore(deps): update golang.org/x/exp digest (e7e105d → 701f63a) (#1526)
| datasource | package          | from                               | to                                 |
| ---------- | ---------------- | ---------------------------------- | ---------------------------------- |
| go         | golang.org/x/exp | v0.0.0-20240904232852-e7e105dedf7e | v0.0.0-20240909161429-701f63a606c0 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-10 00:58:21 +00:00
renovate[bot]
356c978ece
chore(deps): update module github.com/golangci/golangci-lint (v1.60.3 → v1.61.0) in /tools (#1527)
* chore(deps): update module github.com/golangci/golangci-lint (v1.60.3 → v1.61.0) in /tools

| datasource | package                           | from    | to      |
| ---------- | --------------------------------- | ------- | ------- |
| go         | github.com/golangci/golangci-lint | v1.60.3 | v1.61.0 |

* disable gosec: G115 linter

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

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-09 20:55:46 -04:00
bpg-autobot[bot]
36835fae57
chore(main): release 0.64.0 (#1503)
Co-authored-by: bpg-autobot[bot] <155200059+bpg-autobot[bot]@users.noreply.github.com>
2024-09-08 19:29:29 -04:00
Pavel Boldyrev
c20d79dfbe
fix(vm): cpu.architecture showed as new attribute at re-apply after creation (#1524)
Fix for another use case of mismanaged default value. This one was a bit trickier to spot as it triggered only when provider is authenticated using root@pam, as architecture change is allowed only for root.

Removing default value altogether, as the PVE API default for this attribute is an empty string.

VM2 resource will have no such issue, related: #1310, #1311

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-08 19:25:40 -04:00
Pavel Boldyrev
35b6571bf4
chore(vm): add acc test for no cdrom by default (#1523)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-08 22:14:16 +00:00
Pavel Boldyrev
84d55cf569
fix(docs): improve "SSH User" section describing sudo privileges (#1522)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-08 21:29:53 +00:00
renovate[bot]
a0bce8d699
chore(deps): update module golang.org/x/net (v0.28.0 → v0.29.0) (#1520)
| datasource | package          | from    | to      |
| ---------- | ---------------- | ------- | ------- |
| go         | golang.org/x/net | v0.28.0 | v0.29.0 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-08 11:13:47 -04:00
renovate[bot]
3951bdab4a
chore(deps): update module golang.org/x/crypto (v0.26.0 → v0.27.0) (#1519)
| datasource | package             | from    | to      |
| ---------- | ------------------- | ------- | ------- |
| go         | golang.org/x/crypto | v0.26.0 | v0.27.0 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-08 11:13:34 -04:00
renovate[bot]
273b3c93b3
chore(deps): update golang.org/x/exp digest (9b4947d → e7e105d) (#1517)
| datasource | package          | from                               | to                                 |
| ---------- | ---------------- | ---------------------------------- | ---------------------------------- |
| go         | golang.org/x/exp | v0.0.0-20240823005443-9b4947da3948 | v0.0.0-20240904232852-e7e105dedf7e |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-08 11:08:48 -04:00
Sven Greb
9b34c485ab
feat(lxc): Implement support for container's "protection flag" (#1512)
* feat(lxc): Implement support for container's "protection flag"

The Proxmox VE types already has the `protection` API parameter [1],
but it is not exposed to the provider users.
This pull request implements the missing logic to make it available in
order to allow to protect containers against deletion/update operations,
including the container's disks.

[1]: https://github.com/bpg/terraform-provider-proxmox/blob/v0.63.0/proxmox/nodes/containers/containers_types.go#L59

Relates GH-1126

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

* Update example/resource_virtual_environment_container.tf

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

---------

Signed-off-by: Sven Greb <development@svengreb.de>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-08 11:08:13 -04:00
Björn Brauer
a6eb81af08
feat(acme): implement resources and data sources for ACME plugins (#1479)
* feat(acme): implement CRUD API for proxmox cluster ACME plugins

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* feat(acme): implement acme_plugins data source

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* feat(acme): implement acme_plugin data source

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* feat(acme): implement plugin resource creation

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* feat(acme): implement plugin resource read

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* feat(acme): implement plugin resource update

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* feat(acme): implement plugin resource deletion

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* feat(acme): implement plugin resource import

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* docs(acme): generate documentation

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* fix: apply suggestions from code review

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* refactor: extract common fields into BasePluginData

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* fix: restrict plugin resource to type=dns only

because type=standalone is not configurable and always enabled by
default.

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* fix: remove unused 'nodes' property

https://github.com/bpg/terraform-provider-proxmox/pull/1479/files#r1710916265

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* fix: remove "delete" property

https://github.com/bpg/terraform-provider-proxmox/pull/1479/files#r1710908809

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* feat: implement attribute deletion

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* fix: ignore empty lines in dns plugin data

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* fix: partial revert of code review suggestions

Joining the values with a string literal would produce \\n instead of \n
and splitting at \\n doesn't match a newline.

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* refactor: extract acme plugin models into separate file

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

* fix: format disable parameter as int

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>

---------

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-09-08 10:54:16 -04:00
renovate[bot]
112f058e66
chore(ci): update actions/create-github-app-token action (v1.10.3 → v1.10.4) (#1518)
| datasource  | package                         | from    | to      |
| ----------- | ------------------------------- | ------- | ------- |
| github-tags | actions/create-github-app-token | v1.10.3 | v1.10.4 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-06 02:39:58 +00:00
renovate[bot]
9172ec6a9f
chore(deps): update module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp (v0.53.0 → v0.54.0) in /tools (#1509)
* chore(deps): update module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp (v0.53.0 → v0.54.0) in /tools

| datasource | package                                                       | from    | to      |
| ---------- | ------------------------------------------------------------- | ------- | ------- |
| go         | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp | v0.53.0 | v0.54.0 |

* cleanup tools/go.mod

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

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-08-24 21:00:20 -04:00
renovate[bot]
0623bfd156
chore(deps): update golang.org/x/exp digest (0cdaa3a → 9b4947d) (#1506)
| datasource | package          | from                               | to                                 |
| ---------- | ---------------- | ---------------------------------- | ---------------------------------- |
| go         | golang.org/x/exp | v0.0.0-20240808152545-0cdaa3abc0fa | v0.0.0-20240823005443-9b4947da3948 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-23 02:46:49 -04:00
renovate[bot]
5707feab06
chore(deps): update module github.com/golangci/golangci-lint (v1.60.2 → v1.60.3) in /tools (#1507)
| datasource | package                           | from    | to      |
| ---------- | --------------------------------- | ------- | ------- |
| go         | github.com/golangci/golangci-lint | v1.60.2 | v1.60.3 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-23 02:46:35 -04:00
renovate[bot]
35cbe98d6b
chore(deps): update module github.com/golangci/golangci-lint (v1.60.1 → v1.60.2) in /tools (#1499)
* chore(deps): update module github.com/golangci/golangci-lint (v1.60.1 → v1.60.2) in /tools

| datasource | package                           | from    | to      |
| ---------- | --------------------------------- | ------- | ------- |
| go         | github.com/golangci/golangci-lint | v1.60.1 | v1.60.2 |

* fix linter errors

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

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-08-22 00:30:20 +00:00
bpg-autobot[bot]
f907ea4bf8
chore(main): release 0.63.0 (#1486)
Co-authored-by: bpg-autobot[bot] <155200059+bpg-autobot[bot]@users.noreply.github.com>
2024-08-20 23:09:14 -04:00
renovate[bot]
3f6bc5eba2
chore(ci): update hashicorp/setup-terraform action (v3.1.1 → v3.1.2) (#1498)
| datasource  | package                   | from   | to     |
| ----------- | ------------------------- | ------ | ------ |
| github-tags | hashicorp/setup-terraform | v3.1.1 | v3.1.2 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-21 03:00:57 +00:00
Pavel Boldyrev
abb0be4684
chore(example): update links to container images, use faster mirror (#1497)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-08-19 18:20:05 +00:00
renovate[bot]
6635c89f63
chore(deps): update tools (#1490)
* chore(deps): update tools

| datasource     | package                           | from    | to      |
| -------------- | --------------------------------- | ------- | ------- |
| go             | github.com/golangci/golangci-lint | v1.59.1 | v1.60.1 |
| golang-version | go                                | 1.22.6  | 1.23.0  |

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

* fix: linter errors

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

* fix: 1.23.0 in the main `go.mod`

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

---------

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-08-19 13:48:39 -04:00
renovate[bot]
3343a93840
chore(deps): update go (1.22.6 → 1.23.0) (#1489)
| datasource     | package | from   | to     |
| -------------- | ------- | ------ | ------ |
| golang-version | go      | 1.22.6 | 1.23.0 |

Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 16:21:00 +00:00
allcontributors[bot]
52641456cd
docs: add Diskoteket as a contributor for doc (#1496)
* docs: update CONTRIBUTORS.md

* docs: update .all-contributorsrc

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-08-19 16:01:26 +00:00
Tim Wetterek
4f8e18da04
fix(doc): update virtual_environment_vm.md (#1495)
Update virtual_environment_vm.md

Typo in example usage of using downloaded iso for disk

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

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

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

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

Related to GH-570
Related to GH-733

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


---------

Signed-off-by: Sven Greb <development@svengreb.de>
2024-08-13 21:28:48 -04:00
Pavel Boldyrev
8f82d1a384
chore(code): align resource/datasource names in the fwprovider code (#1488)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-08-13 01:03:17 +00:00
Pavel Boldyrev
55bfe14ce1
fix(firewall): remove limit for number of CIRDs in ipset. (#1487)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2024-08-13 00:22:16 +00:00
renovate[bot]
e566c4e35e
chore(deps): update golang.org/x/exp digest (8a7402a → 0cdaa3a) (#1483)
| datasource | package          | from                               | to                                 |
| ---------- | ---------------- | ---------------------------------- | ---------------------------------- |
| go         | golang.org/x/exp | v0.0.0-20240719175910-8a7402abbf56 | v0.0.0-20240808152545-0cdaa3abc0fa |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-12 23:26:50 +00:00
renovate[bot]
767f680cc3
chore(deps): update module github.com/hashicorp/terraform-plugin-testing (v1.9.0 → v1.10.0) (#1485)
| datasource | package                                       | from   | to      |
| ---------- | --------------------------------------------- | ------ | ------- |
| go         | github.com/hashicorp/terraform-plugin-testing | v1.9.0 | v1.10.0 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-12 23:23:58 +00:00
Björn Brauer
daaedf2d99
feat(devcontainer): configure provider override in post attach command (#1481)
* feat(devcontainer): update terraform version
* refactor(devcontainer): move post attach command to separate script
* feat(devcontainer): configure provider override in post attach command


---------

Signed-off-by: Björn Brauer <zaubernerd@zaubernerd.de>
2024-08-12 19:20:35 -04:00
renovate[bot]
dd6d5ec88f
chore(ci): update jetbrains/qodana-action action (v2024.1.8 → v2024.1.9) (#1484)
| datasource  | package                 | from      | to        |
| ----------- | ----------------------- | --------- | --------- |
| github-tags | JetBrains/qodana-action | v2024.1.8 | v2024.1.9 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-10 05:47:03 +00:00
bpg-autobot[bot]
07ab51e654
chore(main): release 0.62.0 (#1446)
Co-authored-by: bpg-autobot[bot] <155200059+bpg-autobot[bot]@users.noreply.github.com>
2024-08-07 23:57:23 -04:00