Skip to content

Latest commit

 

History

History
54 lines (33 loc) · 1.26 KB

README.md

File metadata and controls

54 lines (33 loc) · 1.26 KB

Terraform workshop HoGent

This repository contains the IaC (infrastructure as code) for the Terraform workshop for HoGent during the Tech & Trend days (February 12, 2025).

Goal of this workshop

The goal of this workshop is to deploy a Cloud Run service on Google Cloud using Terraform. We will write the infrastructure as code and run Terraform to deploy the infrastructure on Google Cloud.

Prerequisites

  • Terraform (Add it to your PATH)
  • An active Google Cloud account with JSON key file

Workshop

Install Terraform

  1. Install Terraform (https://www.terraform.io/downloads)

  2. Test the installation with terraform version

Google Cloud authentication

  1. export the JSON key file for authentication with Google Cloud (https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/getting_started#adding-credentials)

    export GOOGLE_APPLICATION_CREDENTIALS={path_to_key_file}

Write your infrastructure as code and run Terraform

  1. Terraform init

    terraform init
  2. Terraform plan

    terraform plan
  3. Terraform apply

    terraform apply
  4. Destroy your infrastructure

    terraform destroy