This repository contains the IaC (infrastructure as code) for the Terraform workshop for HoGent during the Tech & Trend days (February 16, 2023).
The goal of this workshop is to deploy an immutable (not possible to change after creation) webserver. We will have a first hands-on with Terraform and run some basic commands. We will use Google Cloud as cloud provider to apply this infrastructure.
- Terraform (Add it to your PATH)
- An active Google Cloud account with JSON key file
-
Install Terraform (https://www.terraform.io/downloads)
-
Test the installation with
terraform version
-
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}
-
Terraform init
terraform init
-
Terraform plan
terraform plan
-
Terraform apply
terraform apply
-
Destroy your infrastructure
terraform destroy