Terraform for Azure & AWS
From First Principles to Production-Grade Deployments in 2 days
Terraform remains the clearest path to reproducible, reviewable cloud infrastructure. In this course, you’ll go from a clean slate to confidently provisioning on both Azure and AWS using a single, disciplined workflow. We’ll focus on what actually ships: real providers, real backends, real guardrails. Your instructor brings 30+ years of industry experience and builds with production conventions—not academic exercises. You’ll practice on VS Code connected to a remote Ubuntu server, treating your IDE and state the way teams really do. We’ll finish with event-driven patterns and cross-region deployments that stitch together SNS, SQS, Lambda, EventBridge, ECS (for .NET services), RDS, DynamoDB, Parameter Store, EC2, and Azure VMs—using modern provider features and current best practices. (For reference and further reading: Terraform release cadence & features, AWS provider v6 updates, Azure VM resources.)
Learning outcomes
- Author idiomatic Terraform configurations (HCL), manage state remotely with locking, and enforce formatting/validation/test layers.
- Configure and use multiple providers and aliases to deploy across AWS regions and Azure subscriptions/tenants.
- Provision core Azure resources (resource groups, networking, Linux/Windows VMs, identities) using the current azurerm_*_virtual_machine resources.
- Build an AWS event-driven backbone with SNS, SQS (incl. DLQs), EventBridge rules/targets, and Lambda triggers, spanning multiple regions.
- Deploy .NET services on ECS (Fargate or EC2 capacity), front them with ALB, and persist with RDS/DynamoDB; manage configuration in SSM Parameter Store; launch and manage EC2.
- Work effectively from VS Code via Remote-SSH into the Ubuntu training host.
Prerequisites
- Comfortable with basic Linux shell and Git.
- An Azure subscription with permissions to create resource groups, networking, and VMs; an AWS account with administrative sandbox access.
- VS Code installed locally; ability to connect to the provided Ubuntu server via Remote-SSH (we’ll validate extension setup together).
Training outline (single, comprehensive sequence)
- Foundations of Terraform
- What Terraform is and isn’t; workflow (init, plan, apply, destroy)
- HCL syntax essentials: variables, locals, outputs, expressions, for-each/count, dynamic blocks
- Providers and authentication
- Provider blocks, versions, and constraints
- Multiple provider configurations and alias for multi-region/multi-account patterns
- Credentials patterns: env vars, profiles, service principals, OIDC workload identities
- State management
- Local vs remote state; why remote matters
- S3 backend with server-side encryption and DynamoDB state locking
- Azure Storage backend with state access policies and soft-delete
- State drift, import, and moved blocks; safe refactors
- Composition and reuse
- Modules: inputs/outputs, version pinning, registries
- Terragrunt vs pure Terraform modules (pros/cons)
- Quality and safety
- fmt, validate, tflint, checkov basics
- Plans in CI; policy as code intro (Sentinel/OPA)
- Working environment: VS Code on a remote Ubuntu server
- Remote-SSH setup and troubleshooting
- Folder layout for multi-cloud repos; .terraform.lock.hcl hygiene
- Using the Terraform CLI on the remote box from VS Code terminals
- Secrets handling and environment parity on remote hosts
- Azure with Terraform: compute and core resources
- AzureRM provider setup: subscription/tenant, service principal auth, features block
- Resource hierarchy: resource groups, tags, naming conventions
- Networking primitives: VNets, subnets, public IPs, NICs, NSGs, route tables
- Virtual machines (current resources)
- Linux VM via azurerm_linux_virtual_machine (managed disks, images, SSH)
- Windows VM via azurerm_windows_virtual_machine (WinRM, passwords, images)
- VM extensions (Custom Script), boot diagnostics, availability sets vs zones
- Managed identities and Key Vault access; attaching data disks
- Reusable module for Azure VM deployments (inputs for size, image, networking)
- Packaging: variables/outputs, depends_on, lifecycle, data sources
- AWS core setup with Terraform
- AWS provider v6 highlights and region support
- Provider configuration, profiles, STS; tagging strategies
- Enhanced multi-region support and when to use explicit alias blocks
- Remote state on S3 with DynamoDB locking and KMS encryption
- Bootstrap: S3 bucket, DynamoDB lock table, IAM policies
- State file protections, versioning, and recovery playbook
- AWS provider v6 highlights and region support
- Messaging & eventing on AWS (event-driven backbone)
- Amazon SNS
- Topics, subscriptions, delivery policies, encryption, access control
- Amazon SQS
- Standard vs FIFO, DLQs and redrive policies, visibility timeouts, SSE/KMS
- Amazon EventBridge
- Event buses (default/custom), rules, targets, input transformers, archives/replays
- Pipes and Scheduler: routing and time-based invocations
- AWS Lambda
- Function packaging (incl. .NET 8), execution roles, VPC networking
- Event source mappings from SQS, DynamoDB Streams, Kinesis
- Cross-service wiring patterns
- Fan-out: EventBridge rule → SNS topic → SQS subscriptions
- Queue-to-Lambda with DLQ and retries
- Cross-region mirroring patterns for high availability
- Reusable Terraform module structure for eventing stacks
- Amazon SNS
- Containers & compute for services (.NET focus)
- ECS fundamentals: clusters, capacity (Fargate vs EC2), task definitions, services
- Networking and discovery: ALB/NLB, target groups, Service Connect/service discovery
- CI/CD handoff: image tags, immutable deployments, blue/green considerations
- Terraform resources & modules: aws_ecs_cluster, aws_ecs_task_definition, aws_ecs_service
- Observability hooks: CloudWatch logs, metrics/alarms, autoscaling policies
- Data services on AWS
- Amazon RDS
- Subnet groups, parameter/option groups, storage, engine versions, backups
- Blue/green updates and maintenance windows
- Amazon DynamoDB
- Table design inputs (PK/SK), GSIs/LSIs, TTL, streams, on-demand vs provisioned
- Global Tables v2 and multi-region replication considerations
- Terraform resources & modules for RDS and DynamoDB; import strategies and drift handling
- Amazon RDS
- Configuration and secrets
- AWS Systems Manager Parameter Store
- Hierarchies, types (String, SecureString), KMS, policies and tiers
- Referencing parameters from Lambda/ECS tasks and Terraform data sources
- Azure Key Vault vs Parameter Store: when to use which in multi-cloud setups
- Terraform resources and data sources: aws_ssm_parameter, data.aws_ssm_parameter
- AWS Systems Manager Parameter Store
- EC2 & foundational compute on AWS
- aws_instance for quickstarts; AMI lookups; key pairs; user data
- Security groups vs NACLs; IMDSv2; instance profiles
- Patterns for immutable vs in-place changes; lifecycle caveats
- Cross-region deployment patterns
- Provider aliasing vs region arguments; scoping state/workspaces
- Replication primitives: S3 CRR for artifacts, DynamoDB Global Tables for stateful apps
- EventBridge buses/rules across regions and accounts
- Testing and promotion strategies (per-region plans)
- Putting it together: cohesive, production-ready structure
- Repo layout: environments/, modules/, stacks/
- Makefile/task runner for common Terraform tasks
- CI plans and gated applies; tagging/chargeback; documentation generation
- Incident playbooks: rollbacks, taint/replace, emergency import
Practical, connected learning
My wider training approach brings hands-on implementation and systems thinking together, connecting technology with real operational needs.