This repo contains the Work in Progress (WIP) for Data.gov's Infrastructure as Code using Terraform. Using Jenkins, Terraform, Packer to deploy Data.gov's Production Deployment.
Main directories:
- deprecated - legacy code used for reference
- docker - a dockerized jenkins used for testing
- opencontrol - security documentation in the Open Control format
- terraform - terraform is used to provision AWS infrastructure and resources, this folder contains terraform modules (reusable terraform code) to provision the VPC, Subnets, Security Groups, Route tables, etc to setup the Networking and architecture of Data.gov's production environmnet
-
Install Terragrunt using the appropriate package for you OS. You can also install via these methods:
- OSX - install Terragrunt on OSX using Homebrew:
brew install terragrunt
. - Linux - install Terragrunt on Linux systems using snap:
snap install terragrunt
. - Manually/Windows - install Terragrunt manually by going to the Releases Page, downloading the binary for your OS, renaming it to
terragrunt
, and adding it to your PATH (root directory here).
- OSX - install Terragrunt on OSX using Homebrew:
-
Go into the
terraform
folder and edit theterraform.tfvars
file which start withterragrunt = { ... }
block that contains the main configuration for Terragrunt and variables for Terraform (check out the terragrunt section for addition types of configuration Terragrunt supports):terragrunt uses hashicorp hcl
terragrunt = { # (put your Terragrunt configuration here) }
-
Now, instead of running
terraform
directly, run all the standard Terraform commands usingterragrunt
:terragrunt get terragrunt plan terragrunt apply terragrunt output terragrunt destroy
Terragrunt forwards almost all commands, arguments, and options directly to Terraform, using whatever version of Terraform have installed. However, based on the settings in your
terraform.tfvars
file, Terragrunt can configure remote state, locking, extra arguments, and lots more.
Terragrunt is a direct implementation of the ideas expressed in Terraform: Up & Running. Additional background reading that will help explain the motivation for Terragrunt includes the Gruntwork.io blog posts How to create reusable infrastructure with Terraform modules and How to use Terraform as a team.
We're so glad you're thinking about contributing to Data.gov!
Before contributing to Data.gov we encourage you to read our CONTRIBUTING guide, our LICENSE, and our README (you are here), all of which should be in this repository. If you have any questions, you can email the Data.gov team at [email protected].