Files
terraform/srv-debianlxc.tf
2025-10-18 20:29:22 +00:00

34 lines
790 B
HCL

resource "proxmox_lxc" "basic" {
target_node = "pve"
hostname = "lxc-basic"
ostemplate = "nfs_Vulnerable:vztmpl/debian-13-standard_13.1-2_amd64.tar.zst"
password = "BasicLXCContainer"
unprivileged = true
description = "Nice"
features {
nesting = true
}
ssh_public_keys = <<-EOT
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJo337iE4+Ry7T65Ey+2QQ9aRaGxP7zzLtMV+hBPyA59 eddsa-key-20250525
EOT
// Terraform will crash without rootfs defined
rootfs {
storage = "nfs_Protected"
size = "8G"
}
network {
name = "eth0"
bridge = "vmbr0"
ip = "dhcp"
}
}
resource "local_file" "Ans_inv" {
content = <<-DOC
hostname: ${proxmox_lxc.basic.hostname}
id: ${proxmox_lxc.basic.id}
DOC
filename = "${path.module}/output.txt"
}