aamoyel / terraforge

A Terraform repo to deploy VMs on Proxmox and automate some configurations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terraform VM Forge

asciicast

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact

About The Project

This project allows you to create fresh VMs instances on Proxmox. Tools like Cloud-Init, HashiCorp Vault, phpIPAM and PowerDNS are integrated to automate and simplify VMs configurations. Features are:

  • Dynamic password generation for root user with Vault.
  • Get the first IP addr of subnet of your choise with phpIPAM
  • Configurate VM network, hostname and root password at start.
  • Create dns record with your VM name and IP addr.

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

You need to have an instance of :

  • Proxmox
  • HashiCorp Vault
  • phpIPAM
  • PowerDNS

After that, you need to have a cloud-init template in Proxmox and terraform binary on a PC/server.

Installation

  1. Clone the repo :
    git clone git@github.com:aamoyel/terraforge.git && cd terraforge
  2. Configure your APIs credentials and URLs in terraform.tfvars.json.
  3. Init your terraform directory and install deps.
    terraform init

(back to top)

Usage

  1. Setup your VMs in vm-instances.json, exemple here :
     {
       "my-vm-name": {
         "cores": "2",
         "sockets": "1",
         "memory": "2048",
         "network": "vmbr1",
         "subnet": "PRD",
         "domain": "amoyel.loc"
       }
     }
  2. Create the instance :
    terraform apply

(back to top)

License

Distributed under the Apache-2.0 license. See LICENSE.txt for more information.

(back to top)

Contact

Alan Amoyel - @AlanAmoyel

Project Link: https://github.com/aamoyel/terraforge

(back to top)

About

A Terraform repo to deploy VMs on Proxmox and automate some configurations.

License:Apache License 2.0


Languages

Language:HCL 100.0%