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

Cheatsheet: https://cheat-sheets.nicwortel.nl/terraform-cheat-sheet.pdf

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

Static analysis to find misconfigurations and vulnerabilities - https://www.checkov.io - https://github.com/bridgecrewio/checkov

Learn / Best practices

https://frontendmasters.com/courses/enterprise-devops/

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

Configuring a Highly Available Infrastructure in AWS using Terraform - https://faun.pub/configuring-a-highly-available-infrastructure-in-aws-using-terraform-2fc9dbb519b6

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

How to manage multiple environments with Terraform (Yevgeniy Brikman) - https://blog.gruntwork.io/how-to-manage-multiple-environments-with-terraform-32c7bc5d692

  1. Using workspaces
  2. Using branches
  3. Using

https://medium.com/@itsnarayan/optimizing-aws-infrastructure-leveraging-terraform-for-low-coupling-and-high-cohesion-a5ae6049ab1e

33 labs - https://www.whizlabs.com/infrastructure-automation-with-terraform/

Host a static website locally using Simple Storage Service (S3) and Terraform with LocalStack - https://docs.localstack.cloud/tutorials/s3-static-website-terraform/

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

Terraform Associate Certification

https://www.hashicorp.com/certification/terraform-associate

https://www.exampro.co/terraform

https://www.whizlabs.com/hashicorp-certified-terraform-associate/

https://www.udemy.com/course/terraform-associate-practice-exam