Learn what Terraform does when you run `terraform init` in a working directory. Initialize the backend, install providers, download modules, and explore the lock file and .terraform directory.
Create a Terraform plan
Learn how Terraform constructs an execution plan. Export a plan with the -out flag, review the plan contents, and apply a saved plan.
Apply Terraform configuration
Learn how Terraform applies configuration to change your infrastructure. Provision a Docker container, introduce an apply error, note how Terraform handles errors, and perform basic troubleshooting.
Customize Terraform configuration with variables
Customize infrastructure for a web application with Terraform. In this tutorial, you will use Terraform input variables, including lists, maps, strings, and booleans, to make the configuration for your infrastructure more flexible.
Output data from Terraform
Use output values to export data about the resources Terraform manages. Hide sensitive output values.
Manage Terraform versions
Update an existing configuration to work with a newer version of Terraform. Use the required_version setting to pin the Terraform versions for your projects. Manage different versions of Terraform across your team.
Lock and upgrade provider versions
Manage your provider versions using the dependency lock file. Use version constraints to filter provider versions compatible with your configuration. Update your lock file to use a new provider version.
Apply changes to an AWS S3 bucket and bucket objects using resource targeting. Target individual resources, modules, and collections of resources to change or destroy. Explore how Terraform handles upstream and downstream dependencies.
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 to manage state and reconcile drift in your infrastructure.
Import Terraform configuration
Use configuration to import existing infrastructure into Terraform. Review important considerations when bringing infrastructure under Terraform management.
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 refresh behavior in Terraform plan and apply operations.
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 Terraform Cloud.
Migrate state to Terraform Cloud
Migrate a state file to Terraform Cloud for secure storage and easy collaboration.
Interpret and fix a Terraform configuration with common configuration language errors and deploy an EC2 instance with security groups in AWS. Learn best practices for logging application errors and reporting bugs.
Develop configuration with the console
Use the Terraform console to inspect resources and evaluate Terraform expressions before using them in configurations. Configure an S3 bucket with an IAM role to restrict access by IP address.
Verify Terraform binary archives
Verify that the terraform executable is secure. Download, verify, and install HashiCorp's PGP public key. Download a Terraform archive and signed checksum. Verify that the Terraform archive matches the checksum file.