A set of opentofu (terraform fork) examples to dive into the code
- opentofu
- proxmox
- OPTION ovh account (with a domain)
- OPTION direnv
- OPTION loop cloud images
- OPTION ansible installation + role proxmox
- OPTION scaleway account
wget https://github.com/opentofu/opentofu/releases/download/v1.7.1/tofu_1.7.1_linux_amd64.zip
unzip tofu_1.7.1_linux_amd64.zip
mv tofu /usr/local/bin/
curl -sfL https://direnv.net/install.sh | bash
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
cd proxmox-clone-direnv
direnv allow
GET : /domain/zone/example.com/record/*
PUT: /domain/zone/example.com/record/*
DELETE: /domain/zone/example.com/record/*
GET: /domain/zone/example.com/record
POST: /domain/zone/example.com/record
POST: /domain/zone/example.com/refresh
- </> Ansible role
▶️ YT ansible loop▶️ YT opentofu loop
- </> Ansible role
▶️ YT opentofu + ansible⚠️ ansible and opentofu should be on same user⚠️ invars.tf
you must add the ssh key of user to allow ansible to connect to the vm
tofu version
tofu init
tofu plan
tofu apply
tofu destroy
main.tf
: change IP/Gateway/Resolvervars.tf
: setup PROXMOX_ vars and put your SSH key
main.tf
: change IP/Gateway/Resolvervars.tf
: and put your SSH key.envrc
: setup PROXMOX_ vars- cd to the directory and execute
direnv allow
provider.tf
: change application keys and secretmain.tf
: change PTR_A and PTR_CNAME
⚠️ idx fromvars.tf
is used to setup dns ipmain.tf
: change IP/Gateway/Resolver (192.186.1.) and the idw value will be added on IP 192.168.1.180vars.tf
: setup proxmox node name, put your SSH key, be sure to have VM's generic templates [1003,1001] in place.envrc
: setup PROXMOX_ vars- cd to the directory and execute
direnv allow
main.tf
: change IP/Gateway/Resolver, change ANSIBLE_HOME to match yoursvars.tf
: and put your SSH key.envrc
: setup PROXMOX_ vars- cd to the directory and execute
direnv allow
main.tf
: Adjust firewall to match your restrictionsvars.tf
: Setup PROJECT_ID,zone,region,type and image.envrc
: setup SCW_ vars- cd to the directory and execute
direnv allow
- </> Setup BPG/provider
- </> Setup OVH
- </> Setup Scaleway
▶️ Playlist YT proxmox▶️ Direnv