0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-02 19:43:00 +00:00
Commit Graph

819 Commits

Author SHA1 Message Date
Pavel Boldyrev
d748a7de7b
fix(provider): fix config environment variables handling caused "rpc error" (#397)
fix(provider): fix config environment variables handling causing "rpc error"
2023-07-03 00:45:06 +00: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
michalg91
99fda9cbcd
fix: search for vm in cluster resources before calling node api (#393)
* (fix) search for vm in cluster resources before calling node api

* (lint) search for vm in cluster resources before calling node api

* cleanup redundant error checks

---------

Co-authored-by: michalg91 <michal.gawrys@g2a.com>
Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-07-01 10:45:40 -04:00
Oto Petřík
03eaf72767
fix(provider): Better handling of root@pam token (#386)
Token logins using root@pam!sometoken=uuid are not considered
by PVE as 'root' logins, and fail to change VM's arch.
Make sure the provider does not try to set/change VM's arch.

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-07-01 13:31:02 +00:00
Pavel Boldyrev
4da2b682de
fix(file): spurious unsupported content type warning (#395) 2023-07-01 12:52:42 +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
Oto Petřík
23a519475d
fix(lxc): add support for 'nixos' (#387) 2023-06-27 21:46:35 -04:00
dependabot[bot]
91467037d5
chore(deps): bump github.com/hashicorp/terraform-plugin-go from 0.15.0 to 0.16.0 (#380)
chore(deps): bump github.com/hashicorp/terraform-plugin-go

Bumps [github.com/hashicorp/terraform-plugin-go](https://github.com/hashicorp/terraform-plugin-go) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/hashicorp/terraform-plugin-go/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/terraform-plugin-go/compare/v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-24 06:06:04 +00:00
dependabot[bot]
c1219ecd3c
chore(deps): bump github.com/hashicorp/terraform-plugin-framework from 1.3.0 to 1.3.1 (#381)
chore(deps): bump github.com/hashicorp/terraform-plugin-framework

Bumps [github.com/hashicorp/terraform-plugin-framework](https://github.com/hashicorp/terraform-plugin-framework) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/hashicorp/terraform-plugin-framework/releases)
- [Changelog](https://github.com/hashicorp/terraform-plugin-framework/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/terraform-plugin-framework/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/terraform-plugin-framework
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-24 06:02:40 +00:00
GitHub Bot
e3662df083
chore(main): release 0.22.0 (#372) 2023-06-24 01:42:51 -04:00
Pavel Boldyrev
4e1ce30619
fix(file): add check for supported content types when uploading file to a storage (#379) 2023-06-24 01:38:24 -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
dependabot[bot]
2863aa6e2d
chore(deps): bump github.com/golangci/golangci-lint from 1.53.2 to 1.53.3 in /tools (#375) 2023-06-19 14:12:48 -04:00
dependabot[bot]
f6e20bd787
chore(deps): bump golang.org/x/crypto from 0.9.0 to 0.10.0 (#374) 2023-06-19 13:54:05 -04:00
dependabot[bot]
e3a62d79ad
chore(deps): bump goreleaser/goreleaser-action from 4.2.0 to 4.3.0 (#371) 2023-06-12 19:36:07 -04:00
GitHub Bot
ff1e6a4524
chore(main): release 0.21.1 (#357) 2023-06-07 23:42:44 +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
Oto Petřík
926382c155
fix(core): Do not limit cluster size to 1 in provider's ssh config (#369)
fix(code): Do not limit cluster size to 1

Allow using repeated 'node' blocks in ssh configuration.

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-06-07 23:06:10 +00: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
de3935d462
fix(vm): fix incorrect disk interface ref when reading VM info from PVE (#365)
Fix a minor bug in `vmGetDiskDeviceObjects(...)` that was discovered during investigation of #360.
2023-06-06 11:45:03 +00:00
dependabot[bot]
a546a82928
chore(deps): bump github.com/golangci/golangci-lint from 1.52.2 to 1.53.2 in /tools (#363) 2023-06-05 18:26:26 +00:00
dependabot[bot]
170ec8ad92
chore(deps): bump github.com/hashicorp/terraform-plugin-log from 0.8.0 to 0.9.0 (#362) 2023-06-05 18:23:23 +00:00
dependabot[bot]
46e0f8f6e7
chore(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#361) 2023-06-05 14:20:50 -04:00
Pavel Boldyrev
8c1f246b5a
fix(firewall): Improve firewall resources argument validation (#359)
Make sure VM / Container rules, SGs, IPSets are always include `node_name` along with `vm_id`, `container_id`.
2023-06-02 06:38:27 -04:00
Pavel Boldyrev
9587c6383c
chore(doc): project documentation update (#356) 2023-06-01 11:48:41 +00:00
GitHub Bot
e8a77734e0
chore(main): release 0.21.0 (#348) 2023-05-31 21:22:56 -04: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
Oto Petřík
e15c4a6784
fix(vm): Make mac_address computed, fix #339 (#354)
Fields `network_interface_names`, `ipv4_addresses` and `ipv6_addresses`
are sometimes be marked `computed` again, using `CustomizeDiff`.
Changes in `VMStarted` or `VMNetworkDevice` attributes invalidate
those values. Marking fields `computed` again avoids stale values.

`network_device` configuration block without `mac_address` results
in MAC address set to its default value (an empty string).
Terraform state expects `mac_address` to be an empty string, server
provides the actual (random) MAC address of the network device.
Terraform detects there are changes to be made, but because of
`DiffSuppressFunc` on `mac_address` they are hidden from the user,
but not from d.HasChange(mkResourceVirtualEnvironmentVMNetworkDevice)

By making `mac_address` also `computed`, the server-generated MAC
address is stored locally, avoiding spurious changes that trigger
re-computation of `network_interface_names`, `ipv4_addresses` and
`ipv6_addresses`.
2023-05-31 21:12:27 -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
dependabot[bot]
6e593607bb
chore(deps): bump github.com/sigstore/rekor from 1.1.1 to 1.2.0 in /tools (#349)
chore(deps): bump github.com/sigstore/rekor in /tools

Bumps [github.com/sigstore/rekor](https://github.com/sigstore/rekor) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/sigstore/rekor/releases)
- [Changelog](https://github.com/sigstore/rekor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sigstore/rekor/compare/v1.1.1...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/sigstore/rekor
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-26 17:44:58 -04:00
Pavel Boldyrev
1f006aa82b
feat: API client cleanup and refactoring (#323)
* cleanup 1

* continue refactoring

* more refactoring

* move VMs under nodes

* move container and other apis under nodes

* cleanups

* enabled revive.exported linter & add comments to exported stuff

* enable godot linter

* enable wsl linter

* enable thelper linter

* enable govet linter

* cleanup after rebase

* cleanup after rebase

* extract SSH ops into a separate interface

* fix linter error

* move ssh code to its own package

* cleaning up VirtualEnvironmentClient receivers

* on the finish line

* not sure what else I forgot... 🤔

* fix ssh connection and upload

* renaming client interfaces

* final cleanups
2023-05-26 01:32:51 +00:00
dependabot[bot]
23585570ab
chore(deps): bump github.com/goreleaser/nfpm/v2 from 2.28.0 to 2.29.0 in /tools (#347) 2023-05-24 20:03:38 -04:00
GitHub Bot
b2b18470f9
chore(main): release 0.20.1 (#346) 2023-05-23 02:14:17 +00:00
Oto Petřík
20131b0ffc
fix(vm): Regression: wait for 'net.IsGlobalUnicast' IP address (#100) (#345)
fix: Wait for 'net.IsGlobalUnicast' IP address, again (#100)

VM can get IPv6 link-local address faster than a DHCP server response,
that results in 'ipv4_addresses' output being an empty list.
It is then impossible to provision the VM using 'connection.host' field
derived from 'self.ipv4_addresses'.

Once again change waiting for IP address to wait for better address than
IPv4 link-local addresses and IPv6 link-local addresses.

Should not break #182, because it requires only one GlobalUnicast address per VM.
2023-05-22 22:12:06 -04:00
GitHub Bot
18fceb8734
chore(main): release 0.20.0 (#338) 2023-05-22 14:12:53 -04:00
dependabot[bot]
fc1e03f094
chore(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3 (#343)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.3)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 14:00:18 -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
Pavel Boldyrev
37494a01b6
Update Makefile 2023-05-19 12:42:44 -04:00
Kevin
1c920de71d
feat: bump Go to 1.20 to resolve MacOS DNS resolution issues (#342)
* feat: bump the go version

Bumping the go version ensures that MacOS DNS is resolved correctly as
per https://go-review.googlesource.com/c/go/+/446178.

Resolves: #341

* bump go version in /tools and in readme

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-05-19 12:37:22 -04:00
dependabot[bot]
0d8e6d3158
chore(deps): bump github.com/skeema/knownhosts from 1.1.0 to 1.1.1 (#336) 2023-05-15 17:43:48 -04:00
dependabot[bot]
b1cb49cf7a
chore(deps): bump golang.org/x/crypto from 0.8.0 to 0.9.0 (#337) 2023-05-15 17:34:39 -04:00
GitHub Bot
85ddac9053
chore(main): release 0.19.1 (#332) 2023-05-13 22:16:55 -04:00
Pavel Boldyrev
79e5a8ebb0
fix(vm): Regression: cannot create disks larger than 99G (#335) 2023-05-13 22:13:57 -04:00
dependabot[bot]
37a1234bb0
chore(deps): bump github.com/docker/distribution from 2.8.1+incompatible to 2.8.2+incompatible in /tools (#331) 2023-05-11 17:02:21 -04:00
GitHub Bot
ba57a5da36
chore(main): release 0.19.0 (#325) 2023-05-10 22:12:02 -04:00
Pavel Boldyrev
8359c03aa8
fix(vm,lxc): Add validation for non-empty tags (#330) 2023-05-11 02:06:15 +00:00
Jordan Keith
4be9914757
feat(vm,lxc): Improved support for different disk size units (#326) 2023-05-10 07:46:16 -04:00
dependabot[bot]
d94a4ce7cf
chore(deps): bump github.com/goreleaser/goreleaser from 1.18.1 to 1.18.2 in /tools (#327)
chore(deps): bump github.com/goreleaser/goreleaser in /tools

Bumps [github.com/goreleaser/goreleaser](https://github.com/goreleaser/goreleaser) from 1.18.1 to 1.18.2.
- [Release notes](https://github.com/goreleaser/goreleaser/releases)
- [Changelog](https://github.com/goreleaser/goreleaser/blob/main/.goreleaser.yaml)
- [Commits](https://github.com/goreleaser/goreleaser/compare/v1.18.1...v1.18.2)

---
updated-dependencies:
- dependency-name: github.com/goreleaser/goreleaser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 21:00:14 -04:00
dependabot[bot]
aea079e0b1
chore(deps): bump github.com/goreleaser/goreleaser from 1.17.2 to 1.18.1 in /tools (#324)
chore(deps): bump github.com/goreleaser/goreleaser in /tools

Bumps [github.com/goreleaser/goreleaser](https://github.com/goreleaser/goreleaser) from 1.17.2 to 1.18.1.
- [Release notes](https://github.com/goreleaser/goreleaser/releases)
- [Changelog](https://github.com/goreleaser/goreleaser/blob/main/.goreleaser.yaml)
- [Commits](https://github.com/goreleaser/goreleaser/compare/v1.17.2...v1.18.1)

---
updated-dependencies:
- dependency-name: github.com/goreleaser/goreleaser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-05 20:51:35 -04:00