Terraform Auto Deployer

Github Link

Contribution

Creator

Abstract

Stemming from a need to rapidly deploy and maintain infrastructure on AWS, in 2022 I built a small repository that allowed me to CRUD infrastructure on AWS using just:

  // git push

How it works

  1. Whenever a new .tf file is added/deleted/modified on the main branch the GitHub Runner will trigger
  2. he GitHub Runner will download and install all the perquisites and run the included python script deploy.py
  3. The Python script will authenticate and deploy/modify/tear-down any infrastructure
  4. The Terraform State must be stored remotely ideally in AWS S3

Requirements

  • Git

Typical use case

Say you need to deploy a series of NginX s3-proxy servers on AWS. After setting up this repo, you would simply name the correct Docker image in your Terraform files and git push your changes to your GitHub Repo.

The provided python script will automatically deploy/maintain your infrastructure on AWS. All your AWS secrets and variables are not specified in the Terraform files but are instead stored as secrets on Github.

Tech Stack

  • Python 2/3
  • Hashicorp’s Terraform
  • Git