1.3.2 - Terraform Basics
Last updated Jan 25, 2025
Youtube Video | ~29 min
✍️ This video we set up a service account in our Google Cloud. We will then create a Main.tf file to configure our Google Cloud Infrastructure.
📜 Main.tf
Terraform provider for Google Cloud - The Google Cloud provider is used to configure your Google Cloud infrastructure.
To install this provider, copy and paste this code into your Terraform configuration. Then, run terraform init.
Terraform 0.13+
Where my-project-id comes from your GCP Dashboard.
◼️ Terminal you can now run terraform init
+ Add a new bucket in Google cloud storage service (GCS) - in the same script append
Where auto-expire & name need to be changed to a unique value, where name needs to be globally unique
◼️ Terminal you can now run terraform plan and then terraform apply
👀 We can also generate the proposed changes and auto-executing the plan by using terraform apply -auto-approve
You should now see this bucket created on your GCP
◼️ Terminal you can now run terraform destroy once you are done
Last updated
