Infrastructure as Code Library

A collection of over 300,000 lines of reusable, battle-tested, production-ready infrastructure code for AWS, GCP, and Azure.

You don't have to reinvent the wheel

Most teams have the same basic infrastructure needs: server cluster, load balancer, database, cache, CI/CD, monitoring, secrets management, and so on. Why waste time building it all from scratch? At Gruntwork, we are a team of DevOps experts who have spent thousands of hours creating a library of reusable, battle-tested infrastructure code that has been used in production by hundreds of companies, and now you can leverage all of it with the Infrastructure as Code Library.

What's in the Library?

The Infrastructure as Code Library consists of 40+ GitHub repos, some open source, some private, each of which contains reusable, battle-tested infrastructure code for AWS, GCP, and Azure, written in Terraform, Go, Bash, and Python.

Name Description Tags
AWS VPC Create a best-practices Virtual Private Cloud (VPC) on AWS. Includes multiple subnet tiers, netwo...
AWS
Subscriber-Only
Monitoring and Alerting Configure monitoring, log aggregation, and alerting using CloudWatch, SNS, and S3. Includes Slack...
AWS
Subscriber-Only
EC2 Container Service (ECS) Deploy a best-practices ECS Cluster and run Docker containers on it as ECS Services. Includes zer...
AWS
Subscriber-Only
EC2 Kubernetes Service (EKS) Deploy a best-practices EKS cluster and run Docker containers on it as Kubernetes services. Suppo...
AWS
Subscriber-Only
Kubernetes Helm Server Deploy a best-practices Tiller (Helm Server) to your Kubernetes cluster. Supports namespaces, ser...
AWS GCP Azure
Open Source
Auto Scaling Group Run stateless and stateful services on top of an Auto Scaling Group. Supports zero-downtime, roll...
AWS
Subscriber-Only
AWS Load Balancer Run the highly-available and scalable load balancers in AWS: Application Load Balancer (ALB), Net...
AWS
Subscriber-Only
Lambda Deploy and manage Lambda functions with Terraform and build serverless apps. Automatically upload...
AWS
Subscriber-Only
API Gateway Build serverless applications by defining APIs in Swagger, running your app locally using SAM, an...
AWS
Subscriber-Only
Security A collection of security best practices for managing secrets, credentials, and servers. Includes ...
AWS GCP Azure
Subscriber-Only
Continuous Delivery A collection of scripts and Terraform code that implement common CI and build pipeline tasks incl...
AWS GCP Azure
Subscriber-Only
Relational Database Run MySQL, Postgres, MariaDB, or Amazon Aurora on Amazon’s Relational Database Service (RDS). Cre...
AWS
Subscriber-Only
Distributed Cache Run Redis or Memcached clusters using Amazon’s ElastiCache Service. Creates the cluster, sets up ...
AWS
Subscriber-Only
Stateful Server Set up a best-practices deployment of a single, stateful server on top of AWS, such as Jenkins or...
AWS
Subscriber-Only
AWS Static Assets Deploy your static content and static websites on S3, optionally with a CloudFront distribution i...
AWS
Subscriber-Only
MongoDB Cluster Deploy a MongoDB cluster, including replica sets, sharding, an automated bootstrapping process, b...
AWS
Subscriber-Only
Kafka Deploy a cluster of Apache brokers that can automatically bootstrap themselves. Includes support ...
AWS
Subscriber-Only
ZooKeeper Deploy an Apache ZooKeeper cluster that can automatically bootstrap itself. Includes support for ...
AWS
Subscriber-Only
ELK Deploy and manage an ELK cluster. Includes support for deploying separate Elasticsearch, Logstash...
AWS
Subscriber-Only
OpenVPN Server Deploy an OpenVPN server and manage user accounts using IAM groups. Includes automatic install an...
AWS
Subscriber-Only
Messaging Create SQS queues with support for FIFO, message retention, message delays, content-based dedupli...
AWS
Subscriber-Only
Google Kubernetes Engine (GKE) Terraform modules for running a Kubernetes cluster on Google Cloud Platform (GCP) using Google Ku...
GCP
Open Source
GCP VPC Create a best-practices Virtual Private Cloud (VPC) on GCP. Includes multiple subnet tiers, firew...
GCP
Open Source
Google Cloud SQL Run relational databases such as MySQL and PostgreSQL on Google Cloud Platform (GCP) using Cloud ...
GCP
Open Source
GCP Static Assets Manage static assets (CSS, JS, images) on GCP using Google Cloud Storage and HTTP Load Balancers.
GCP
Open Source
Google Cloud Load Balancer Perform load balancing on GCP using Google Cloud Load Balancer, with support for HTTP, HTTPs, and...
GCP
Open Source
kubergrunt kubergrunt is a standalone go binary with a collection of commands that attempts to fill in the g...
AWS GCP
Open Source
Kubernetes Services Package services into a best-practices deployment for Kubernetes. Supports zero-downtime, rolling...
AWS GCP Azure
Open Source
Consul Deploy a best-practices HashiCorp Consul cluster. Includes support for automatic bootstrapping, c...
AWS GCP Azure
Open Source
Nomad Deploy a best-practices HashiCorp Nomad cluster. Includes support for automatic bootstrapping, au...
AWS GCP Azure
Open Source
Vault Deploy a best-practices HashiCorp Vault cluster for secrets management. Includes support for auto...
AWS GCP Azure
Open Source
Couchbase Deploy a best-practices Couchbase cluster. Includes support for automatic bootstrapping, running ...
AWS
Open Source
Influx Deploy a best-practices TICK stack (Telegraf, InfluxDB, Chronograf, Kapacitor). Includes support ...
AWS
Open Source
Terratest Terratest is a Go library that makes it easier to write automated tests for your infrastructure c...
AWS GCP Azure
Open Source
gruntkms Make secrets management easy using this command-line tool that can encrypt and decrypt data using...
AWS
Open Source
ssh-grunt A tool that allows you to manage SSH access to EC2 Instances using either AWS IAM or your Identit...
AWS
Subscriber-Only
aws-auth A small wrapper script for the AWS CLI that makes it much easier to authenticate to AWS with Mult...
AWS
Subscriber-Only
bash-commons A collection of reusable Bash functions for handling common tasks such as logging, assertions, st...
AWS GCP Azure
Open Source
cloud-nuke A tool for cleaning up your cloud accounts by nuking (deleting) all resources within it.
AWS
Open Source
gruntwork-installer A simple, lightweight package manager for installing Gruntwork modules.
AWS GCP Azure
Open Source
fetch A tool that makes it easy to download files, folders, and release assets from a specific git comm...
AWS GCP Azure
Open Source
pre-commit A collection of pre-commit hooks for Terraform, bash, Go, and more.
AWS GCP Azure
Open Source
gruntwork A CLI tool to perform Gruntwork tasks, such as bootstrapping your GitHub and AWS accounts for the...
AWS
Subscriber-Only
package-terraform-utilities A collection of miscellaneous utilities and helper modules for use with Terraform. Includes modul...
AWS GCP Azure
Open Source

Infrastructure as Code Library Features

Infrastructure as Code

Infrastructure as Code

Over 300,000 lines of code written in Terraform, Go, Python, and Bash

Documented

Documented

Includes example code and thorough documentation

Tested

Tested

Every commit goes through a suite of automated tests

Reusable

Reusable

Highly reusable, configurable, and composable

Proven

Proven

Proven in production with dozens of Gruntwork Customers

Supported

Supported

Commercially maintained and supported by Gruntwork

Updated

Updated

We continually make updates, additions, and fixes to the library

Full Code Access

Full Code Access

You get access to 100% of the code

No Lock-In

No Lock-In

If you ever choose to cancel, you keep rights to all the code

How do I get access to this code?

To get access to all the code in the Infrastructure as Code Library, you must be a Gruntwork Subscriber. Check out the pricing page for details.