
Explore core Terraform concepts through 40+ practical demos, covering providers, resources, variables, state, modules, and Terraform Cloud workflows, with AWS-centric examples and hands-on GitHub guidance.
Learn how infrastructure as code with Terraform automates and accelerates provisioning from development to disaster recovery, using code templates, GitHub, and Terraform Cloud for audit, scale, and security.
Install terraform on macOS by downloading the binary, unzipping, and moving it to /usr/local/bin. Verify version and set up AWS CLI, VS Code, and the Terraform plugin for writing configurations.
Install Visual Studio Code, the HashiCorp Terraform plugin, and AWS CLI to set up a Terraform development environment; configure credentials in the next lecture.
Configure AWS credentials for the AWS CLI by creating an IAM user and access keys, run aws configure with the key, secret, region us-east-1, json output.
Install and configure Terraform and AWS CLI on Windows by downloading, unzipping, and placing Terraform in the path, then installing AWS CLI v2 and configuring credentials.
Learn to install Terraform on Linux by following OS-specific steps in the Linux tab, with Ubuntu, Fedora, and Amazon Linux, using the provided installation link.
Learn the Terraform core workflow by mastering the five commands—init, validate, plan, apply, and destroy—and provision a simple EC2 instance using provider plugins.
Master Terraform basics by updating the manifest with the AMI ID and region, ensuring a default VPC and AWS credentials, and practicing init, validate, plan, apply, and destroy.
Execute Terraform core commands to initialize provider plugins, validate configuration, plan and apply to create an AWS EC2 instance, and destroy it when finished using the Terraform manifests folder.
Master Terraform language basics by exploring blocks, arguments, attributes, meta-arguments, identifiers, and comments, and learn how Terraform configuration files (.tf and .tf.json) are structured and executed.
Explore arguments, attributes, and meta arguments inside a resource block, and learn how required and optional arguments, argument references, and attribute references shape AWS resource outputs.
Understand Terraform top-level blocks and their three categories—fundamental, variable, and calling—and master key blocks like terraform settings, provider, resource, input variables, output values, local values, data sources, and modules.
Explore Terraform top level blocks, including required version, required providers, remote backend and DynamoDB state locking, and define providers, resources, input variables, outputs, local values, data sources, and modules.
Explore the Terraform fundamental blocks—Terraform block, provider block, and resource block—covering required version, backend state configuration, provider configurations, root versus child modules, and resource provisioning with provisioners (EC2, S3).
Explore the Terraform block and learn to set required version, providers, and backend, plus how remote state can be stored in an S3 bucket with DynamoDB.
Upgrade your terraform cli on your local desktop from version 0.14.4 to the latest version, 0.14.6, by downloading, unzipping, and replacing the binary in /usr/local/bin, then verify the version.
Configure a Terraform block with required_version to enforce your local CLI version. Learn version constraint operators (>=, <, tilde, exact), observe Terraform init behavior, and lock file responses.
Define required_providers in the terraform settings block to specify providers, their sources, and version constraints. Use terraform init and terraform init -upgrade to download, install, and adjust provider versions.
Use the Terraform required_version with the tilde and greater-than constraint to lock minor versions (0.x.x) and prevent major upgrade breakage.
Explore how Terraform providers power infrastructure automation, connect to cloud APIs via the AWS provider, and manage dependencies with the provider block, required providers, and the dependency lock file.
Define the Terraform and provider blocks for the AWS provider, set the region, and configure authentication using static, environmental, and shared credentials via an AWS profile.
Create an aws_vpc resource with cidr 10.0.0.0/16 and tags in us-east-1, then plan, apply (auto-approve optional), verify, and destroy to clean up Terraform state.
Configure Terraform multiple providers with aliases to manage resources across regions. Create one VPC in US East One and another in US West One using AWS.AWS-West One.
Shows how to configure multiple provider configurations in Terraform with aliases to create two vpcs in us-east-1 and us-west-1, then clean up by destroying resources and removing state files.
Terraform 0.14 introduces a provider dependency lock file that records chosen provider versions in the current working directory, ensuring consistent runs across your team with checksum verification.
Demonstrates creating an S3 bucket with a random_pet-based name using Terraform, validating and applying with the AWS provider version constraint and an existing .terraform.log.HCL to lock dependencies.
Upgrade the AWS provider with Terraform init -upgrade, observe 3.x changes to S3 bucket configuration and region handling, and use the dependency lock file to prevent breakages, followed by clean-up.
Learn terraform resources from language basics to resource syntax and behavior. Explore terraform state and the terraform.tfstate file, plus meta arguments like depends_on and count with hands-on templates.
Explore Terraform resource syntax and behavior, including resource blocks, types, block labels, and arguments, plus meta-arguments like count, life cycle, and for_each, with examples of AWS_VPC and AWS_instance.
Explore resource behavior in Terraform, including create, destroy, update in place, and destroy and recreate, and see how the state file tracks resources to guide changes.
Observe step-by-step how Terraform creates an AWS EC2 instance, AWS_instance.myEC2VM, using init, validate, fmt, plan, apply, and tracks state.
Discover how Terraform state maps AWS EC2 resources to configuration, review the terraform.tfstate file, and compare local versus remote state with S3 and DynamoDB.
Explore how Terraform updates an EC2 instance in place by adding a new tag, using plan and apply to synchronize desired and current state.
Explore Terraform resource behavior when a change triggers destroy and recreate, using an availability zone update to see plan outputs, replacement, and apply steps.
Explore the concepts of desired state and current state in Terraform, comparing configuration files to provisioned resources. Learn to manage state with commands and steps, including clean-up via terraform destroy.
Explore resource meta arguments in Terraform, including depends_on, count, for_each, provider, and life cycle. Learn how provisioners and connections enable post-creation actions.
Explore the Terraform depends_on meta-argument to control resource and module creation order, using explicit dependencies, direct references, and last-resort usage to manage VPC resources and EIP provisioning.
Create an ec2 key pair named terraform-key and review c1-versions.tf. Learn about Terraform blocks, required versions, and provider settings for the us-east-1 region.
Learn to manually create a VPC with subnets, internet gateway, route table, and security group in the AWS management console, then replicate the setup using Paraform.
Create a complete virtual private cloud with Terraform by provisioning a VPC, subnet, internet gateway, route table, routes, associations, and a security group with ingress and egress rules.
Create a Terraform AWS EC2 instance in a VPC public subnet, using a t2.micro Amazon Linux 2 AMI, with Apache installed via user data and linked to a security group.
Learn to create an Elastic IP resource with the depends_on meta-argument in Terraform, ensuring the Internet Gateway and VPC exist before associating the Elastic IP with an EC2 instance.
Verify the created VPC, EC2 instance, Elastic IP, IGW, subnet, and route table, confirm httpd is accessible via user data, then destroy resources and clean up state files.
Use the Terraform count meta-argument to create multiple instances from a single resource or module, with count.index for unique naming; modules gained count support in Terraform 0.13.
Use Terraform's count meta-argument to spin up five aws_instance resources from a single template, apply count.index for unique names, and perform plan, apply, and clean-up steps.
Learn how the Terraform for_each meta-argument creates multiple resource instances from maps or sets, using each.key and each.value, with demos creating S3 buckets and IAM users.
Implement meta-argument for_each with maps to create multiple environment S3 buckets from a single resource, using key-value maps for dev, QA, and staging.
Implement the for_each meta argument with a set of strings to create four AWS IAM users from one resource, illustrating each.key and each.value mapping during plan, apply, and destroy.
Understand the Terraform resource meta-argument lifecycle, including create_before_destroy, prevent_destroy, and ignore_changes, to control how resources are created, destroyed, and updated.
Explore Terraform's lifecycle meta-argument by enabling create_before_destroy to ensure a new resource is created before destroying the old one, contrasting with the default destroy-then-recreate behavior on zone changes.
Enable the Terraform life cycle block to verify create_before_destroy by creating the AWS instance in one A before destroying one B, and observe the create-first, then-delete behavior.
Implement the lifecycle prevent_destroy meta-argument, create an EC2 instance, and verify terraform_destroy prevents deletion; learn to disable it or use -target, then roll back.
Test the ignore_changes lifecycle meta argument in Terraform by creating an EC2 instance, manually adding tags, and validating that changes are ignored when the ignore_changes block is enabled.
Explore resource provisioners in Terraform, including file, remote exec, and local exec provisioners, with planned coverage in section 09 and a pause on earlier provisioner topics.
Learn the three terraform variable types—input variables, output values, and local values—with a deep dive into input variables, cli overrides, and practical step-by-step examples, preparing for printing outputs after apply.
Master Terraform input variables to customize modules, override defaults, and share configurations; learn prompts, -var, var-file, auto.tfvars, environment variables, complex types, validation, and sensitive variables.
Learn how to define and use Terraform input variables, including AWS region, EC2 AMI ID, instance count, and security groups, to configure an EC2 instance with user data.
Define and apply Terraform input variables to create VPC SSH and VPC web security groups with ingress and egress rules and attach them to an EC2 instance.
Learn to use Terraform input variables assigned when prompted via the CLI. Define EC2 instance type without a default, run plan and apply to see prompted values and changes.
Override default input variable values in Terraform with the -var flag during plan and apply, and use a plan file to apply changes like instance type and count.
Learn how to assign Terraform input variables using terraform.tfvars, overriding defaults in variables.tf with values like EC2 instance count and type, and run validate, plan, and apply.
Assign input variables using the -var-file argument to load environment-specific values from web.tfr, app.tfr, dev.tfr, and prod.tfr, enabling flexible Terraform plans and auto-loading defaults.
Learn how Terraform automatically loads input variables with auto.tfvars extensions, like web.auto.tfvars, eliminating the need for var file arguments, and validate with plan showing t3.large and t3.xlarge.
Learn to implement complex Terraform input variables by defining lists and maps, using list of string with defaults, and referencing them in resources.
Explore complex constructor of type map in Terraform by defining a map of strings to drive EC2 instance tags and instance types, using default maps and referencing them in resources.
Implement a custom validation rule for the EC2 AMI-ID input variable, requiring length greater than four and a prefix of AMI-, with a specific error message when validation fails.
Learn to mark Terraform variables as sensitive, redact values in outputs and logs, protect secrets in tfvars and state files, and avoid leaking via environment variables or command history.
Discover how Terraform determines variable values via precedence, where the last value wins across sources such as environmental variables, terraform.tfvars, tfvars.json, autotfvars, and -var/-varfiles.
Explore the Terraform file function to read the apache install.sh into EC2 user data, replacing eof, launch a web server, test via public IP, then destroy.
Learn how Terraform output values expose EC2 attributes after apply, including public and private IPs and public DNS, and how root and child modules use attribute and argument references.
Explore Terraform outputs with a practical demo showing how to emit EC2 attributes—public IP, private IP, security groups, and public DNS—via outputs.tf using attribute and argument references.
Explore applying the dry principle in Terraform with local values to assign expressions to simple names, reducing repetition and centralizing changes.
Implement local values in Terraform to create dynamic S3 bucket names from app name and environment name using locals.
Explore terraform data sources, data blocks, and data resources. Use the aws ami data source to get the latest Amazon Linux AMI id for EC2.
Create an AWS AMI data source to fetch the latest Amazon Linux AMI, using filters, then wire data.aws_ami to the EC2 configuration, replacing the static AMI IDs.
Run terraform validate and plan to fetch the latest amazon linux ami id, refining filters with most recent and name rejects to target the correct ami in a data source.
Master terraform state management with remote AWS S3 backend and DynamoDB state locking, and learn core commands like show, refresh, plan, and apply with targeted state changes.
Understand how Terraform backend enables remote state storage with an AWS S3 bucket for the state file and DynamoDB for state locking, enabling shared access and preventing race conditions.
Configure an s3 backend for terraform remote state using the Terraform Stack Simplify bucket in us east 1, enabling versioning and a dev/terraform.tfstate key.
Create an AWS DynamoDB table to enable Terraform state locking, configure the backend with the table, then run init, plan, and apply to observe the state lock acquire and release.
Explore how Terraform backends define state storage and locking. Learn how operations run via CLI and Terraform Cloud and Enterprise, and distinguish enhanced backends (local, remote) from standard backends.
Learn to read Terraform plan and state using the Terraform Show command, view plan outputs like V1 plan.out, and inspect remote state in an S3 bucket with DynamoDB locking.
Explore how the Terraform refresh command updates the local state file to reflect drift between the desired state and current state, guiding plan and apply decisions.
Learn to use terraform state list, show, and mv to inspect, rename, and relocate resources within state files, with dry runs and careful plan versus apply.
Master terraform state rm to remove resources from state, perform dry runs, and manage AWS EC2 instances. Then use terraform state replace provider to switch providers in the state file.
Learn how to use Terraform state pull to download and output the state (stdout), push to remote state, and force unlock for disaster recovery with AWS S3 and DynamoDB locking.
Use terraform taint to force a resource to be destroyed and recreated when changes require replacement. Use untaint to revert, then run terraform plan to confirm no changes.
Learn to use terraform plan and apply with the -target option to focus changes on a subset of resources. Only for exceptional circumstances, avoid routine use due to drift.
Execute Terraform destroy auto approve, plan that out, clean up the dot terraform folders, and revert demo tags and outputs to a demo-ready state.
Learn cli based Terraform workspaces, including the default, how to switch for testing, and how they differ from Terraform cloud workspaces, with commands such as show, list, new, select, delete.
Implement Terraform workspace support with local and remote backends by updating manifests, using Terraform.workspace for workspace-specific naming, and configuring counts and outputs to handle multiple workspaces.
Create resources in the default Terraform workspace with a local backend. Learn workspace basics, run plan and apply, and deploy two EC2s with security groups and IP/DNS outputs.
Create a new Terraform workspace, deploy dev infrastructure using the same config, and review per-workspace state files (terraform.tfstate.d), with one EC2 and two security groups in the dev workspace.
Switch between Terraform workspaces on a local backend, destroy resources in the default workspace, then delete non-default workspaces, noting that the default cannot be deleted while active.
Explore how to use Terraform workspaces with a remote S3 backend, create dev and QA states, and observe state files in S3 and DynamoDB for lock management.
Explore how Terraform provisioners work, including creation and destroy time behavior, and compare file, remote exec, and local exec provisioners with connection blocks and null resources.
Explore the file provisioner and its SSH connection block in Terraform, using self to access the remote instance and copy files and folders to /tmp.
Explore creation time provisioners in Terraform and test the file provisioner by running terraform commands, provisioning an EC2 instance, copying files to /tmp, and verifying via ssh.
Explore provisioner failure behavior in Terraform, using on failure to continue to create resources despite errors, with creation-time file provisioners and taint concepts demonstrated in practical demos.
Demonstrates the local-exec provisioner executing a local command after remote EC2 resource creation, outputting creation time private IP to a file and destroy time to another file.
Explore using a null resource with provisioners, aided by the null and time providers, to deploy content to an EC2 instance via remote exec with 90-second sleep and timestamp triggers.
Deploy and test an aws ec2 setup using a null resource with file and remote provisioners, executing validate, plan, and apply to sync app files.
******* Course Overview *******
Welcome to this Amazing course on HashiCorp Certified: Terraform Associate -50 Practical Demos. Below is the list of modules covered in this course.
Course Modules
01. Infrastructure as Code (IaC)
02. Install Tools on MacOs, LinuxOS and WindowsOS
03. Command Basics
04. Language Syntax
05. Settings Block
06. Providers Block
07. Multiple Providers usage
08. Dependency Lock File Importance
09. Resources Syntax and Behavior
10. Resources Meta-Argument - depends_on
11. Resources Meta-Argument - count
12. Resources Meta-Argument - for_each
13. Resources Meta-Argument - lifecycle
14. Input Variables - Basics
15. Input Variables - Assign When Prompted
16. Input Variables - Override default with cli var
17. Input Variables - Override with environment variables
18. Input Variables - Assign with terraform.tfvars
19. Input Variables - Assign with tfvars var-file argument
20. Input Variables - Assign with auto tfvars
21. Input Variables - Lists
22. Input Variables - Maps
23. Input Variables - Validation Rules
24. Input Variables - Sensitive Input Variables
25. File Function
26. Output Values
27. Local Values
28. Datasources
29. Backends - Remote State Storage
30. State Commands
31. CLI Workspaces with local backend
32. CLI Workspaces with remote backend
33. File Provisioner
34. local-exec Provisioner
35. remote-exec Provisioner
36. Null Resource
37. Modules from Public Registry
38. Build Local Module
39. Terraform Cloud - VCS-Driven Worflow
40. Terraform Cloud - CLI-Driven Worflow
41. Terraform Cloud - Share modules in private module registry
42. Migrate State to Terraform Cloud
43. Basic Sentinel Policies
44. Cost Control Sentinel Policies
45. CIS Sentinel Policies
46. State Import
47. Graph
48. Functions
49. Dynamic Expressions
50. Dynamic Blocks
Each of my courses come with
Amazing Hands-on Step By Step Learning Experiences
Real Implementation Experience
Friendly Support in the Q&A section
30 Day "No Questions Asked" Money Back Guarantee!