
Quick Intro of instructor
Get to know why terraform and advantage
Collect code snippets, exercise problems, and solutions in the course repository for the Terraform course. Fill out the repository with all details by the end of the course.
Get terraform installed
Download VS Code for your OS from code.com and install it, then open extensions, search for Terraform, and install the official HashiCorp Terraform extension.
Learn the Terraform file structure and syntax, including .tf and .tf.json extensions, two base languages, and hll blocks with resource names and attributes.
Master Terraform blocks by using resource blocks to create resources and data blocks to query existing ones, following the syntax of block type, resource type, and unique resource name.
Terrafrom providers over view
What is provider and how to add them in the terraform file
Learn how to pass credentials to providers like AWS, GCP, or Kubernetes using provider authentication configurations, environment variables, or files, avoiding hard-coded secrets.
Hello World : To apply changes
Learn to use additional options in Terraform commands, concatenate local values with prefixes or suffixes, ensure unique resource names, and run targeted apply or destroy with auto-approve.
Apply Terraform best practices by splitting configurations into focused files (s3.tf, data.tf, output.tf, local.tf), organizing resources by type, and using consistent naming such as camel, snake, kebab, or Pascal case.
Learn how Terraform's resource lifecycle controls create, destroy, and replacement behavior. Use lifecycle blocks like create_before_destroy and prevent_destroy to safely rename resources and retain or replace them as needed.
Terraform uses a state file to track resources and reconcile with the provider, and commands like terraform init and terraform apply update and enforce the recorded state.
Learn to use import block in terraform
Learn how Terraform state locking works with an S3 backend, using DynamoDB for a lock table to prevent concurrent changes, and how to manage, initialize, and release locks.
Discover built-in Terraform functions across numeric, string, and list categories, including upper and lower transforms. Test them in the Terraform console for real-world naming and data handling.
Explore Terraform variables using the variable block, define descriptions, types, and defaults, and reference them as var.name in code, comparing with locals and understanding dynamic input during plan.
Override values of variable
Learn how to write dynamic Terraform code using count to create multiple S3 buckets, manage state as an array, reference count.index, and build unique names with local values.
Learn to replace count with for_each in Terraform, handle maps and lists with each.key and each.value, and track renamed resources using mode and moved blocks.
Use a conditional statement in Terraform to create dynamic bucket names and counts based on environment variables. The ternary style chooses values for prod and non prod.
Learn how to use terraform dynamic blocks to efficiently generate multiple security group egress rules from a single variable, using for_each, list of objects, and optional fields.
Master terraform validate to catch syntax errors before init, plan, or apply, and use terraform format with --recursive to format code across nested folders for better linting.
Learn to debug Terraform code by setting TF_LOG to trace, debug, or error, export logs with TF_LOG_PATH, and diagnose plan outputs and expired credentials.
Build a reusable Terraform module for self-service S3 bucket creation, using providers, variables, and locals to create prefixed e- buckets with environment handling.
Learn to consume a Terraform module by declaring a module block with a local source, then init, plan, and apply to create an S3 bucket in an environment.
Enforce provider version constraints at the module level to prevent breakage in multi-region resources, using version ranges and module consumers with terraform init.
This course provides a comprehensive introduction to Terraform, an infrastructure as code software tool which is widely used in industry. You will learn how to define and provision infrastructure using a high-level configuration language. The course covers key concepts such as providers, resources, modules, and state management. You will start with the basics of Terraform, understanding its core principles and how it integrates with various providers like AWS , GCP , Cloudflare and more
As you progress, you will delve into more advanced topics such as managing dependencies, using Terraform modules to create reusable infrastructure components, and implementing best practices for writing and organizing Terraform code. The course also includes hands-on labs and real-world scenarios to help you gain practical experience.
By the end of the course, you will be able to manage infrastructure efficiently and effectively using Terraform. You will have the skills to write clear and maintainable Terraform configurations, troubleshoot common issues, and collaborate with team members on infrastructure projects. Whether you are a beginner looking to get started with infrastructure as code or an experienced professional seeking to enhance your skills, this course will provide you with the knowledge and tools you need to succeed in managing modern cloud infrastructure.