
Quick Intro of instructor
Explore why this Terraform course emphasizes core concepts and certification topics, not limited to a single cloud provider, with AWS, GCP, and Cloudflare scenarios.
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.
Explore Terraform's rich documentation at hashicorp.com/terraform/language, where each concept includes an example snippet, and learn to search 'terraform' plus your concept for clear explanations.
Learn the Terraform file structure and syntax, including .tf and .tf.json extensions, two base languages, and hll blocks with resource names and attributes.
Organize Terraform configurations using multiple .tf files, group resources by type, and place variables and providers in their respective files, while Terraform determines resource order.
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.
Learn to use locals to avoid repetition, create resource and data blocks for an S3 bucket, and expose attributes via outputs such as ID and ARN.
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.
Discover how to manage Terraform provider versions with semantic versioning and constraints, using tilde and range operators to auto-upgrade within minor and patch boundaries while avoiding breaking changes.
Use depends_on to enforce that s3 bucket versioning is enabled only after the bucket creation, handling cross-resource dependencies with a dependency array in Terraform.
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
Demonstrate managing the Terraform state with commands such as graph, output, state list, and state show. Learn to import existing resources and safely remove or inspect state details.
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.
Explore Terraform variable types, including string, number, bool, list, set, map, and object, and learn how declaring a type enforces inputs during plan execution.
Override values of variable
Learn how to enforce rules for variables with Terraform's validation block, using length checks to enforce prefixes for resources like S3 buckets, tested via the Terraform console.
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.