diff --git a/omada.tf b/omada.tf new file mode 100644 index 0000000..a1ee616 --- /dev/null +++ b/omada.tf @@ -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 = <> 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 diff --git a/provider.tf b/provider.tf index 007480b..af21439 100644 --- a/provider.tf +++ b/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 }