
Prepare by meeting three requirements: install Terraform on your system, configure an Azure subscription with the Azure CLI, and install VS Code with Terraform extensions to start deploying infrastructure.
Explore how Terraform deploys infrastructure from templates using variables and modules, then initialize, plan, and apply changes against a centralized state file.
Create your first Terraform template to deploy a resource group in Azure, using the Azure Resource Manager provider, main.tf, and the West Europe region.
Explore moving to Terraform version 0.14, updating provider syntax from the old block to a required_providers block, and resolving init warnings when declaring the Azure provider.
Initialize Terraform, plan the changes, and apply them to Azure resource groups, using AZ login authentication, backend setup, and state management to deploy and destroy resources.
Apply a Terraform template to deploy an Azure web app, app service plan, and resource group in a chosen region, with environment variables and a connection string.
Deploys an Azure web app by initializing the Azure provider, planning and applying a Terraform template to create a resource group, app service plan, and app service, then destroys them.
Learn to parameterize Terraform templates with variables files, replacing hardcoded names and locations, enabling dev, test, and prod deployments through Variables.tf and var references.
Override variables in Terraform templates using variables.tf and .tfvars (or .auto.tfvars) files to centralize env-specific values for dev, test, and prod, and preview changes with terraform plan.
Override terraform variables at runtime using the -var flag to pass values from the command line, improving security and CI/CD workflows. For example, override the resource_group_name value.
Create and use output variables in Terraform to extract resource details like web app URL and outbound IP addresses from Azure App Service after deployment, then reference them in templates.
Learn how Terraform plan and apply initialize the repo, generate a plan, and update the TF state and Azure resources.
Generate a Terraform plan by comparing the template with the current state in Azure, preview changes to the app service, app service plan, and resource group, then apply the plan.
Explore how to centralize and lock the Terraform state file to avoid conflicts when deploying Azure resources, using an Azure storage blob as the shared source of truth.
Learn how Terraform init downloads providers, refreshes state, and uses plan and apply to deploy infrastructure to Azure, including subnet changes, via a json plan file.
Explore how to deploy infrastructure across dev, test, and prod using Terraform. Learn to use modules, separate folders or workspaces, and plan and apply with environment-specific variables and state.
deploy a production environment with Terraform by planning and applying a prod resource group, managing state files, and using workspaces to configure dev, test, and prod environments.
Deploy a web app and its Azure SQL database using Terraform, configuring an app service plan, resource group, and a connection string via environment variables.
Learn to deploy a Terraform template to dev, test, and prod with Terraform workspaces. Map environment names to resource groups and maintain per-workspace state in Terraform.tfstate.d for Azure resource groups.
Switch Terraform workspaces to manage prod, dev, and test in Azure; use plan and apply to create a prod resource group and track state locally per workspace.
Deploy an Azure Kubernetes Service and an Azure Container Registry ECR with Terraform, then enable authentication using a system-assigned managed identity so the cluster authenticates to ECR without passwords.
Demonstrates deploying Azure resources with Terraform: provision aks, acr, and ecr, and role assignments, using Terraform init, plan, and apply, with managed identity and outputs like login server and fqdn.
Deploy azure container apps with Terraform by creating a resource group, log analytics, and a container environment, then expose an endpoint via ingress and route traffic to the latest revision.
Deploy infrastructure in the cloud by running Terraform init, plan, and apply to create a resource group, log analytics workspace, app environment, and container app, then access the app URL.
Automate Azure key vault deployment with Terraform by creating a resource group, a key vault, and a secret with an access policy.
Demonstrates deploying a Terraform template to create a resource group, a key vault, and a secret, then review access policies and RBAC with Active Directory in Azure.
Discover how to use Azure Key Vault with RBAC to grant access to specific secrets, keys, and certificates through per-secret role assignments, and see how this works with Terraform.
Demonstrate deploying azure key vault with terraform and airbag authorization to manage secrets, certificates, and rbac for secrets officer and secrets user.
Use Terraform to create an Azure storage account and container with public blob access, then upload a local file as a block blob and reveal the blob endpoint.
Deploys a Terraform template to create an Azure storage account, a container, and a blob with init, plan, and apply, and references the GitHub repository for the template.
Terraform is becoming the standard when it comes to deploying infrastructure into the cloud or on premise.
In this course you will learn how to create and deploy Terraform templates.
We will work with the different Terraform commands like init, plan, apply and destroy.
We'll explore terraform features like input and output parameters, the execution plan and the remote backend state.
We'll write templates for Web Apps, SQL Database, VMs, Storage, Kubernetes clusters and many more.
We'll create the DevOps CI/CD pipelines using Azure DevOps and Github Actions to deploy into multiple environments: dev, test and prod.
Then we'll implement GitOps for Terraform using Atlantis.
Along all these demonstrations you'll also learn the Best practices in terms of security, configuration and scalability.
I hope you are ready and excited for this journey!
Bring a coffee and lets get started.
Current plan:
Intro
Intro to Terraform (Init, Plan, Apply, Delete)
Requirements (Terraform, Azure subscription, Azure CLI, VS Code+TF plugin, any OS)
ResourceGroup
Deploying Resource Group into Azure
Pay Attention to Resource Recreation
Validate and Format Templates
WebApp
Deploying Web App
Adding Variables File
Creating Variables in .tfvars Files
Overriding Variables in the command line
Creating Output Variables
Execution Plan
Overview of Terraform Plan
Demo
TF_State
Working with Remote Backend State
Infra Deployments
Deploying SQL Server with a Database
Deploying and configuring Web App and SQL Server
Deploying Linux VM
Deploying Windows VM with Azure Bastion
Deploying AKS cluster
Deploying AKS with Managed Identity and ACR
Terraform features
Functions (for each, for, count, if/else, random, lower, upper, min, max…)
DevOps with Terraform
Deploy Terraform templates using Azure DevOps
Configuring the CI/CD pipelines
Upcoming lectures:
Data Source
Workspaces/Environments
Testing TF with Terratest
Multicloud
Deploy to AWS and GCP
GitOps with TF (Atlantis…)
TF with ARM
TF competitors: Ansible, Pulumi, ARM, Cloud Formation
TF Providers for Kubernetes, Helm, Docker, GIT…