• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Terraform
  • Install
  • Tutorials
    • About the Docs
    • Configuration Language
    • Terraform CLI
    • Terraform Cloud
    • Terraform Enterprise
    • CDK for Terraform
    • Provider Use
    • Plugin Development
    • Registry Publishing
    • Integration Program
  • Registry(opens in new tab)
  • Try Cloud(opens in new tab)
  • Sign up
Terraform Home

Tutorials

Skip to main contentOverview

Get Started

  • AWS
  • Azure
  • Docker
  • GCP
  • OCI
  • Terraform Cloud

Fundamentals

  • CLI
  • Configuration Language
  • Modules
  • Provision
  • State
  • Terraform Cloud

Use Cases

  • Applications
  • AWS Services
  • Azure Services
  • HashiCorp Products
  • IT/SaaS Providers
  • Kubernetes
  • Machine Images
  • Networking
  • Policy
  • Security

Certification Prep

  • Associate Prep (002)
  • Associate Prep (003)
  • Associate Tutorials (002)
  • Associate Tutorials (003)

Production

  • Automate Terraform
  • Enterprise Patterns
  • Terraform Enterprise

Integrations

  • CDK for Terraform
  • Community Providers
  • Custom Framework Providers
  • Custom SDK Providers
  • Secrets

  • Resources

  • Tutorial Library
  • Certifications
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  • Terraform Registry
    (opens in new tab)
  1. Developer
  2. Terraform
  3. Tutorials
  4. Associate Tutorials (002)

Associate Tutorial List (002)

Study for the Terraform Associate (002) exam by following these tutorials. Login to Learn and bookmark them to track your progress. Study the complete list of study materials (including docs) in the Certification Prep guides.

Start
25 tutorials
  1.  
    3min
    What is Infrastructure as Code with Terraform?
    Learn how infrastructure as code lets you safely build, change, and manage infrastructure. Try Terraform.
    • Terraform
    • Interactive
    • Video
  2.  
    9min
    Install Terraform
    Install Terraform on Mac, Linux, or Windows by downloading the binary or using a package manager (Homebrew or Chocolatey). Then create a Docker container locally by following a quick-start tutorial to check that Terraform installed correctly.
    • Terraform
    • Interactive
    • Video
  3.  
    11min
    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.
    • Terraform
  4.  
    11min
    Build Infrastructure
    Authenticate to AWS and create an EC2 instance under the AWS free tier. Write and validate Terraform configuration, initialize a configuration directory, and plan and apply a configuration to create infrastructure.
    • Terraform
    • Video
  5.  
    2min
    Destroy Infrastructure
    Destroy the AWS EC2 instance you created in the previous tutorials. Evaluate the plan and confirm the destruction.
    • Terraform
    • Video
  6.  
    8min
    Store Remote State
    Configure Terraform to store state in Terraform Cloud. Add a remote state block directly to configuration or set an environment variable to load remote state configuration when Terraform initializes.
    • Terraform
    • Video
  7.  
    3min
    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.
    • Terraform
  8.  
    9min
    Migrate State to Terraform Cloud
    Migrate a state file to Terraform Cloud for secure storage and easy collaboration.
    • Terraform
  9.  
    15min
    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.
    • Terraform
  10.  
    7min
    Output Data from Terraform
    Output data about infrastructure with Terraform outputs. Provision a web application with Terraform, and use output values to export data about your application's infrastructure. Hide sensitive output values.
    • Terraform
  11.  
    14min
    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 to share data between Terraform projects and to support multiple availability zones.
    • Terraform
  12.  
    10min
    Create Resource Dependencies
    Create an implicit dependency between an EC2 instance and its Elastic IP using variable interpolation. Create explicit dependencies on an S3 Bucket and SQS Queue with depends_on. Learn how Terraform creates independent resources in parallel.
    • Terraform
  13.  
    12min
    Perform Dynamic Operations with Functions
    Use templatefile and lookup functions to generate dynamic user data for an EC2 instance and find a region-specific AMI.
    • Terraform
  14.  
    19min
    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.
    • Terraform
  15.  
    25min
    Import Terraform Configuration
    Import existing infrastructure into Terraform. In this tutorial, you will use Terraform import to manage an existing Docker container and learn important considerations to keep in mind when importing infrastructure into Terraform.
    • Terraform
  16.  
    12min
    Manage Resource Drift
    Create an AWS instance and security group. Manually change the instance to create drift in your Terraform state file. Reconcile your state drift and import your resources while avoiding downtime.
    • Terraform
  17.  
    9min
    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.
    • Terraform
  18.  
    15min
    Troubleshoot Terraform
    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.
    • Terraform
  19.  
    7min
    Modules Overview
    Read about how Terraform modules make configuration easier to organize, understand, reuse, and share. Learn about the directory structure of a module, and how to call them.
    • Terraform
  20.  
    12min
    Use Registry Modules in Configuration
    Use modules from the public Terraform Registry to define an Amazon VPC containing two EC2 instances. Select module and root input and output variables, install the modules, and apply the configuration.
    • Terraform
    • Interactive
  21.  
    18min
    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 paths with Cloudflare page rules. Alternatively, use ACM for SSL certificate management and Cloudfront for CDN.
    • Terraform
  22.  
    5min
    Provision Infrastructure with Cloud-Init
    Deploy preconfigured infrastructure with Terraform using the Cloud-Init tool.
    • Terraform
  23.  
    5min
    Provision Infrastructure with Packer
    Create an image with Packer, containing SSH keys, a new user, and a demo webapp, and deploy it with Terraform.
    • Terraform
    • Packer
  24.  
    4min
    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 in the Sentinel CLI against Terraform Cloud data.
    • Terraform
    • Interactive
  25.  
    11min
    Inject Secrets into Terraform Using the Vault Provider
    Configure the AWS Secrets Engine to manage IAM credentials in Vault through Terraform. Then use the short-lived, Vault-generated, dynamic secrets to provision EC2 instances.
    • Terraform
    • Vault
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)