0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-30 10:33:46 +00:00
Terraform / OpenTofu Provider for Proxmox VE
Go to file
2022-04-02 00:39:35 -04:00
.github move release branch param to action 2022-03-21 21:28:21 -04:00
docs Bump docs dependencies 2022-03-04 00:04:14 -05:00
example Add support for darwin_arm64 in Makefile & bump deps in examples (#56) 2022-04-02 00:39:35 -04:00
proxmox virtual_environment_datastores.go: Update remote command to get datasource path (#49) 2022-03-21 20:26:39 -04:00
proxmoxtf Bump provider version to 0.5.1 (#52) 2022-03-21 20:46:25 -04:00
tools Bump github.com/golangci/golangci-lint from 1.45.0 to 1.45.2 in /tools (#55) 2022-03-29 17:41:18 -04:00
.github_changelog_generator move release branch param to action 2022-03-21 21:28:21 -04:00
.gitignore go mod tidy and update .gitignore 2021-09-08 18:35:44 -04:00
.go-version update various project configs, mostly for CI 2021-09-08 21:48:02 -04:00
.goreleaser.yml update release workflow & goreleaser config 2021-09-09 20:42:05 -04:00
CHANGELOG.md Update CHANGELOG.md 2022-03-22 01:37:10 +00:00
CODE_OF_CONDUCT.md Update project to use bpg/terraform-provider-proxmox 2021-09-09 12:20:19 -04:00
CONTRIBUTING.md rename branch master -> main 2021-09-09 12:33:48 -04:00
example.tfrc Update project to use bpg/terraform-provider-proxmox 2021-09-09 12:20:19 -04:00
go.mod Bump github.com/pkg/sftp from 1.13.3 to 1.13.4 2021-09-27 16:18:41 +00:00
go.sum Bump github.com/pkg/sftp from 1.13.3 to 1.13.4 2021-09-27 16:18:41 +00:00
HISTORY.md tweak changelog generation 2021-09-09 07:25:06 -04:00
LICENSE Initial work 2019-12-07 19:58:29 +01:00
main.go Update project to use bpg/terraform-provider-proxmox 2021-09-09 12:20:19 -04:00
Makefile Add support for darwin_arm64 in Makefile & bump deps in examples (#56) 2022-04-02 00:39:35 -04:00
README.md Bump provider version to 0.5.0 2021-11-06 13:57:16 -04:00

Go Report Card GoDoc

Terraform Provider for Proxmox

A Terraform Provider which adds support for Proxmox solutions.

This repository is a fork of https://github.com/danitso/terraform-provider-proxmox with several critical fixes to unblock VM deployment in Proxmox v7.0, and a few other enhancements.

Compatibility Matrix

Proxmox version Provider version
6.x <= 0.4.4
7.x 0.4.x > 0.4.4
0.5.x

Requirements

  • Terraform 0.14+
  • Go 1.16+ (to build the provider plugin)
  • GoReleaser 0.155+ (to build the provider plugin)

Table of Contents

Building the provider

  • Clone the repository to $GOPATH/src/github.com/bpg/terraform-provider-proxmox:

    $ mkdir -p "${GOPATH}/src/github.com/bpg"
    $ cd "${GOPATH}/src/github.com/bpg"
    $ git clone git@github.com:bpg/terraform-provider-proxmox
    
  • Enter the provider directory and build it:

    $ cd "${GOPATH}/src/github.com/bpg/terraform-provider-proxmox"
    $ make build
    

Using the provider

You can find the latest release and its documentation in the Terraform Registry.

Testing the provider

In order to test the provider, you can simply run make test.

$ make test

Tests are limited to regression tests, ensuring backwards compatibility.

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).

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:

resource "proxmox_virtual_environment_file" "vmdk_disk_image" {
  content_type = "iso"
  datastore_id = "datastore-id"
  node_name    = "node-name"

  source_file {
    # We must override the file extension to bypass the validation code in the Proxmox VE API.
    file_name = "vmdk-file-name.img"
    path      = "path-to-vmdk-file"
  }
}

resource "proxmox_virtual_environment_vm" "example" {
  ...

  disk {
    datastore_id = "datastore-id"
    # We must tell the provider that the file format is vmdk instead of qcow2.
    file_format  = "vmdk"
    file_id      = "${proxmox_virtual_environment_file.vmdk_disk_image.id}"
  }

  ...
}

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).