AI-Powered Terraform on Azure: From Beginner to Advanced
Build Azure infrastructure with Terraform 1.17, from your first resource to modules, state, testing, CI/CD and Terragrunt, with AI that drafts and humans who verify.
Created by DevOps Easy Learning · Designed by Tia

Launch price $49.99
This course isn’t open yet, so there is nothing to buy or enrol in. Press Notify me to hear when it opens.
No payment, no account needed. One email on launch day.
The plan
- 19 modules, 104 lessons in the plan
- 8 of 104 lessons recorded so far
- One email when it opens, if you ask for it
What you’ll learn
- Write, plan, apply and destroy Azure infrastructure with Terraform 1.17 and azurerm 5
- Manage remote state in Azure Storage with blob-lease locking, imports and refactoring blocks
- Build reusable modules and keep dev and prod environments apart
- Test and check Terraform with terraform test, TFLint and Checkov, and deliver it through GitHub Actions with OIDC and approvals
- Use AI to draft, explain and review Terraform safely, with a person approving every change
- Run many environments and subscriptions with Terragrunt
Course content
The whole course is planned below. Lessons marked Coming soon are on the way; the others are ready to watch.
- Welcome: what you'll build in AI-Powered Terraform on AzureDescribe the path from first resource to the enterprise capstone, explain how lessons, labs, quizzes and the AI strand fit together and plan a study rhythm that includes destroying every lab.Coming soon
- Your training account, safely: budgets, MFA and the cleanup habitTurn on MFA and avoid long-lived admin keys, create a budget alert below the training budget and find and delete leftover resources.Coming soon
- From click-ops to code: how infrastructure used to be managed9:42
- Quiz: Click-ops to code
- What Infrastructure as Code is and why it pays off8:29
- Quiz: What IaC is
- IaC tools compared: Terraform, OpenTofu, CloudFormation, Bicep and Pulumi9:23
- Quiz: IaC tools compared
- VS Code and the Terraform extensions6:09
- Quiz: VS Code and the Terraform extensions
- Install Terraform the right way: versions, tfenv and Docker7:23
- Quiz: Install Terraform the right way
- Your cloud CLI and credentialsInstall the cloud CLI, sign in without long-lived admin keys and check which identity Terraform will use.Coming soon
- HCL: blocks, arguments and resourcesRead a resource block (type, local name, arguments), tell blocks, arguments and expressions apart and explain what tags/labels are for.Coming soon
- The core workflow: init, fmt, validate, plan, apply, destroy8:16
- Quiz: The core workflow
- Comments and code styleUse #, // and /* */ comments, comment out a block safely and keep comments useful.Coming soon
- Terraform files and project layout7:57
- Quiz: Terraform files and project layout
- Providers and version constraintsDeclare required_version and required_providers, use ~>, >= and exact constraints and explain the provider's role between Terraform and the API.Coming soon
- The dependency lock file6:20
- Quiz: The dependency lock file
- Your first resources on the cloudCreate, change and destroy a first real resource, find it in the console and read the plan for a change versus a replacement.Coming soon
- Resource references: connect resources togetherReference another resource's attribute, explain how references create the dependency order and build a small connected stack.Coming soon
- Data sources: read what already existsWrite a data block with filters, use data sources for images, networks and identities and explain when to use a data source instead of a resource.Coming soon
- Interpolation and the format functionBuild strings with ${} interpolation, use format() with 1–4 arguments and apply a naming convention.Coming soon
- Tags: merge, default tags and a tagging standardCombine common and resource-specific tags with merge(), set organisation-wide tags once and find resources by tag.Coming soon
- Input variables, types and .tfvars filesDeclare variables with type, default and description, pass values with -var, -var-file and TF_VAR_ and explain variable precedence.Coming soon
- Locals: name an expression onceDefine locals, use them to avoid repetition and choose between a variable and a local.Coming soon
- String, number and bool variablesUse string, number and bool types, turn a resource on or off with a bool and catch wrong types early.Coming soon
- Collections: list, set and tupleUse list, set and tuple variables, explain order and duplicates and pick the right collection.Coming soon
- Structures: map, object, any and optional attributesUse map, object and map(object) types, make object attributes optional with defaults and explain why any should be rare.Coming soon
- Outputs: share resultsDeclare outputs, read them with terraform output (-raw, -json) and mark an output sensitive.Coming soon
- Variable validation and sensitive valuesWrite validation blocks with clear error messages, validate with regex, contains and length and mark inputs sensitive.Coming soon
- Variables in practice on the cloudDrive a real resource from variables and tfvars per environment, use a map of objects to create differently sized machines and keep secrets out of tfvars in Git.Coming soon
- terraform console: test expressions safelyOpen the console with variables loaded, explore maps, lists and nested objects and test an expression before putting it in code.Coming soon
- count, length and elementCreate N copies with count and count.index, use length() to size count and use element() to wrap around a list.Coming soon
- split and joinTurn a string into a list with split, turn a list into a string with join and combine them with other functions.Coming soon
- lookup and try: safe access to maps and objectsRead a map key with a default, use try() to fall back when an attribute is missing and choose between them and optional().Coming soon
- contains and conditional expressionsTest membership with contains(), write condition ? a : b and use conditions to switch settings per environment.Coming soon
- yamldecode: keep configuration in YAMLLoad YAML with yamldecode(file(...)), use path.module and validate what you load.Coming soon
- Splat expressionsCollect one attribute from many resources with [*], use it in outputs and compare with a for expression.Coming soon
- Loops: count, for_each and dynamic blocksCreate many resources with count and with for_each, explain why for_each is safer for named items and generate nested blocks with dynamic.Coming soon
- depends_on: hidden dependenciesExplain implicit vs explicit dependencies, use depends_on only when there is no reference and spot overuse.Coming soon
- Lifecycle rules: create_before_destroy, prevent_destroy, ignore_changesReplace without downtime using create_before_destroy, protect critical resources with prevent_destroy and ignore changes made outside Terraform.Coming soon
- Preconditions, postconditions and check blocksAdd a precondition that stops a bad plan, add a postcondition that guarantees a result and use a check block for health warnings.Coming soon
- Provider aliases: several regions and subscriptionsConfigure a second provider with alias, pass a provider to a resource and a module and explain the AWS v6 per-resource region option.Coming soon
- Bootstrap servers: user data and cloud-initPass a script at first boot, use templatefile() for variables and check the boot log.Coming soon
- Provisioners and terraform_data: the last resortRun local-exec and remote-exec, use terraform_data instead of null_resource and explain why provisioners are a last resort.Coming soon
- The state file: current vs desired stateExplain what state records and why, compare desired, current and recorded state and name the risks of local state.Coming soon
- Remote state with lockingCreate a secure state bucket or storage account, configure the backend with partial configuration and show locking and versioning.Coming soon
- Change and delete resources safelyRemove a resource by deleting its code, replace one with -replace and explain why editing or deleting the state file is dangerous.Coming soon
- Import existing resourcesImport with an import block and review the plan, generate configuration with -generate-config-out and compare with the terraform import command.Coming soon
- Refactor without destroying: moved and removed blocksRename or restructure resources with moved blocks, stop managing a resource with removed and read "has moved to" in a plan.Coming soon
- State commands: list, show, mv, rm and pullInspect state with list and show, move and remove items safely and back up state before surgery.Coming soon
- Read another stack's outputs: terraform_remote_stateExpose outputs from a network stack, read them from an app stack and choose between remote state and data sources.Coming soon
- Keep secrets out of state: ephemeral values and write-only argumentsGenerate a secret with an ephemeral resource, send it with a write-only argument and rotate it with a version number.Coming soon
- WorkspacesCreate and switch workspaces, use terraform.workspace in names and explain when workspaces are not enough.Coming soon
- Several environments and accountsPoint Terraform at different accounts or subscriptions, assume a role per environment and prevent applying to the wrong one.Coming soon
- One folder per environmentLay out modules/ and envs/dev, envs/prod, give each environment its own backend key and promote a change from dev to prod.Coming soon
- What modules are and how to call themExplain root and child modules, call a module with source and inputs and read its outputs.Coming soon
- Use registry modulesFind a trustworthy module in the registry, pin its version and read its inputs and outputs before use.Coming soon
- Write your own network moduleDesign a module's inputs and outputs, create subnets across zones with for_each and document the module.Coming soon
- Version, source and publish modulesVersion a module with Git tags, publish to the public registry from GitHub and use a private registry.Coming soon
- Compose modules: network, compute and dataWire modules together through outputs, keep each module small and avoid passing whole objects around.Coming soon
- Project: a production-style networkBuild the network module to the owner's requirement list, tag and name it with the convention and test it with terraform test.Coming soon
- Project: virtual machines and a secure jump hostBuild a VM module with optional public IP and user data, build a jump host that only your IP can reach and prefer keyless access where the cloud offers it.Coming soon
- Project: firewall rules and a container registry with loopsGenerate firewall rules from a map, create several registries with for_each and add lifecycle and scan settings.Coming soon
- Project: a database with secrets done rightCreate a managed database in private subnets, generate its password with write-only arguments and store connection details in a secret store.Coming soon
- Project: a state backend module with replicationPackage the state backend as a module, add cross-region replication and lock down who can read state.Coming soon
- Project: TLS certificates and DNSRequest a wildcard certificate, validate it with DNS records created by Terraform and wait for validation in the plan.Coming soon
- Project: Jenkins on the cloud with an agentLaunch a Jenkins controller and an agent from modules, reach it safely and tear it down completely.Coming soon
- fmt, validate and TFLint before every commitRun fmt, validate and TFLint locally, add them to a pre-commit hook and read and fix lint findings.Coming soon
- Test modules with terraform testWrite .tftest.hcl run blocks with asserts, mock the provider so tests are free and test validation with expect_failures.Coming soon
- Policy as code: Checkov, OPA and SentinelScan code with Checkov and read the findings, skip a check only with a written reason and check a plan with OPA and know where Sentinel fits.Coming soon
- GitHub Actions with OIDC: plan on pull request, apply on approvalTrust GitHub's OIDC token in the cloud, plan on pull requests and comment the plan and apply only after merge and a reviewer's approval.Coming soon
- HCP Terraform: remote runs, variable sets and dynamic credentialsCreate an organisation, project and workspace, run plans from VCS and use dynamic provider credentials instead of stored keys.Coming soon
- Terraform in Jenkins pipelinesWrite a Jenkinsfile with plan, approval and apply stages, use the agent's role instead of keys and apply the reviewed plan file.Coming soon
- Machine images with PackerWrite a Packer HCL template with variables, build an image with provisioners and use the image from Terraform.Coming soon
- Upgrade Terraform and providers safelyRead upgrade guides and changelogs, upgrade one version step in a branch with a clean plan and handle provider major versions.Coming soon
- OpenTofu: what changes and how to try itExplain the licence history, run a project with tofu and list the features that differ.Coming soon
- AI drafts, Terraform verifies: the rules of AI-assisted IaCState the rules (AI drafts, fmt, validate, tests, policy, plan and a person verify, never auto-apply), name what never goes into a prompt and explain why AI gets provider details wrong.Coming soon
- Prompt AI to write HCL: poor vs professional promptsWrite a professional prompt (role, context, task, constraints, output, checks), compare results of a poor and a professional prompt live and prove the result with fmt, validate, Checkov and plan.Coming soon
- AI explains plans and errors (and when it is wrong)Ask AI to summarise a plan with risks, troubleshoot an error with AI and confirm against the docs and recognise a confident wrong answer.Coming soon
- AI writes tests and refactors modules with moved blocksHave AI write terraform test cases and keep only those that catch a broken rule, have AI refactor a module into for_each with moved blocks and prove the refactor plans with no destroy.Coming soon
- The Terraform MCP server: an agent that reads current docsConnect an AI agent to the Terraform MCP server, let it look up current provider and module docs and keep its permissions read-only.Coming soon
- AI review of a pull request's plan in GitHub ActionsAdd an AI review job that comments risks, cost and blast radius, keep secrets out of what the AI sees and keep the human approval as the gate.Coming soon
- An AI-generated module through the full gateRun AI output through fmt, TFLint, tests, Checkov and a reviewed plan, fix what fails and decide when to reject AI output.Coming soon
- AI platform foundations as code: model access, identities and loggingProvision the AI platform's identities and least-privilege access, turn on invocation logging and tag and budget AI resources.Coming soon
- A RAG stack as codeBuild documents storage, embeddings and a vector index as code, connect a knowledge base to it and ask a grounded question and see the cited source.Coming soon
- Guardrails as codeDefine content and PII filters as code, deny topics with examples and test the guardrail before an app uses it.Coming soon
- Agents as codeProvision an agent runtime and its identity as code, limit its tools and permissions and estimate and cap its cost.Coming soon
- Why Terragrunt, and installing Terragrunt 1.xName the repetition Terraform leaves across environments (backends, providers, inputs), explain units and the live/modules split and install a pinned Terragrunt 1.x with a checksum check.Coming soon
- Units, root.hcl, include, inputs and the common.yaml conventionWrite a unit with terraform.source and inputs, include root.hcl with find_in_parent_folders("root.hcl") and expose its locals and build names from the owner's common.yaml (assetid, environment, project).Coming soon
- Generate blocks and the Terragrunt CLIGenerate provider and versions files once from root.hcl, run one unit or all units and list units and draw the dependency graph.Coming soon
- Generated remote state with native lockingDefine remote_state once in root.hcl, give every unit its own key with path_relative_to_include() and bootstrap or migrate state with terragrunt backend when a unit moves.Coming soon
- Dependencies, mock outputs and run --allRead another unit's outputs with a dependency block, plan before the dependency exists with mock outputs and predict the run --all order, run only affected units, and use hooks for checks.Coming soon
- The live layout: environments, accounts and subscriptionsLay out live/<environment>/<unit> with common.yaml per environment, generate a provider that targets the environment's account or subscription and promote a module version from development to staging to production.Coming soon
- Catalogs and stacksKeep modules and unit templates in a versioned catalog (scaffold, catalog), build an environment from one terragrunt.stack.hcl and move a live tree to stacks with no-change plans.Coming soon
- Terragrunt in CI: affected units and environment approvalsPlan only affected units on a pull request with --filter-affected, apply environment by environment behind approvals and run the same from Jenkins.Coming soon
- AI review of a Terragrunt change: the dependent-units blast radiusGive the AI the affected units, the dependency graph and each unit's plan, get the blast radius across dependent units and an environment-order check and keep the person's approval as the gate.Coming soon
- Day-2 with Terragrunt: drift, upgrades and safe destroyDetect drift every night across all units, upgrade Terraform, providers and Terragrunt across units on a branch and destroy in reverse order and prove nothing is left.Coming soon
- A managed Kubernetes control plane moduleCreate a cluster in the module 11 network, configure logging and endpoint access and connect kubectl.Coming soon
- Node groups: simple, blue-green and spotAdd node groups in private subnets, do a blue-green node upgrade with the owner's green/blue variables and use spot capacity safely.Coming soon
- Serverless and mixed capacityRun pods without managing nodes, mix serverless and node capacity and know the limits.Coming soon
- Cluster access: identities and RBACGrant users and roles cluster access as code, map them to Kubernetes RBAC and remove access cleanly.Coming soon
- Cluster add-ons with Terraform and HelmInstall add-ons with the Helm provider and IRSA/Pod Identity or workload identity, create namespaces with loops and clean up load balancers before destroying the cluster.Coming soon
- Capstone design: environments, state, modules and pipelineRead the capstone requirements, draw the folder, state and pipeline design and estimate the cost before building.Coming soon
- Build the modules and environmentsAssemble the owner's modules into the capstone, deploy dev and prove it with tests and a reviewed plan.Coming soon
- The pipeline: OIDC, tests, policy, AI review and approvalRun fmt, TFLint, tests and Checkov in the pipeline, add the AI review comment and promote dev to prod through approvals.Coming soon
- Operate it: drift, promotion and destroyDetect drift with plan -refresh-only and a scheduled pipeline, promote a module version to prod and destroy everything and prove it is gone.Coming soon
- Course wrap-up, final assessment and what to learn nextReview the skills gained, take the final assessment and choose the next course.Coming soon
Requirements
- A computer that runs VS Code, Terraform and Docker (Windows, macOS or Linux)
- An Azure account for the cloud labs, with a budget alert (set up in lesson 0.2)
- Basic command-line use
- No previous Terraform experience needed
About this course
Terraform is how most teams build cloud infrastructure today, and AI is changing how that code gets written and reviewed. This course teaches both the way a working DevOps engineer needs them: Terraform from your very first resource to modules, state, testing, CI/CD and Terragrunt on Azure, with AI used as a careful assistant, never as the one who applies.
Coming soon: this course is being recorded now. You can read the full plan below and press "Notify me" to get one email when the course opens for enrolment. Until then it can't be bought, and nothing is charged. The first lessons are already finished and can be watched as free previews.
What you'll learn
- The Terraform language and workflow on Terraform 1.17: HCL, init, plan, apply and destroy, providers, the lock file, variables, outputs, functions and loops.
- State done properly: remote state with native locking, imports, moved and removed blocks, and how to recover when state goes wrong.
- Modules and environments: your own reusable modules, the projects from the instructor's Terraform course, and dev and prod kept apart.
- Quality and delivery: terraform test, TFLint, Checkov and policy, then a GitHub Actions pipeline with OIDC and a person approving every apply.
- AI-Powered Terraform: professional prompts for Terraform, AI explaining plans and errors (including when it is wrong), AI-written tests and refactors, and an AI review comment on every pull request.
- Terraform for AI infrastructure: Microsoft Foundry, Azure AI Search, content filters and the Agent Service, as code.
- Terragrunt at scale: a live tree for many environments and accounts, dependencies, stacks and the same pipeline around it.
- Kubernetes with Terraform and an enterprise capstone that brings it all together.
How you learn
- Every lesson has a video, PDF slides, a lab ZIP with a README, and a quiz.
- Cloud-neutral lessons run on your own computer at no cost; cloud labs say their cost up front and end with
terraform destroyand a check that nothing is left. - The course is self-contained: you never need the AWS version.
Who it's for
DevOps, cloud and platform engineers, developers and system administrators who want to build Azure infrastructure as code, from beginner to advanced. No previous Terraform experience is needed.
Course designer
Tia
Course designer at DevOps Easy Learning