This commit is contained in:
2026-04-05 20:50:04 +02:00
commit e2dc9305ee
19 changed files with 1124 additions and 0 deletions

46
terraform/main.tf Normal file
View File

@@ -0,0 +1,46 @@
terraform {
required_version = ">= 1.0"
required_providers {
proxmox = {
source = "telmate/proxmox"
version = ">= 2.9.14"
}
}
}
provider "proxmox" {
pm_api_url = var.proxmox_api_url
pm_api_token_id = var.proxmox_api_token_id
pm_api_token_secret = var.proxmox_api_token_secret
}
resource "proxmox_lxc" "loustique_lxc" {
target_node = "derick"
hostname = "web-test-terraform"
vmid = 301
ostemplate = "local:vztmpl/ubuntu-24.04-standard_24.04-2_amd64.tar.zst"
password = "wolaouais"
unprivileged = true
cores = 1
memory = 512
rootfs {
storage = "local-lvm"
size = "8G"
}
network {
name = "eth0"
bridge = "vmbr0"
#tag = "2"
ip = "dhcp"
}
}