Introduction to Infrastructure as Code with Terraform
What is Infrastructure as Code and Why is Terraform Useful?
Install Terraform on Mac, Linux, or Windows by downloading the binary or using a package manager (Homebrew or Chocolatey). Then...
Lock and Upgrade Provider Versions
Manage your provider versions using the dependency lock file. Use version constraints to filter provider versions compatible...
Authenticate to AWS and create an EC2 instance under the AWS free tier. Write and validate Terraform configuration, initialize...
Destroy the AWS EC2 instance you created in the previous tutorials. Evaluate the plan and confirm the destruction.
Store Remote State
Configure Terraform to store state in Terraform Cloud remote backend. Add a remote state block directly to configuration or set...
Log in to Terraform Cloud from the CLI
Log into Terraform Cloud or Enterprise with the Terraform CLI to migrate state, trigger remote runs, and interact with...
Migrate State to Terraform Cloud
Keep your state secure and share it with collaborators by migrating it to Terraform Cloud. Initialize the Terraform Cloud...
Customize Terraform Configuration with Variables
Customize infrastructure for a web application with Terraform. In this tutorial, you will use Terraform input variables,...
Output Data from Terraform
Output data about infrastructure with Terraform outputs. Provision a web application with Terraform, and use output values to...
Query Data Sources
Use a data source to configure an EC2 instance with an appropriate AMI for the current region. Use a remote state data source...
Create Resource Dependencies
Create an implicit dependency between an EC2 instance and its Elastic IP using variable interpolation. Create explicit...
Perform Dynamic Operations with Functions
Deploy a web app on an EC2 instance, with user data generated by the templatefile function and interpolation. Find an AMI for...
Manage Resources in Terraform State
Create an EC2 instance and security group, and move a resource to another state file. Remove, replace, and re-import resources...
Import Terraform Configuration
Import existing infrastructure into Terraform. In this tutorial, you will use Terraform import to manage an existing Docker...
Manage Resource Drift
Create an AWS instance and security group. Manually change the instance to create drift in your Terraform state file. Reconcile...
Use Refresh-Only Mode to Sync Terraform State
Use refresh-only plans and applies to update Terraform state to match real-world infrastructure. Understand the implicit...
Interpret and fix a Terraform configuration with common configuration language errors and deploy an EC2 instance with security...
Read about how Terraform modules make configuration easier to organize, understand, reuse, and share. Learn about the directory...
Use Modules from the Registry
Use modules from the public Terraform Registry to define an Amazon VPC containing two EC2 instances. Select module and root...
Host a Static Website with S3 and Cloudflare
Set up an S3-hosted static website with Cloudflare for DNS, SSL and CDN. Redirect HTTP traffic to HTTPS, and redirect certain...
Provision Infrastructure with Cloud-Init
Deploy preconfigured infrastructure with Terraform using the Cloud-Init tool.
Provision Infrastructure with Packer
Create an image with Packer, containing SSH keys, a new user, and a demo webapp, and deploy it with Terraform.
Install the Sentinel CLI
Install the Sentinel CLI, a binary that allows you to run Sentinel policies locally. Then test the install by running a policy...
Inject Secrets into Terraform Using the Vault Provider
Configure the AWS Secrets Engine in Vault through Terraform, then use the short-lived, Vault-generated, dynamic secrets to...