DevOps · DOP-01

Infrastructure as Code with Terraform

Infrastructure as Code with Terraform is a course in defining infrastructure as code, covering HCL, providers, state, modules, separate dev and production environments, remote state for teams, terraform import and CI/CD, with hands-on work on AWS and Azure. It suits DevOps and cloud engineers, system administrators and developers who want to replace manual setup with automation.

Updated
From 9,450 THB / person 10,500 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration18 hours · 3 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

Building and changing infrastructure by hand through a web console creates inconsistency, leaves no audit trail and makes it hard to reproduce an environment. Terraform solves this by expressing infrastructure as code that lives in Git, is reviewed through pull requests and can be recreated identically every time, using one tool across multiple cloud providers. This course takes learners from zero to team-ready Terraform, covering the HCL language, providers and resources, safe state management, variables and outputs, reusable modules, separating dev and production environments, remote state for teamwork, importing resources that already exist, secure secret handling, and finally CI/CD pipelines that run plan and apply automatically. Every topic is hands-on against real cloud resources. (3 days, 6 hours per day, 18 hours in total, Intermediate level.)

What you’ll gain

  • Understand infrastructure as code and its benefits over manual provisioning
  • Install and use the Terraform CLI and the core workflow: init, plan, apply and destroy
  • Write correct HCL including resources, data sources, variables, outputs and expressions
  • Understand how state works and manage it safely, including locking
  • Split code into reusable modules and structure projects systematically
  • Separate dev, staging and production using workspaces or directory structure
  • Configure remote state and state locking for team collaboration
  • Bring existing resources under Terraform management with import
  • Handle secrets securely and set up CI/CD to run Terraform automatically

Who this course is for

  • DevOps and cloud engineers who manage cloud infrastructure
  • System administrators moving from manual work to automation
  • Developers who build and maintain their own environments
  • Solution architects who must design reproducible, auditable infrastructure
  • Teams using multiple clouds who want one standard tool

Prerequisites

  • Basic cloud concepts (AWS Cloud Practitioner or Azure AZ-900 recommended first)
  • Basic command line and Git skills
  • Basic networking concepts such as IP, subnets and security groups
  • Programming is not required, but you should be able to read structured configuration files

Curriculum

Course Details

A 3-day course, 6 hours per day (18 hours in total), delivered as lectures with hands-on cloud labs for every topic. Intermediate level. Learners take home a lab guide, complete sample code for every lab, reusable modules and a best-practice checklist. Note: learners create real resources in a test cloud account and should run terraform destroy after each lab to avoid ongoing charges.

Day 1 Terraform Fundamentals and State

Section 1: Infrastructure as Code Concepts and Setup

  • The problems with manual provisioning and the benefits of infrastructure as code
  • How Terraform works: declarative configuration, providers, plan and apply, compared with other tools
  • Installing the Terraform CLI and configuring cloud credentials securely
  • Lab: install Terraform and create your first cloud resource from code

Section 2: The HCL Language and Code Structure

  • The .tf file structure and core blocks: terraform, provider, resource and data
  • Data types, expressions, conditionals and commonly used functions
  • Referencing resources and controlling creation order through dependencies
  • Lab: write code that creates a network and a server that reference each other

Section 3: Providers and Resource Management

  • Using providers and pinning versions with version constraints
  • The resource lifecycle: create, update, replace and destroy, and reading plan output
  • Using data sources to reference resources that already exist
  • Lab: change infrastructure and read the plan carefully before every apply

Section 4: State Management

  • What state is, why it matters and the risk when state is lost or edited incorrectly
  • State commands: show, list, mv and rm, and when to use each
  • Protecting secrets in state and never committing state to Git
  • Lab: explore the state file and practise moving resources within state
Day 2 Variables, Modules and Teamwork

Section 5: Variables, Outputs and Configuration

  • Declaring variables, types, defaults and validation rules
  • Passing values through tfvars files, environment variables and the command line
  • Using outputs to expose values and locals to reduce repetition
  • Lab: refactor hardcoded configuration into variables and outputs

