Table of Contents

Pulumi - Golang

Pulumi quick commands

Start new stack

# Clone the repository
git clone https://github.com/rajeshkio/pulumiInfraProxmox.git 
cd pulumiInfraProxmox

# Install dependencies
go mod download

# Configure Pulumi stack
pulumi stack init dev

# Set environment variables
export PROXMOX_VE_ENDPOINT="https://your-proxmox:8006/api2/json"
export PROXMOX_VE_USERNAME="user@pam"
export PROXMOX_VE_PASSWORD="your-password"
export PROXMOX_VE_SSH_PRIVATE_KEY="$(cat ~/.ssh/id_rsa)"
export SSH_PUBLIC_KEY="$(cat ~/.ssh/id_rsa.pub)"

# Deploy infrastructure with feature flags
pulumi up

Delete resources

Remove out of sync resources from state (manually deleted, not using “pulumi state delete”).

 pulumi state delete --target-dependents
 

Select resource to be deleted. This will remove dependents as well.

Notes

Troubleshooting

Authentication error

Secret config must be added with:

   
   pulumi config set --secret key value

The secret must be encryted and stored in config file. Otherwise the error.