Course Length: 2-days

Course Overview

Leverage and integrate Terraform with a mix of expert instruction and hands-on engineering.

The Hashicorp tool suite has found a distinct place in the DevOps community as a fantastic set of solutions for some of the most common DevOps tooling needs and automation use cases. This 2-day engagement focuses on Terraform as a solution for infrastructure management. Led by an expert, your teams will perform real work and establish guidelines for how to integrate and use Terraform for the use cases they need to adopt or progress.

This training engagement places an engineering expert who has extensive experience with Terraform into a workshop setting with your teams so you can learn how to apply Terraform in a real-world setting. Our engineers have assisted many large organizations as they improve their DevOps practice and they bring this experience to your teams. Working together, our experts will provide hands-on instruction as they assist your organization in effectively using Terraform for infrastructure needs.

Learning Objectives

  • Use Terraform for creating and managing infrastructure as code
  • Maintain version control of infrastructure assets just as you do with software assets
  • Effectively use Terraform with Docker and Kubernetes for DevOps-style workflows
  • Develop and present a business case for Terraform and related tools
  • Run Terraform with public cloud infrastructure such as Azure
  • Integrate Terraform with other technologies in the workspace
  • Utilize core features of Terraform
  • Determine integration needs and plugin needs

Audience and Prerequisites

This Terraform training class is for engineering teams, leaders, and technology stakeholders who need to help their organization create and manage infrastructure as code using Terraform. Attendees must be comfortable with programming and have a working knowledge of shell scripting and Azure fundamentals such as virtual machines and virtual networking.

Professionals who benefit from this course include:

  • Application Developers
  • Operations Developers
  • IT Directors & Managers
  • Development Managers
  • Site Reliability Engineers
  • Teams practicing DevOps
  • CTOs

Course Outline

Part 1: Infrastructure as Code

In this section, we will introduce the benefits that Infrastructure as Code (IaC) can bring to organizations and how IaC fits within modern DevOps best practices.

  1. DevOps and GitOps
  2. Principles of Infrastructure as Code
  3. Applying Infrastructure as Code in DevOps
  4. Infrastructure as Code best practices
  5. Benefits of Infrastructure as Code
  6. The case for Terraform

Part 2: Terraform Overview

This section provides an overview of Terraform concepts and vocabulary and instructs how Terraform manages infrastructure configuration in cloud environments.

  1. Terraform configuration language overview
  2. Terraform CLI
  3. The lifecycle of a configuration
  4. State storage – local versus remote
  5. Connecting to Azure

Hands-on Labs:

  • Setting up a Terraform project

Part 3: Azure Resources

In this section participants will be getting hands-on practice using Terraform to create a simple application environment in Azure, learning the essential constructs in Terraform for defining resources.

  1. Resource metadata and naming best practices
  2. Subscription and resource group
  3. Networking resources (VNet, subnet, network security group)
  4. Compute resources (virtual machine)
  5. Storage resources (storage account, file share, blob storage)
  6. Database resources (SQL database)
  7. Variables
  8. Outputs

Hands-on Labs:

  • Deploying a VNet
  • Adding a virtual machine into your VNet
  • Adding storage and a database
  • Including variables in your code
  • Using Terraform commands to validate and inspect your configuration

Part 4: Terraform Programming

This section introduces programming constructs within Terraform that enable you to add more control and flexibility in defining resources.

  1. Control operations (count, loops, conditional, depends_on, etc.)
  2. Data structures (maps, lists, random_string, etc.)
  3. Data sources
  4. Functions (e.g., lookup, coalesce, join, merge, etc.)
  5. Variable validation
  6. Debugging Terraform

Hands-on Labs:

  • Managing multiple resources through count and loops
  • Using maps and lists in your code
  • Using functions in your code
  • Using Terraform CLI and state manipulation to debug your configuration

Part 5: Modules

This section shows how modules can be used to create reusable components in Terraform and teaches best practices in organizing Terraform code.

  1. Purpose of modules
  2. Modules code file organization structure
  3. Module structure
  4. Module sources and versioning
  5. Nested modules
  6. Publishing modules

Hands-on Labs:

  • Refactoring your earlier lab code to a module
  • Using Azure modules (subscription, metadata, resource group, virtual network)

Part 6: Wrapping Up

This section wraps up the course with reviews to reinforce what you have learned.

  1. Reference material to learn more
  2. Course review
  3. Next steps