Section 6: Reusable Modules

  • Module concepts and designing for reuse across projects
  • Writing your own modules and consuming modules from the Terraform Registry
  • Structuring a project so it stays readable and maintainable
  • Lab: split the code into a module and reuse it across two environments

Section 7: Multiple Environments (Dev, Staging, Prod)

  • Separating environments with workspaces versus directory structure
  • Managing environment-specific values safely
  • Naming and tagging conventions that make cost tracking possible
  • Lab: build dev and prod environments from one codebase

Section 8: Remote State and Team Collaboration

  • Storing state in a remote backend and why teams need it
  • State locking to prevent concurrent changes from corrupting state
  • Team workflow: branches, pull requests and reviewing plan output before apply
  • Lab: migrate state to a remote backend and test locking with concurrent runs
Day 3 Existing Resources, Security and CI/CD

Section 9: Bringing Existing Resources Under Management

  • Using terraform import to manage resources that were created manually
  • Handling configuration drift when reality and code diverge
  • Migrating legacy systems to Terraform gradually without service disruption
  • Lab: import a manually created resource and align the code with reality

Section 10: Security and Secret Management

  • Handling secrets: never storing passwords or keys in code or Git
  • Using cloud secret management services together with Terraform
  • Granting the Terraform execution account least-privilege permissions
  • Scanning infrastructure code for insecure configuration

Section 11: CI/CD for Terraform

  • Building a pipeline that runs fmt, validate and plan automatically on pull requests
  • Gating apply behind approval before it touches production
  • Keeping plan output as evidence and rolling back when something goes wrong
  • Lab: create a pipeline that checks code and runs plan automatically on a Git repository

Section 12: Capstone and Best Practices

  • Capstone: design and build a complete infrastructure stack with Terraform from network to application
  • Best practices for writing and maintaining infrastructure code long term
  • Moving on to Ansible, Kubernetes and other DevOps tooling
  • Workshop: present the stack you built and review the code together

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

What is Terraform state, and why should a team store it centrally?

State is the file Terraform uses to record which real cloud resource each block of code maps to, so it can work out what to create, change or delete when you run plan. If everyone keeps state on their own machine, it drifts apart and resources can be duplicated. Teams should store it in a remote backend such as S3 or Azure Storage with state locking enabled, and never commit it to Git, as it can contain secrets.

What are the steps to start creating cloud resources with Terraform?

Start by installing the Terraform CLI and setting up secure access to your cloud account. Write a .tf file declaring the provider and resources you need, run terraform init to download the provider, then terraform plan to see what will change. Once you have checked the plan, run terraform apply to create the resources, and terraform destroy to remove them when finished. Always read the plan before applying.

What is a Terraform module, and how does it help?

A module is a set of Terraform files that groups resources used together, such as a network with its subnets and security groups, taking inputs through variables and returning values through outputs. This lets you reuse it across projects or environments, for example building dev and production from one module that differs only in machine size, reducing copied code and keeping everything to one standard. Ready-made modules are available from the Terraform Registry.

Who is the Infrastructure as Code with Terraform course for, and what should I know beforehand?

It suits DevOps and cloud engineers who manage cloud infrastructure, system administrators who want to automate manual work, developers who build their own environments, and teams using more than one cloud. You should understand basic cloud concepts, for example from AWS Cloud Practitioner or AZ-900, be able to use the command line and Git, and understand IP addressing, subnets and security groups. Programming is not required.

What will I be able to do after the Infrastructure as Code with Terraform course?

You will be able to write HCL to build infrastructure on AWS and Azure, read plans with confidence, manage state and move it to a remote backend with locking, build reusable modules, separate dev and production environments, bring manually created resources under control with terraform import, handle secrets safely and run Terraform through CI/CD. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.

Can the Infrastructure as Code with Terraform course be run in-house for our team?

Yes. It can be run in-house for your team, with examples adapted to your own work, such as the cloud provider and infrastructure your team already manages. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.