feat: add omada lxc container
This commit is contained in:
parent
2e51bb1a18
commit
7b01bef6ad
37
omada.tf
Normal file
37
omada.tf
Normal file
@ -0,0 +1,37 @@
|
||||
resource "proxmox_lxc" "omada" {
|
||||
target_node = "pve"
|
||||
vmid = "200"
|
||||
hostname = "omada"
|
||||
ostemplate = "local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst"
|
||||
password = var.ci_password
|
||||
unprivileged = false
|
||||
ostype = "debian"
|
||||
start = true
|
||||
startup = "order=1000"
|
||||
|
||||
ssh_public_keys = <<EOF
|
||||
${var.ssh_key}
|
||||
EOF
|
||||
|
||||
memory = "4096"
|
||||
swap = "512"
|
||||
|
||||
rootfs {
|
||||
storage = "local-zfs"
|
||||
size = "8G"
|
||||
}
|
||||
|
||||
features {
|
||||
fuse = true
|
||||
nesting = true
|
||||
mount = "nfs;cifs"
|
||||
}
|
||||
|
||||
network {
|
||||
name = "eth0"
|
||||
bridge = "vmbr0"
|
||||
ip = "10.10.40.2/24"
|
||||
gw = "10.10.40.1"
|
||||
tag = 40
|
||||
}
|
||||
}
|
@ -7,8 +7,8 @@ bw sync
|
||||
echo "Please wait while we prepare terraform.auto.tfvars"
|
||||
|
||||
proxmox_api_url=$(bw get --session $BW_SESSION uri proxmox_api)
|
||||
proxmox_api_token_id=$(bw get --session $BW_SESSION username proxmox_api)
|
||||
proxmox_api_token_secret=$(bw get --session $BW_SESSION password proxmox_api)
|
||||
proxmox_api_token_id=$(bw get --session $BW_SESSION username f295a859-154a-482d-8129-c6ec6e06131e)
|
||||
proxmox_api_token_secret=$(bw get --session $BW_SESSION password f295a859-154a-482d-8129-c6ec6e06131e)
|
||||
ci_user=$(bw get --session $BW_SESSION username ci_details)
|
||||
ci_password=$(bw get --session $BW_SESSION password ci_details)
|
||||
ssh_key=$(bw get --session $BW_SESSION notes ssh_public_key_main)
|
||||
@ -18,9 +18,7 @@ tfusername=$(bw get --session $BW_SESSION username tofu_postgres)
|
||||
tfpassword=$(bw get --session $BW_SESSION password tofu_postgres)
|
||||
tfurl=$(bw get --session $BW_SESSION uri tofu_postgres)
|
||||
|
||||
|
||||
|
||||
echo 'proxmox_api_url = "'$proxmox_api_url'"' >> terraform.auto.tfvars
|
||||
echo 'proxmox_api_url = "'$proxmox_api_url'"' > terraform.auto.tfvars
|
||||
echo 'proxmox_api_token_id = "'$proxmox_api_token_id'"' >> terraform.auto.tfvars
|
||||
echo 'proxmox_api_token_secret = "'$proxmox_api_token_secret'"' >> terraform.auto.tfvars
|
||||
echo 'ci_user = "'$ci_user'"' >> terraform.auto.tfvars
|
||||
@ -31,8 +29,6 @@ echo 'passphrase = "'$passphrase'"' >> terraform.auto.tfvars
|
||||
echo 'tfusername = "'$tfusername'"' >> terraform.auto.tfvars
|
||||
echo 'tfpassword = "'$tfpassword'"' >> terraform.auto.tfvars
|
||||
echo 'tfurl = "'$tfurl'"' >> terraform.auto.tfvars
|
||||
|
||||
|
||||
echo 'lxc_template = "debian-12-standard_12.7-1_amd64.tar.zst"' >> terraform.auto.tfvars
|
||||
|
||||
|
||||
|
10
provider.tf
10
provider.tf
@ -90,11 +90,11 @@ variable "tfurl" {
|
||||
}
|
||||
|
||||
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
|
||||
pm_timeout = 3600
|
||||
pm_parallel = 2 # Fix VM HDD lock timeout
|
||||
pm_api_url = var.proxmox_api_url
|
||||
pm_user = "root@pam"
|
||||
pm_password = var.proxmox_api_token_secret
|
||||
pm_timeout = 3600
|
||||
pm_parallel = 2 # Fix VM HDD lock timeout
|
||||
# Optional: Skip TLS Verification
|
||||
# pm_tls_insecure = true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user