29 lines
693 B
HCL
29 lines
693 B
HCL
terraform {
|
|
required_version = ">= 1.0"
|
|
|
|
required_providers {
|
|
proxmox = {
|
|
source = "bpg/proxmox"
|
|
version = "~> 0.73"
|
|
}
|
|
}
|
|
}
|
|
|
|
provider "proxmox" {
|
|
endpoint = var.proxmox_endpoint
|
|
api_token = var.proxmox_api_token
|
|
|
|
# Set to true if using a self-signed certificate (common on home labs)
|
|
insecure = var.proxmox_insecure
|
|
}
|
|
|
|
data "proxmox_virtual_environment_nodes" "vm_nodes" {}
|
|
|
|
output "data_proxmox_virtual_environment_nodes" {
|
|
value = {
|
|
names = data.proxmox_virtual_environment_nodes.vm_nodes.names
|
|
cpu_count = data.proxmox_virtual_environment_nodes.vm_nodes.cpu_count
|
|
online = data.proxmox_virtual_environment_nodes.vm_nodes.online
|
|
}
|
|
}
|