mirror of
https://github.com/tolerryan/NewWatari.git
synced 2026-10-12 08:08:12 +00:00
76 lines
1.4 KiB
HCL
76 lines
1.4 KiB
HCL
terraform {
|
|
required_providers {
|
|
proxmox = {
|
|
source = "bpg/proxmox"
|
|
version = "0.97.1"
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
resource "proxmox_virtual_environment_container" "example_template" {
|
|
description = "Managed by Terraform"
|
|
start_on_boot = "true"
|
|
wait_for_ip {
|
|
ipv4 = true
|
|
}
|
|
disk {
|
|
#datastore_id = var.virtual_environment_storage
|
|
# ^ Possible template example
|
|
datastore_id = "local-lvm"
|
|
size = 4
|
|
}
|
|
|
|
#mount_point {
|
|
# // volume mount
|
|
# volume = var.virtual_environment_storage
|
|
# size = "4G"
|
|
# path = "mnt/local"
|
|
#}
|
|
|
|
initialization {
|
|
dns {
|
|
servers = ["1.1.1.1", "8.8.8.8"]
|
|
}
|
|
|
|
hostname = "downloader"
|
|
|
|
ip_config {
|
|
ipv4 {
|
|
address = "192.168.0.22/24"
|
|
gateway = "192.168.0.1"
|
|
}
|
|
}
|
|
|
|
user_account {
|
|
# keys = [trimspace(tls_private_key.example.public_key_openssh)]
|
|
password = "example"
|
|
}
|
|
}
|
|
|
|
network_interface {
|
|
name = "veth0"
|
|
mtu = 1450
|
|
}
|
|
|
|
#node_name = data.proxmox_virtual_environment_nodes.example.names[0]
|
|
# ^ possible way to template the node_name
|
|
node_name = "watari"
|
|
|
|
operating_system {
|
|
template_file_id = "local:vztmpl/debian-13-standard_13.3-sudo_amd64.tar.zst"
|
|
type = "debian"
|
|
}
|
|
|
|
tags = [
|
|
"deb13",
|
|
"terraform",
|
|
]
|
|
|
|
startup {
|
|
order = "3"
|
|
up_delay = "60"
|
|
down_delay = "60"
|
|
}
|
|
}
|