From 1f321db8949b3aeb80afdd7a94e92b7743c3e275 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Fri, 11 Aug 2023 16:28:54 +0000 Subject: Work --- terraform/README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 terraform/README.md (limited to 'terraform/README.md') diff --git a/terraform/README.md b/terraform/README.md new file mode 100644 index 0000000..11c1762 --- /dev/null +++ b/terraform/README.md @@ -0,0 +1,42 @@ +This part of the repo is responsible for creating +our home-lab infrastructure using Terraform. + +# First time +``` +terraform init +cp con.env.example con.env +``` +Modify `con.env` with your Proxmox access creds. + +> Due to [this](https://github.com/bpg/terraform-provider-proxmox/issues/344) issue, +we cannot use the recommended approach dedicated TF user's API access. + +# Usual flow +``` +source con.env + +terraform plan -out=tfplan +#terraform plan -target="proxmox_lxc.testvm" -out=tfplan + +terraform apply "tfplan" +``` + +# Teardown +``` +terraform destroy +terraform destroy -target="proxmox_lxc.testvm" +``` + +# A note about GPU pass-through +At the moment, this provider does not support passing through the Host's GPU or iGPU +to the guest VM/LXC. So, if you have Guests that require this, you need to do it manually +by adding the following config on Proxmox `/etc/pve/lxc/.conf`: +``` +lxc.cgroup2.devices.allow: c 226:0 rwm +lxc.cgroup2.devices.allow: c 226:128 rwm +lxc.cgroup2.devices.allow: c 29:0 rwm +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file +``` + +> I do this for my Nextcloud, and Plex containers. -- cgit v1.2.3