From d43f8af4faa526284bb2715cfa6ddc7617649713 Mon Sep 17 00:00:00 2001 From: Matt Reeves Date: Tue, 4 Jun 2024 00:19:58 -0400 Subject: [PATCH] adding whisper --- provider.tf | 24 +++++++++++++++++ whisper.tf | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 whisper.tf diff --git a/provider.tf b/provider.tf index 5a33287..298e7e4 100644 --- a/provider.tf +++ b/provider.tf @@ -13,6 +13,14 @@ provider "proxmox" { api_token = var.virtual_environment_api insecure = true + ssh { + agent = true + username = "root" + node { + name = "prox" + address = var.prox_ip_address + } + } } variable "virtual_environment_endpoint" { @@ -34,3 +42,19 @@ variable "arrbuntu_ip_address" { variable "downloaders_ip_address" { type = string } + +variable "whisper_ip_address" { + type = string +} + +variable "ssh_password" { + type = string +} + +variable "ssh_username" { + type = string +} + +variable "prox_ip_address" { + type = string +} \ No newline at end of file diff --git a/whisper.tf b/whisper.tf new file mode 100644 index 0000000..af217a3 --- /dev/null +++ b/whisper.tf @@ -0,0 +1,74 @@ +resource "proxmox_virtual_environment_vm" "Whisper" { + + # VM General Settings + node_name = "prox" + vm_id = 203 + name = "Whisper" + description = "Creates subtitles for Bazarr and stable-diffusion" + tags = ["tofu", "ubuntu-22"] + + agent { + enabled = true # read 'Qemu guest agent' section, change to true only when ready + } + + clone { + vm_id = 8000 + } + + # VM CPU Settings + cpu { + cores = 2 + type = "host" + } + + # VM Memory Settings + memory { + dedicated = 4096 + } + + # VM Network Settings + network_device { + bridge = "vmbr0" + vlan_id = 1 + } + + # VM Disk Settings + disk { + datastore_id = "Fast2Tb" + size = 40 + interface = "scsi0" + } + + vga { + type = "serial0" + } + + machine = "q35" + + hostpci { + device = "hostpci0" + pcie = true + mapping = "gpu" + rombar = true + } + + initialization { + ip_config { + ipv4 { + address = var.whisper_ip_address + gateway = var.vlan_gateway + } + } + + user_account {} + } + + lifecycle { + ignore_changes = [ + initialization[0].user_account[0].keys, + initialization[0].user_account[0].password, + initialization[0].user_account[0].username, + ] + } + +}