This Terraform module creates Proxmox virtual machines based on the provided configuration.
- Terraform installed (version 0.13.0 or later)
- Proxmox provider (version 0.0.1)
- TLS provider (version 4.0.5)
-
Clone the repository:
git clone <repository_url>
-
Navigate to the module directory:
cd terraform-proxmox-vm-module
-
Create a Terraform script (e.g.,
main.tf
) and define your virtual machines:module "my_virtual_machines" { source = "./path/to/module" proxmox_api_url = "https://your-proxmox-api-url:8006/api2/json" proxmox_api_token_id = "your-proxmox-token-id" proxmox_api_token_secret = "your-proxmox-token-secret" virtual_machines = { vm1 = { name = "vm1" # Add other configuration parameters } vm2 = { name = "vm2" # Add other configuration parameters } } }
-
Initialize Terraform and apply the configuration:
terraform init terraform apply
-
Review the changes and confirm by typing
yes
.
proxmox_api_url
: URL of the Proxmox API.proxmox_api_token_id
: Token ID for authentication.proxmox_api_token_secret
: Token secret for authentication.virtual_machines
: Map of virtual machine configurations.
virtual_machine_private_key
: Private SSH key for accessing virtual machines.
You can customize the provider configuration by updating the provider.tf
file.
proxmox_api_url
: Proxmox API URL.proxmox_api_token_id
: Proxmox API token ID.proxmox_api_token_secret
: Proxmox API token secret.virtual_machines
: Map of virtual machine configurations.
This module is licensed under the MIT License - see the LICENSE file for details.