Skip to main content

Terraform

www.terraform.io

https://developer.hashicorp.com/terraform (new) - https://learn.hashicorp.com/terraform (old)

https://github.com/topics/terraform

https://github.com/topics/terraform-module

Tools

Generate terraform files from existing infrastructure (reverse Terraform) - https://github.com/GoogleCloudPlatform/terraformer

Wrapper for Terraform that provides extra tools for working with multiple Terraform modules - https://github.com/gruntwork-io/terragrunt

Go library that makes it easier to write automated tests - https://github.com/gruntwork-io/terratest

Collection of useful Terraform utilities - https://github.com/gruntwork-io/terraform-aws-utilities

Detect compliance and security violations - https://github.com/tenable/terrascan - https://runterrascan.io

Security scanner for your Terraform code - https://github.com/aquasecurity/tfsec - https://github.com/actions/starter-workflows/blob/main/code-scanning/tfsec.yml

Linter - https://github.com/terraform-linters/tflint - https://github.com/terraform-linters/tflint-ruleset-aws

Learn / Best practices

Terraform Best Practices for AWS users - https://github.com/ozbillwang/terraform-best-practices

https://github.com/bregman-arie/devops-exercises/blob/master/topics/terraform/README.md

https://github.com/MichaelCade/90DaysOfDevOps#learn-infrastructure-as-code

https://medium.com/devops-mojo/terraform-best-practices-top-best-practices-for-terraform-configuration-style-formatting-structure-66b8d938f00c

Comprehensive Guide to Terraform series by Yevgeniy Brikman

  1. Why we use Terraform and not Chef, Puppet, Ansible, Pulumi, or CloudFormation
  2. An Introduction to Terraform
  3. How to manage Terraform state
  4. How to create reusable infrastructure with Terraform modules
  5. Terraform tips & tricks: loops, if-statements, and gotchas
  6. How to use Terraform as a team

Examples

Multiple AWS accounts

You should have lots of AWS accounts - https://news.ycombinator.com/item?id=33069547 - https://www.reddit.com/r/aws/comments/xuq73y/you_should_have_lots_of_aws_accounts/ - https://src-bin.com/you-should-have-lots-of-aws-accounts/

AWS Control Tower Account Factory for Terraform:

CDK for Terraform

https://www.terraform.io/cdktf

Terraforming with TypeScript - https://radar.com/blog/terraforming-with-typescript