Skip to content

Mastering Terraform: IaC with Real-World Examples. This book is a comprehensive guide to mastering Terraform, the industry-leading Infrastructure as Code (IaC) tool. Designed for professionals, enthusiasts, and students alike, this book takes you beyond the basics to unlock advanced Terraform capabilities through hands-on examples.

License

Notifications You must be signed in to change notification settings

rahulkumar-aws/mastering-terraform

Repository files navigation

Mastering Terraform: IaC with Real-World Examples


🚧 Work in Progress 🚧
This book is currently under active development. Some chapters or examples may be incomplete or subject to change.
Check back regularly for updates and improvements.

Project Status: Work in Progress

Table of Contents:

1. Understand Infrastructure as Code IaC Concepts

  1. Explain what IaC is
  2. Describe advantages of IaC patterns

2. Understand the Purpose of Terraform vs Other IaC

  1. Explain multi-cloud and provider-agnostic benefits
  2. Explain the benefits of state
  3. Manage Resources in Terraform State

3. Understand Terraform Basics

  1. Install and version Terraform providers
  2. Describe plugin-based architecture
  3. Write Terraform configuration using multiple providers
  4. Describe how Terraform finds and fetches providers

4. Use Terraform Outside the Core Workflow

  1. Describe when to use terraform import to import existing infrastructure into your Terraform state
  2. Use terraform state to view Terraform state
  3. Describe when to enable verbose logging and what the outcome/value is

5. Interact with Terraform Modules

  1. Contrast and use different module source options including the public Terraform Registry
  2. Interact with module inputs and outputs
  3. Describe variable scope within modules/child modules
  4. Set module version

6. Use the Core Terraform Workflow

  1. Describe Terraform workflow (Write -> Plan -> Create)
  2. Initialize a Terraform working directory (terraform init)
  3. Validate a Terraform configuration (terraform validate)
  4. Generate and review an execution plan for Terraform (terraform plan)
  5. Execute changes to infrastructure with Terraform (terraform apply)
  6. Destroy Terraform managed infrastructure (terraform destroy)
  7. Apply formatting and style adjustments (terraform fmt)

7. Implement and Maintain State

  1. Describe default local backend
  2. Describe state locking
  3. Handle backend and cloud integration authentication methods
  4. Differentiate remote state backend options
  5. Manage resource drift and Terraform state
  6. Describe backend block and cloud integration in configuration
  7. Understand secret management in state files

8. Read, Generate, and Modify Configuration

  1. Demonstrate use of variables and outputs
  2. Describe secure secret injection best practices
  3. Understand the use of collection and structural types
  4. Create and differentiate resource and data configuration
  5. Use resource addressing and resource parameters to connect resources together
  6. Use HCL and Terraform functions to write configuration
  7. Describe built-in dependency management (order of execution based)

9. Understand HCP Terraform Capabilities

  1. Explain how HCP Terraform helps manage infrastructure
  2. Describe how HCP Terraform enables collaboration and governance

Learn more about the author, including their expertise, background, and professional details, in the authors.md file.

License

This book is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International License (CC BY-NC-ND 4.0).
You may share this material freely with attribution but may not use it for commercial purposes or distribute modified versions.
For more details, see the full LICENSE. Creative Commons License

About

Mastering Terraform: IaC with Real-World Examples. This book is a comprehensive guide to mastering Terraform, the industry-leading Infrastructure as Code (IaC) tool. Designed for professionals, enthusiasts, and students alike, this book takes you beyond the basics to unlock advanced Terraform capabilities through hands-on examples.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published