Infrastructure as Code tutorials
Tutorials and best practices for the cloud
Step-by-step guides on Terraform / OpenTofu, AWS, Kubernetes and Ansible, from first steps to production-ready automation.
Start here
AWS with Terraform: The Essential Guide
A complete AWS environment built with Terraform / OpenTofu: VPC, subnets, security groups, EC2, RDS, DNS, auto scaling, load balancers, modules, remote state and CI/CD.
Latest tutorials
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: Terraform CI/CD (21)
Automate Terraform and OpenTofu on AWS with GitHub Actions: checks on every pull request, plan comments, approved applies and OIDC without keys.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: Terraform Tools (20)
The essential tools for Terraform and OpenTofu: fmt, validate, TFLint, Trivy, Checkov, terraform-docs, Infracost and pre-commit hooks.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: Terraform Backends (19)
Store the Terraform or OpenTofu state in an encrypted, versioned S3 bucket with native state locking, and migrate the local state to it.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: Terraform Modules (18)
Refactor the AWS network of the tutorial into a reusable Terraform module with variables and outputs, without recreating any resource.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS Load Balancers (16)
Use Terraform to create an Application Load Balancer with a target group, listeners and HTTPS in front of an Auto Scaling group on AWS.
- Terraform & OpenTofu Tutorials
AWS with Terraform Tutorial: AWS Auto Scaling (15)
Use the Terraform aws_launch_template and aws_autoscaling_group resources to run a self-healing, scalable group of EC2 instances on AWS.
- Terraform & OpenTofu Tutorials
Estimate AWS Costs in Terraform Pull Requests with Infracost
How to see the monthly cost of Terraform and OpenTofu changes before applying them with Infracost, and how to keep AWS demo costs under control.
- Terraform & OpenTofu Tutorials
AWS VPC Peering and Transit Gateway with Terraform
Connect AWS VPCs with Terraform or OpenTofu using VPC peering for simple cases or a Transit Gateway for many networks, with routes and a comparison of costs.
- Terraform & OpenTofu Tutorials
What is OpenTofu? The Open-Source Fork of Terraform Explained
OpenTofu is the open-source Infrastructure as Code tool, a fork of Terraform managed by the Linux Foundation. Learn what it is, how it works and how to start.