diff --git a/proxmox/terraform/README.md b/proxmox/terraform/README.md index df45125..01c606c 100644 --- a/proxmox/terraform/README.md +++ b/proxmox/terraform/README.md @@ -1,64 +1,64 @@ # What Terraform allows to transparently declare our infrastructure as code. Providing a (non-official so far) plugin, we can provision vm the same way for our rocq infra (proxmox) -# The road so far - ## Prepare workstation See prepare-workstation.md ## setup.sh Create a `setup.sh` file holding the PM_{USER,PASS} information: ``` export PM_USER=@pam export PM_PASS= ``` source it in your current shell session. ``` source setup.sh ``` -## provision new vm +## provision infra ``` terraform init terraform apply ``` # Details -The provisioning is bootstraping vm declared in ".tf" files. It's using a base -template (debian-9-template, debian-10-template) installed in the hypervisor. -Instructions are detailed in the `init-template.md` file. +The provisioning is bootstraping vms declared in ".tf" files (in dependency +order if any). + +It's using a base template (either debian-9-template, debian-10-template) +installed in the hypervisor. Instructions are detailed in the +`init-template.md` file. -# Init +## Init This initializes your local copy with the necessary: ``` terraform init ``` -# Plan changes +## Plan changes -Compulse all *.tf files present in the folder, then compute a -differential plan: +Parse all *.tf files present in the folder, then compute a differential plan: ``` terraform plan ``` -# Apply changes +## Apply changes Propose to apply the plan to the infra (interactively): ``` terraform apply ``` diff --git a/proxmox/terraform/prepare-workstation.md b/proxmox/terraform/prepare-workstation.md index 2355775..8f8e4f4 100644 --- a/proxmox/terraform/prepare-workstation.md +++ b/proxmox/terraform/prepare-workstation.md @@ -1,26 +1,26 @@ This is the required tooling for the following to work. # terraform-provider-proxmox go module to install ``` git clone https://github.com/Telmate/terraform-provider-proxmox cd terraform-provider-proxmox # compile terraform proxmox provider export GOPATH=`pwd` make setup make make install -# Install so that terrafor actually sees the plugin +# Install so that terraform actually sees the plugin mkdir -p ~/.terraform.d/plugins/linux_amd64 cp -v ./bin/* ~/.terraform.d/plugins/linux_amd64/ ``` At the end of this, `terraform init` within /proxmox/terraform/ should now work. Doc: https://github.com/Telmate/terraform-provider-proxmox/blob/master/README.md