Learn Terraform in 4 Hours
Published by Pearson
Go from Dev to DevOps with Infrastructure as Code
High performance software engineering requires powerful infrastructure. As the size and complexity of a software project grows, so do its infrastructure requirements. When creating software we benefit from innovations like source-control, multiple environments, and reusable code. So how can we bring those same innovations to infrastructure?
Enter Terraform, an amazing infrastructure-as-code tool that allows source controlled, reusable, collaboratively developed infrastructure. Using Terraform’s declarative syntax and straight-forward workflow, you can manage infrastructure across multiple services such as AWS, GCP, Azure, Heroku, and more. It is a powerful tool to add to your toolbelt.
In this live training you will learn the details of Terraform’s declarative syntax, how to use its workflow, and how to enable collaboration with the tool. As you do, you will learn to create some basic infrastructure in AWS and GCP.
What you’ll learn and how you can apply it
By the end of the live online course, you’ll understand:
- Fresh Terraform project creation
- How Terraform manages state
- The basic workflows used in Terraform
And you’ll be able to:
- Write Terraform Configuration Language
- Start a new Terraform project with AWS
- Deploy basic infrastructure
This live event is for you because...
- You are a software engineer or systems engineer interested in getting started with infrastructure-as-code
- You need tools to make your infrastructure easier to manage
- You need a deeper understanding of Terraform’s syntax and workflows
Prerequisites
- Basic programming experience. Understand how to work with variables, functions, data structures, and expressions.
- High-level understanding of why infrastructure is needed for software projects
Course Set-up
- A computer with Terraform installed - Download here: https://www.terraform.io/downloads.html
- Your favorite text editor. The instructor will be using VSCode. https://code.visualstudio.com/
- An AWS and GCP account with access to programmatically create resources
Recommended Preparation
- Attend: Getting Started with Amazon Web Services (AWS), Chad Smith, Search the O’Reilly Learning Platform for an upcoming date
Recommended Follow-up
- Attend: Production-Ready Cloud Infrastructure with AWS and Terraform, Jim Hall, Search the O’Reilly Learning Platform for an upcoming date
- Watch: Developing Infrastructure as Code with Terraform LiveLessons, Robert Jordan https://learning.oreilly.com/videos/developing-infrastructure-as/9780136608776/
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Introduction (10 minutes)
- What is Terraform and how is it used?
- What are the primary use cases for Terraform?
- What are the benefits of Terraform?
Basic Grammar (15 minutes)
- Configuration Syntax
- Arguments, Blocks, and Identifiers
- Comments
Workflow (20 minutes)
- Example: Create EC2 Instance
- Init
- Plan and Apply
- Updating
- Refresh
- Destroy
Q&A (5 minutes)
Break (10 minutes)
Terraform and Provider Blocks (5 minutes)
Resources (10 minutes)
- Requirements
- Provider implementation
- Resource Arguments
State (20 minutes)
- State Purpose: Config/Remote Map
- Metadata: Dependencies
- Backends: Remote state and locking
- Example: Create Remote state
Organizing Code (20 minutes)
- Modules
- Variables and Outputs
- Locals
- Example: Organize existing code
Q&A (5 minutes)
Break (10 minutes)
Meta-Arguments (30 minutes)
- Depends on
- For each
- Count
- Provider
- Lifecycle
Expressions (20 minutes)
- Strings and Templates
- References
- Operators
- Function Calls
- Flow Control
- Splats
- Dynamic blocks
Break (10 minutes)
Data Sources (30 minutes)
- Query data sources
- Use data sources to define resources flexibly
- Example: Using data sources
Working With Sensitive Data (10 minutes)
- Remote Encryption at rest
- Protect sensitive variables
Conclusion and Next Steps (10 minutes)
Your Instructor
Jim Hall
Jim Hall is a software engineer with over 12 years of experience building software. His experiences range from front end engineering to dev ops and everything in between. He is currently Head of Engineering at Dynamo Metrics where he oversees and contributes to dev ops, application development, project planning, and data transformation processes. Jim is thrilled by the capabilities of the new and powerful tools available to engineers today. The possibilities are endless!