initial terraform commit

This commit is contained in:
2025-08-31 19:47:31 +00:00
parent c839890dea
commit 5b90471753
4 changed files with 70 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
*.io
*.hcl
*.backup
*.tfstate
.terraform

View File

@@ -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

48
main.tf Normal file
View File

@@ -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"]
}

5
variables.tf Normal file
View File

@@ -0,0 +1,5 @@
variable "proxmox_api_token" {
description = "API token for Proxmox"
type = string
sensitive = true
}