From 5b90471753a086b4aa7504cc1452c305f49d1628 Mon Sep 17 00:00:00 2001 From: jerick Date: Sun, 31 Aug 2025 19:47:31 +0000 Subject: [PATCH] initial terraform commit --- .gitignore | 5 +++++ README.md | 12 ++++++++++++ main.tf | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ variables.tf | 5 +++++ 4 files changed, 70 insertions(+) create mode 100644 .gitignore create mode 100644 main.tf create mode 100644 variables.tf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2fbd761 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.io +*.hcl +*.backup +*.tfstate +.terraform \ No newline at end of file diff --git a/README.md b/README.md index e69de29..05107d1 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,12 @@ +This will be the new iteration of the vpn VM +The idea is to have the entire VM's traffic tunneled through the vpn service with a killswitch. +TO DO +x Create machine +x Setup VPN connection via wireguard +x Configure tunnel +- Configure killswitch +- Install and configure NFS shares +- Install Docker +- Migrate containers +- Create MyAnonamouse token refresh script +- Retire old VM \ No newline at end of file diff --git a/main.tf b/main.tf new file mode 100644 index 0000000..d464cfe --- /dev/null +++ b/main.tf @@ -0,0 +1,48 @@ +terraform { + required_providers { + proxmox = { + source = "bpg/proxmox" + version = ">= 0.50.0" + } + } +} + + +provider "proxmox" { + endpoint = "https://192.168.0.166:8006" + api_token = var.proxmox_api_token + insecure = true +} + +#109 - ubuntu22 +#128 - ubuntu24 +#118 - debian12 +resource "proxmox_virtual_environment_vm" "media-management" { + name = "media-management" + node_name = "homestrg1" + clone { + vm_id = 128 + full = false + } + + cpu { + cores = 2 + } + + memory { + dedicated = 4096 + } + + disk { + datastore_id = "local-lvm" + interface = "scsi0" + size = "15" + } + + network_device { + model = "virtio" + bridge = "vmbr0" + } + + boot_order = ["scsi0"] +} \ No newline at end of file diff --git a/variables.tf b/variables.tf new file mode 100644 index 0000000..15ad9b5 --- /dev/null +++ b/variables.tf @@ -0,0 +1,5 @@ +variable "proxmox_api_token" { + description = "API token for Proxmox" + type = string + sensitive = true +} \ No newline at end of file