This device is not compatible.

Manage Infrastructure Using Terraform on Google Cloud Platform

PROJECT


Manage Infrastructure Using Terraform on Google Cloud Platform

In this project, we’ll create infrastructures such as buckets, backends, and clusters on gcloud using Terraform. We’ll also use Terraform to create an Artifact Registry for hosting Docker images that will be deployed on Google Cloud Run.

Manage Infrastructure Using Terraform on Google Cloud Platform

You will learn to:

Create projects and associated service accounts using gcloud CLI.

Generate keys and policy bindings for projects and service accounts.

Manage simple infrastructure on Google Cloud using Terraform.

Containerize web applications using Docker.

Create Artifact Repositories and generate policy bindings using Terraform.

Deploy web applications on Google Cloud Run using Terraform.

Skills

Cloud Deployment

Docker Containers

DevOps

Prerequisites

GCP account with billing enabled

Basic understanding of Terraform

Basic understanding of gcloud CLI

Basic understanding of clusters and storage buckets

Technologies

Terraform logo

Terraform

Cloud Run logo

Cloud Run

Kubernetes

gCloud CLI logo

gCloud CLI

Artifact Registry logo

Artifact Registry

Project Description

Managing cloud infrastructure manually through consoles is error-prone and difficult to replicate across environments. Infrastructure as Code (IaC) with Terraform solves this by defining infrastructure in version-controlled scripts, enabling reproducible deployments, consistent configurations, and automated provisioning. For teams deploying containerized applications on Google Cloud Platform (GCP), combining Terraform with gcloud CLI creates a complete DevOps workflow from infrastructure setup to application deployment.

In this project, we'll deploy a containerized application to GCP using Terraform, Google Kubernetes Engine (GKE), and Cloud Run. We'll start by setting up authentication with gcloud CLI, creating a service account with proper permissions, and generating authentication keys. Next, we'll build Terraform configurations to provision GCP infrastructure: creating a storage bucket for Terraform state management, deploying a Kubernetes cluster with worker nodes, and configuring networking and security settings. We'll define Terraform variables and outputs for reusable, modular infrastructure code.

Finally, we'll create an Artifact Registry to store Docker images, push our containerized application, and deploy it to Cloud Run using Terraform automation. We'll locate the deployed service endpoint and learn to destroy resources cleanly. By the end, you'll have hands-on experience with Terraform IaC, GCP service management, GKE cluster provisioning, Cloud Run deployment, and container orchestration applicable to any cloud infrastructure or serverless deployment project.

Project Tasks

1

Getting Started

Task 0: Get Started

Task 1: Containerize the Application

Task 2: Set Up the gcloud Service Account

Task 3: Set Up Authentication with the gcloud CLI

2

Build Infrastructure as Code (IaC)

Task 4: Configure Variables for Terraform

Task 5: Configure Output for Terraform

Task 6: Define the Provider for Terraform

Task 7: Initialize and Set Up the Infrastructure

Task 8: Set Up a Basic Storage Bucket on GCP

Task 9: Store the Terraform State in the Backend

Task 10: Set up a Cluster on Google Kubernetes Engine (GKE)

Task 11: Deploy Worker Nodes for the GKE Cluster

Task 12: Set Up a Connection with Worker Nodes

3

Deploying Application to Cloud Run

Task 13: Enable and Create an Artifact Registry on gcloud

Task 14: Push the Image to the Artifact Repository

Task 15: Enable the Cloud Run API

Task 16: Host Container on GCloud Run using Terraform

Task 17: Locate the Address of the Deployed Service

Task 18: Destroy the Resources

Congratulations!

has successfully completed the Guided ProjectManage Infrastructure Using Terraform onGoogle Cloud Platform

Subscribe to project updates

Hear what others have to say
Join 1.4 million developers working at companies like

Relevant Courses

Use the following content to review prerequisites or explore specific concepts in detail.