Getting Started with Terraform for Google Cloud
This course provides an introduction to using Terraform for Google Cloud. It enables learners to describe how Terraform can be used to implement infrastructure as a code and to apply some of its key features and functionalities to create and manage Google Cloud infrastructure. Learners will get hands-on practice building Google Cloud resources using Terraform.
- Duration: 1 day
- Languages: English, German
- Level: Introductory
- Group size: Up to 16
What you'll learn
- Define the business need for infrastructure as code and the benefits of using it in your environment.
- Explain the features and functionalities of Terraform.
- Use Terraform resources, variables, and output values to create Google Cloud infrastructure resources.
- Use Terraform modules to build reusable configurations.
- Explain Terraform state and its importance.
Prerequisites
- Complete Google Cloud Fundamentals: Core Infrastructure
- Have basic programming skills and familiarity with using CLI
- Have general familiarity with Google Cloud
Course outline
Introduction to Terraform for Google Cloud
Introduction to IaC
- What is infrastructure as code (IaC)?
- Problems IaC can solve
- Benefits of IaC
- Provisioning versus configuration
- Imperative versus declarative approach
Introduction to Terraform
- Terraform overview
- Terraform features
- IaC configuration workflow
- Terraform use cases
Using Terraform
- How to use Terraform
- Running Terraform in production
- Installing Terraform
- Authentication for Google Cloud
Terms and concepts
The Author phase
- Terraform Directory structure
- Introduction to HCL syntax
- Resources
- Variables
- State
- Modules
Terraform commands
- terraform init
- terraform plan
- terraform apply
- terraform fmt
- terraform destroy
Terraform Validator tool
- Introduction
- Why use the Terraform Validator tool
- Validation workflow
- Terraform Validator use cases
Writing Infrastructure Code for Google Cloud
Introduction to Resources
- Resources overview
- Syntax
- Example
- Refer a resource attribute
Considerations to define a resource block
Meta-arguments for resources
Resource dependencies
- Implicit dependency
- Explicit dependency
Introduction to Variables
- Overview
- Syntax to declare a variable
- Syntax to reference and assign a value to a variable
- Variables best practices
Introduction to output values
- Output values overview
- Best practices
Terraform Registry and CFT
- Introduction to Terraform Registry
- Introduction to CFT
Organizing and Reusing Configuration with Terraform Modules
Introduction to modules
- Why are modules needed
- What is a module?
- Example
Reusing configurations by using modules
- Module sources
- Calling a module into the source configuration
Using variables to parameterize your configuration Pass resource attributes using output variables Module use cases, benefits, and best practices
Introduction to Terraform State
Introduction to Terraform state
- How information is stored in a Terraform state file
Ways to save a state file
Storing a state file in a Cloud Storage bucket
- Issues when storing the Terraform state locally
- Benefits of storing a state file in a Cloud Storage bucket
- Process of storing a Terraform state file remotely in a Cloud Storage bucket
Terraform state best practices
Related courses
Application Development with Cloud Run
This course introduces you to the fundamentals, practices, capabilities and tools for modern cloud application development with Cloud Run. Through a combination of lectures, hands-on labs, and supplemental materials, you learn how to develop and deploy applications on Google Cloud by using Cloud Run. This version of the course consists of three separate courses that include topics on creating containers, developing applications with Cloud Run, and Cloud Run functions.
Getting Started with Google Kubernetes Engine
This course covers an introduction to Kubernetes, a software layer that sits between your applications and your hardware infrastructure. Google Kubernetes Engine (GKE) brings you Kubernetes as a managed service on Google Cloud. This course teaches the basics of GKE and how to get applications containerized and running in Google Cloud. The course covers a basic introduction to Google Cloud, an overview of containers and Kubernetes, Kubernetes architecture, and Kubernetes operations.
Logging, Monitoring, and Observability in Google Cloud
This course teaches participants techniques for monitoring and improving infrastructure and application performance in Google Cloud. Using a combination of presentations, demos, hands-on labs, and real-world case studies, attendees gain experience with full-stack monitoring, real-time log management and analysis, debugging code in production, tracing application performance bottlenecks, and profiling CPU and memory usage.
Not sure which course fits?
Book a 30-minute call. We'll look at where your team is, what they need to be able to do, and put together either a specific course date or a tailored learning plan.