Terraform – Infrastructure as Code (IaC)

As enterprises seek to deploy and maintain increasingly complex cloud infrastructure, there is a necessity to use ’Infrastructure as Code’ (IaC) tools, like Terraform. An open-source, state management tool developed by HashiCorp, Terraform allows developers to use a common coding interface to work through their various clouds safely and efficiently. Attendees will leave being able to write and understand Terraform code (HCL), have a clear understanding of Terraform’s various components and supporting tools, as well as when to reach for Terraform over another IaC tool, such as Ansible.

Course Information

Price: $1,795.00
Duration: 3 days
Certification: Terraform Essentials - Certification Project
Exam: 
Learning Credits:
Course Delivery Options

Check out our full list of training locations and learning formats. Please note that the location you choose may be an Established HD-ILT location with a virtual live instructor.

Train face-to-face with the live instructor.

Access to on-demand training content anytime, anywhere.

Attend the live class from the comfort of your home or office.

Interact with a live, remote instructor from a specialized, HD-equipped classroom near you. An SLI sales rep will confirm location availability prior to registration confirmation.

All Sunset Learning dates are guaranteed to run!

Register

Prerequisites:

Although not required, students with some experience programming, or pre-existing knowledge of cloud architecture, will most appreciate the technical nature of this hands-on course. 

 

Target Audience:

  • DevOps Engineers
  • Software Developers
  • Technical Managers and Leads
  • System and Cloud Administrators
  • Network Engineers and Developers 

 

Course Objectives:

  • Writing Terraform HCL code
  • Deploying into common clouds such as AWS, Azure, Google Cloud, Docker, Oracle, Kubernetes, and VMWare
  • Where Terraform fits in the Enterprise CI/CD model
  • Differences between Terraform and Ansible
  • Best practices
  • Prepare for HashiCorp’s Terraform Associate Certification  

 

Course Outline:

Up and Running with Terraform

  • Terraform Overview
  • Defining ’declarative’
  • How to think about Terraform (versus Ansible)
  • Reviewing the Terraform Configuration
  • Running the Terraform Configuration
  • Provisioners

Syntax

  • ’Low Level’ HCL syntax
  • Style Conventions
  • Comments
  • Blocks
  • Arguments
  • JSON Configuration Syntax

Resources

  • Keywords:
    • depends_on
    • count
    • for_each
    • provider
    • lifecycle
  • Data Sources

Variables and Output

  • Input Variables
  • Output Values
  • Local Values

Modules

  • Module Blocks
  • Module Sources
  • Meta Arguments

Terraform Templates

  • templatefile Function
  • Template Demonstration
  • Introducing Data Sources
  • Creating an External Data Source
  • Building tftpl template files

Expressions

  • Types and Values
  • Strings and Templates
  • Reference to Values
  • Operators
  • Function Calls
  • Conditionals
  • For Expressions
  • Splat Expressions
  • Dynamic Blocks
  • Type Constraints
  • Version Constraints

Functions

  • String
  • Collection
  • Numeric
  • Encoding
  • Filesystem
  • Date and Time
  • Hash and Crypto
  • IP Network
  • Type Conversion

State

  • Understanding the importance of state
  • State storage and locking
  • importing existing resources
  • Remote State
  • What to do when local state is lost

CICD Pipelines with Terraform

  • Terraform and GitLab pipelines
  • Terraform and Jenkins pipelines

Enterprise Case Studies

  • Terraform and Docker
  • Terraform and Kubernetes
  • Terraform and Amazon AWS
  • Terraform and Azure
  • Terraform and Google Cloud Platform (GCP)
  • Terraform and VMWare
  • Terraform and Oracle
  • Understanding how to apply Terraform to your unique infrastructure

Beyond Basics

  • Intro to Go Programming
  • Terraform Cloud
  • Additional HashiCorp Offerings
  • Backends
  • Secrets


Hands-On Labs

Software Control Management

  • SCM Option #1 – GitHub
  • SCM Option #2 – GitLab

Overview of Terraform

  • Terraform Install

Terraform Modules

  • Up and Running with Terraform
  • Terraform Variables
  • Output Values
  • CHALLENGE – Terraform and Docker

Beyond Basics

  • Terraform CLI Workspaces
  • Terraform Expressions and Errors
  • Resources – replace vs taint
  • Dynamic Operations with Functions
  • Creating a Terraform Module
  • Moving State – terraform state mv
  • Dynamic Provisioning with tfvars Files
  • Data Sources and HTTP Provider

Loops

  • Looping Constructs – for_each

Provisioning

  • local-exec Provisioner 
  • Creating Delays
  • Terraform – templatefile Function 

Terraform Cloud

  • Terraform Cloud and Terraform Enterprise
  • Triggering Cloud Builds via Git Commits

Dynamic Blocks

  • Dynamic Blocks

AWS

  • Terraform and AWS
  • Output Values and AWS
  • AWS and looping with count vs for_each
  • Correcting Resource Drift and AWS
  • CHALLENGE – Terraform and AWS

Azure

  • Terraform and Azure

Google Cloud Platform

  • Terraform and Google Cloud Platform

Oracle

  • Terraform and Oracle Cloud Infrastructure

Terraform and Enterprise

  • Deploy a Go RESTful API microservice with Terraform
  • Terraform and Ansible

VMWare

  • Terraform and VMWare

Helpful DevOps Tools (OPTIONAL)

  • Open Policy Agents and Terraform
  • GitHub Actions – GitLeaks
  • GitHub Actions – Terraform

Terraform Review

  • HashiCorp Terraform Study Guide

Appendix

  • Glossary