Agregando configuración de home assistant

This commit is contained in:
2025-11-09 01:34:24 -03:00
parent 056f0cdb1d
commit 12f2d718e3
7 changed files with 269 additions and 1 deletions

View File

@@ -0,0 +1,58 @@
terraform {
required_providers {
proxmox = {
source = "bpg/proxmox"
version = "0.86.0"
}
}
}
data "local_file" "proxmox_ssh_private_key" {
filename = var.proxmox_ssh_privkey_path
}
provider "proxmox" {
endpoint = var.proxmox_endpoint
username = var.proxmox_user
password = var.proxmox_password
insecure = true
ssh {
agent = true
username = var.proxmox_ssh_username
private_key = trimspace(data.local_file.proxmox_ssh_private_key.content)
}
}
resource "proxmox_virtual_environment_vm" "homeassistant" {
name = "homeassistant"
node_name = var.proxmox_node
stop_on_destroy = true
bios = "ovmf"
cpu {
cores = 2
type = "host"
}
memory {
dedicated = 8096
}
efi_disk {
datastore_id = var.vm_datastore
}
disk {
datastore_id = var.vm_datastore
import_from = "${var.proxmox_datastore}:import/haos_ova-16.3.qcow2"
interface = "virtio0"
size = 100
}
network_device {
bridge = var.bridge
}
}