@hctamu/pulumi-pve
v0.2.0
Published
This repository contains a Pulumi Provider for managing Proxmox VE resources. It allows you to define and manage Proxmox VE resources using Pulumi's infrastructure-as-code approach.
Downloads
677
Keywords
Readme
Pulumi Proxmox VE Provider
This repository contains a Pulumi Provider for managing Proxmox VE resources. It allows you to define and manage Proxmox VE resources using Pulumi's infrastructure-as-code approach.
Getting Started
Prerequisites
To work with this repository, you need to use the provided development container (devcontainer). The devcontainer includes all the necessary tools and dependencies pre-installed.
Setting Up the Devcontainer
- Open this repository in Visual Studio Code.
- Install the Remote - Containers extension.
- Reopen the repository in the devcontainer by selecting Reopen in Container from the Command Palette (
Ctrl+Shift+P).
Once the devcontainer is up and running, you can start developing and testing the provider.
A brief repository overview
You now have:
- A
provider/folder containing the building and implementation logiccmd/pulumi-resource-pve/main.go- holds the provider's sample implementation logic.
sdk- holds the generated code libraries created bypulumi-gen-pve/main.goexamplesa folder of Pulumi programs to try locally and/or use in CI.- A
Makefileand this README.
Additional Details
This repository depends on the pulumi-go-provider library. For more details on building providers, please check the Pulumi Go Provider docs.
NPM repository: https://www.npmjs.com/settings/hctamu/packages Nuget repository: https://www.nuget.org/packages/Hctamu.Pve PyPi repository: https://pypi.org/project/pulumi-pve/
Release new version
To release new version create a new release on Github, with the following tag syntax: v*.*.*
A pipeline will automatically release the provider with the given version.
Build the provider and install the plugin
make build installThis will:
- Create the SDK codegen binary and place it in a ./bin folder (gitignored)
- Create the provider binary and place it in the ./bin folder (gitignored)
- Generate the ~~dotnet~~, Go, ~~Node, and Python~~ SDKs and place them in the ./sdk folder
- Install the provider on your machine.
Configuration
The Pulumi Proxmox VE provider requires the following configuration settings:
Required Settings
pve:pveUrl- The URL of the Proxmox VE API server (e.g.,https://pve.example.com:8006)pve:pveUser- The Proxmox VE user for authentication (e.g.,root@pamoruser@pve)pve:pveToken- An API token generated in the Proxmox VE UI (marked as secret)pve:sshUser- The SSH user for connecting to Proxmox VE nodes (e.g.,root)pve:sshPass- The SSH password for authenticating to Proxmox VE nodes (marked as secret)
Optional Settings
pve:insecureSkipVerify- Disable TLS certificate verification for HTTPS connections. Defaults tofalse. ⚠️ Only use for testing with self-signed certificates.pve:insecureIgnoreHostKey- Disable SSH host key verification when connecting to nodes. Defaults tofalse. ⚠️ Only use for testing environments. In production, ensure~/.ssh/known_hostsis properly configured.pve:sshKnownHostsPath- Path to the SSHknown_hostsfile used for host key verification. Defaults to~/.ssh/known_hostswhen unset.
Configuration Example
Set these in your Pulumi stack configuration (e.g., Pulumi.dev.yaml):
config:
pve:pveUrl: https://pve.local:8006
pve:pveUser: root@pam
pve:pveToken:
secure: AQAAAA... # Use `pulumi config set --secret` for token
pve:sshUser: root
pve:sshPass:
secure: AQAAAA... # Use `pulumi config set --secret` for password
pve:insecureSkipVerify: false
pve:insecureIgnoreHostKey: false
pve:sshKnownHostsPath: /home/your-user/.ssh/known_hostsOr set via environment variables:
export PULUMI_CONFIG_PVE_PVEURL=https://pve.local:8006
export PULUMI_CONFIG_PVE_PVEUSER=root@pam
export PULUMI_CONFIG_PVE_PVETOKEN=your-token-here
export PULUMI_CONFIG_PVE_SSHUSER=root
export PULUMI_CONFIG_PVE_SSHPASS=your-password-here