mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-08-22 19:38:35 +00:00
chore(docs): update README.md, add note about OpenTofu support (#943)
chore(docs): update README.md, note about OpenTofu support Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
d4832b3d59
commit
b926c57a53
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -7,6 +7,7 @@
|
||||
"proxmoxtf",
|
||||
"qcow",
|
||||
"rootfs",
|
||||
"signoff",
|
||||
"tflog",
|
||||
"unmanaged",
|
||||
"virtio",
|
||||
|
21
Makefile
21
Makefile
@ -1,15 +1,22 @@
|
||||
GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor)
|
||||
NAME=terraform-provider-proxmox
|
||||
TARGETS=darwin linux windows
|
||||
TERRAFORM_PLUGIN_EXTENSION=
|
||||
VERSION=0.44.0# x-release-please-version
|
||||
|
||||
# check if opentofu is installed and use it if it is,
|
||||
# otherwise use terraform
|
||||
ifeq ($(shell tofu -version 2>/dev/null),)
|
||||
TERRAFORM_EXECUTABLE=terraform
|
||||
else
|
||||
TERRAFORM_EXECUTABLE=tofu
|
||||
endif
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
TERRAFORM_PLATFORM=windows_amd64
|
||||
TERRAFORM_PLUGIN_CACHE_DIRECTORY=$$(cygpath -u "$(shell pwd -P)")/cache/plugins
|
||||
TERRAFORM_PLUGIN_EXTENSION=.exe
|
||||
else
|
||||
TERRAFORM_PLATFORM=$$(terraform -version | awk 'FNR == 2 {print $$2}')
|
||||
TERRAFORM_PLATFORM=$$($(TERRAFORM_EXECUTABLE) -version | awk 'FNR == 2 {print $$2}')
|
||||
TERRAFORM_PLUGIN_CACHE_DIRECTORY=$(shell pwd -P)/cache/plugins
|
||||
endif
|
||||
|
||||
@ -40,7 +47,7 @@ example-apply:
|
||||
&& export TF_DISABLE_CHECKPOINT="true" \
|
||||
&& export TF_PLUGIN_CACHE_DIR="$(TERRAFORM_PLUGIN_CACHE_DIRECTORY)" \
|
||||
&& cd ./example \
|
||||
&& terraform apply -auto-approve
|
||||
&& $(TERRAFORM_EXECUTABLE) apply -auto-approve
|
||||
|
||||
.PHONY: example-build
|
||||
example-build:
|
||||
@ -54,7 +61,7 @@ example-destroy:
|
||||
&& export TF_DISABLE_CHECKPOINT="true" \
|
||||
&& export TF_PLUGIN_CACHE_DIR="$(TERRAFORM_PLUGIN_CACHE_DIRECTORY)" \
|
||||
&& cd ./example \
|
||||
&& terraform destroy -auto-approve
|
||||
&& $(TERRAFORM_EXECUTABLE) destroy -auto-approve
|
||||
|
||||
.PHONY: example-init
|
||||
example-init:
|
||||
@ -63,7 +70,7 @@ example-init:
|
||||
&& export TF_PLUGIN_CACHE_DIR="$(TERRAFORM_PLUGIN_CACHE_DIRECTORY)" \
|
||||
&& cd ./example \
|
||||
&& rm -f .terraform.lock.hcl \
|
||||
&& terraform init
|
||||
&& $(TERRAFORM_EXECUTABLE) init
|
||||
|
||||
.PHONY: example-plan
|
||||
example-plan:
|
||||
@ -71,11 +78,11 @@ example-plan:
|
||||
&& export TF_DISABLE_CHECKPOINT="true" \
|
||||
&& export TF_PLUGIN_CACHE_DIR="$(TERRAFORM_PLUGIN_CACHE_DIRECTORY)" \
|
||||
&& cd ./example \
|
||||
&& terraform plan
|
||||
&& $(TERRAFORM_EXECUTABLE) plan
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
gofmt -s -w $(GOFMT_FILES)
|
||||
gofmt -s -w $$(find . -name '*.go')
|
||||
|
||||
.PHONY: init
|
||||
init:
|
||||
|
56
README.md
56
README.md
@ -9,32 +9,28 @@
|
||||
[](https://www.conventionalcommits.org/en/v1.0.0/)
|
||||
[](https://www.buymeacoffee.com/bpgca)
|
||||
|
||||
A Terraform Provider which adds support for Proxmox solutions.
|
||||
A Terraform / OpenTofu Provider which adds support for Proxmox solutions.
|
||||
|
||||
This repository is a fork
|
||||
of <https://github.com/danitso/terraform-provider-proxmox>
|
||||
which is no longer maintained.
|
||||
This repository is a fork of <https://github.com/danitso/terraform-provider-proxmox> which is no longer maintained.
|
||||
|
||||
## Compatibility promise
|
||||
|
||||
This provider is compatible with the latest version of Proxmox VE (currently
|
||||
8.0). While it may work with older 7.x versions, it is not guaranteed to do so.
|
||||
This provider is compatible with the latest version of Proxmox VE (currently 8.0).
|
||||
While it may work with older 7.x versions, it is not guaranteed to do so.
|
||||
|
||||
While provider is on version 0.x, it is not guaranteed to be backwards
|
||||
compatible with all previous minor versions. However, we will try to keep the
|
||||
backwards compatibility between provider versions as much as possible.
|
||||
While provider is on version 0.x, it is not guaranteed to be backwards compatible with all previous minor versions.
|
||||
However, we will try to keep the backwards compatibility between provider versions as much as possible.
|
||||
|
||||
## Requirements
|
||||
|
||||
- [Proxmox Virtual Environment](https://www.proxmox.com/en/proxmox-virtual-environment/) 8.x
|
||||
- TLS 1.3 for the Proxmox API endpoint
|
||||
- [Terraform](https://www.terraform.io/downloads.html) 1.4+
|
||||
- TLS 1.3 for the Proxmox API endpoint (legacy TLS 1.2 is optionally supported)
|
||||
- [Terraform](https://www.terraform.io/downloads.html) 1.5.x+ or [OpenTofu](https://opentofu.org) 1.6.x
|
||||
- [Go](https://golang.org/doc/install) 1.21 (to build the provider plugin)
|
||||
|
||||
## Using the provider
|
||||
|
||||
You can find the latest release and its documentation in
|
||||
the [Terraform Registry](https://registry.terraform.io/providers/bpg/proxmox/latest).
|
||||
You can find the latest release and its documentation in the [Terraform Registry](https://registry.terraform.io/providers/bpg/proxmox/latest).
|
||||
|
||||
## Testing the provider
|
||||
|
||||
@ -46,17 +42,14 @@ make test
|
||||
|
||||
Tests are limited to regression tests, ensuring backwards compatibility.
|
||||
|
||||
A limited number of acceptance tests are available in the `proxmoxtf/test` directory, mostly
|
||||
for "new" functionality implemented using the Terraform Provider Framework. These tests
|
||||
are not run by default, as they require a Proxmox VE environment to be available.
|
||||
They can be run using `make testacc`, the Proxmox connection can be configured using
|
||||
environment variables, see provider documentation for details.
|
||||
A limited number of acceptance tests are available in the `proxmoxtf/test` directory, mostly for "new" functionality implemented using the Terraform Provider Framework.
|
||||
These tests are not run by default, as they require a Proxmox VE environment to be available.
|
||||
They can be run using `make testacc`, the Proxmox connection can be configured using environment variables, see provider documentation for details.
|
||||
|
||||
## Deploying the example resources
|
||||
|
||||
There are number of TF examples in the `example` directory, which can be used
|
||||
to deploy a Container, VM, or other Proxmox resources on your test Proxmox
|
||||
environment. The following assumptions are made about the test environment:
|
||||
There are number of TF examples in the `example` directory, which can be used to deploy a Container, VM, or other Proxmox resources on your test Proxmox environment.
|
||||
The following assumptions are made about the test environment:
|
||||
|
||||
- It has one node named `pve`
|
||||
- The node has local storages named `local` and `local-lvm`
|
||||
@ -72,28 +65,23 @@ virtual_environment_endpoint = "https://<your-cluster-endpoint>:8006/"
|
||||
|
||||
Then run `make example` to deploy the example resources.
|
||||
|
||||
If you don't have free proxmox cluster to play with, there is dedicated [how-to tutorial](howtos/setup-proxmox-for-make-example/README.md) how to setup Proxmox inside VM and run `make example` on it.
|
||||
If you don't have free proxmox cluster to play with, there is dedicated [how-to tutorial](howtos/setup-proxmox-for-tests/README.md) how to setup Proxmox inside VM and run `make example` on it.
|
||||
|
||||
## Future work
|
||||
|
||||
The provider is using
|
||||
the [Terraform SDKv2](https://developer.hashicorp.com/terraform/plugin/sdkv2),
|
||||
which is considered legacy and is in maintenance mode.
|
||||
The work has started to migrate the provider to the
|
||||
new [Terraform Plugin Framework](https://www.terraform.io/docs/extend/plugin-sdk.html),
|
||||
with aim to release it as a new major version **1.0**.
|
||||
The provider is using the [Terraform SDKv2](https://developer.hashicorp.com/terraform/plugin/sdkv2), which is considered legacy and is in maintenance mode.
|
||||
The work has started to migrate the provider to the new [Terraform Plugin Framework](https://www.terraform.io/docs/extend/plugin-sdk.html), with aim to release it as a new major version **1.0**.
|
||||
|
||||
## Known issues
|
||||
|
||||
### Disk images cannot be imported by non-PAM accounts
|
||||
|
||||
Due to limitations in the Proxmox VE API, certain actions need to be performed
|
||||
using SSH. This requires the use of a PAM account (standard Linux account).
|
||||
Due to limitations in the Proxmox VE API, certain actions need to be performed using SSH. This requires the use of a PAM account (standard Linux account).
|
||||
|
||||
### Disk images from VMware cannot be uploaded or imported
|
||||
|
||||
Proxmox VE is not currently supporting VMware disk images directly. However, you
|
||||
can still use them as disk images by using this workaround:
|
||||
Proxmox VE is not currently supporting VMware disk images directly.
|
||||
However, you can still use them as disk images by using this workaround:
|
||||
|
||||
```hcl
|
||||
resource "proxmox_virtual_environment_file" "vmdk_disk_image" {
|
||||
@ -125,8 +113,8 @@ resource "proxmox_virtual_environment_vm" "example" {
|
||||
|
||||
### Snippets cannot be uploaded by non-PAM accounts
|
||||
|
||||
Due to limitations in the Proxmox VE API, certain files need to be uploaded
|
||||
using SFTP. This requires the use of a PAM account (standard Linux account).
|
||||
Due to limitations in the Proxmox VE API, certain files (snippets, backups) need to be uploaded using SFTP.
|
||||
This requires the use of a PAM account (standard Linux account).
|
||||
|
||||
## Contributors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user