Introduction to Terraform on Azure
4h 13mBeginner2025-09-04
Authors
Prince Mokut
System, Cloud, and DevOps Engineer
Course details
In this course Prince Mokut—a certified Cloud and DevOps engineer—teaches intermediate cloud and DevOps professionals how to harness the power of Terraform to manage and automate Azure infrastructure. Learn how to configure Terraform, set up Azure credentials, and write effective configurations using HCL. Explore best practices for variables and state management with Azure Blob Storage. Dive into advanced topics, such as creating reusable modules, managing multiple environments with workspaces, and integrating CI/CD pipelines using Azure DevOps. Plus, gain practical experience deploying key Azure resources and establishing temporary QA environments for rapid testing. By the end of the course, you will be equipped with the skills to build, secure and tear down production-ready infrastructure on Azure using Terraform.
Learning objectives
Install and configure the Terraform CLI, set up Azure Credentials.
Understand the role of Terraform providers to establish a solid foundation in Infrastructure as Code.
Write and customize Terraform configurations, manage variables and tfvar files and execute essential Terraform commands to provision and manage Azure resources.
Automate infrastructure deployments using CI/CD pipelines, enabling seamless orchestration of resource provisioning and supporting ephemeral QA environments.
Apply best practices in organizing Terraform code, managing sensitive data with environment variables, and debugging Terraform configuration issues.
Learning objectives
Install and configure the Terraform CLI, set up Azure Credentials.
Understand the role of Terraform providers to establish a solid foundation in Infrastructure as Code.
Write and customize Terraform configurations, manage variables and tfvar files and execute essential Terraform commands to provision and manage Azure resources.
Automate infrastructure deployments using CI/CD pipelines, enabling seamless orchestration of resource provisioning and supporting ephemeral QA environments.
Apply best practices in organizing Terraform code, managing sensitive data with environment variables, and debugging Terraform configuration issues.
Skills covered
TerraformHashiCorpData CentersIntroduction toCloud AdministrationDatabase ManagementAzureCloud PlatformsCloud ComputingMicrosoft
Concepts
0. Introduction
- 01 - From clicks to code - Terraform for Azure
- 02 - What you should know
- 03 - Exercise files on GitHub
1. Introduction to Terraform
- 04 - What is Terraform
- 05 - Benefits of using Terraform
- 06 - Terraform vs. other IaC tools
- 07 - Installing the Terraform CLI
- 08 - Configuring Azure credentials for Terraform
- 09 - Overview of Terraform providers
2. Terraform Fundamentals
- 10 - Writing your first Terraform configuration
- 11 - Understanding Terraform's HCL syntax
- 12 - Key Terraform commands - Init, plan, apply, and destroy
- 13 - Declaring variables and using tfvar files
- 14 - Best practices for managing configuration with variables
3. State Management and Workspaces
- 15 - What are workspaces
- 16 - Using Terraform workspaces
- 17 - Define and provision Azure VM with workspaces
- 18 - Understanding Terraform state (local vs. remote)
- 19 - Configuring remote state using Azure Blob Storage
- 20 - Implementing state locking and versioning
4. Terraform Modules
- 21 - Why use modules
- 22 - Defining variable for compute module
- 23 - Defining compute infrastructure
- 24 - Reference and deploy compute module
- 25 - Defining Azure SQL database module
- 26 - Defining an Azure Web App module
- 27 - Deploying our modules
- 28 - Destroying our provisioned resources
5. Terraform Deployments with Azure DevOps Pipelines
- 29 - Introduction to CI CD for Terraform
- 30 - Configure and clone your DevOps project
- 31 - Configure service principal and variable groups
- 32 - Define CI workflow for Terraform
- 33 - Define environments and dev CD workflow
- 34 - Automating deployments in Azure - Staging and production
- 35 - Approval gate for production workflow
- 36 - Destroy resources with CI CD
Conclusion
- 37 - Put your Terraform skills to work