Skip to content

Work in Progress - Brown bag session for presenting Terraform to my coworkers

Notifications You must be signed in to change notification settings

LoHertel/terraform-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run in GCP

Note: You need a GCP account for running this demo. Note that GCP also offers $300 free credits for 90 days.

You can run this demo with interactive instructions by clicking the buttom below.

Open in Cloud Shell

After clicking the button Open in Google Cloud Shell, the Google Cloud Shell Editor will open and ask for your authorization to clone this repository. The interactive instructions for this demo will open on the right side of the Cloud Shell Editor. Note: There might be an error message showing that third-party cookies are necessary. You can allow third-party cookies for the Cloud Shell Editor. See here for more information.

Note: If you have closed the instructions pane and want to reopen it, run the following command in the cloudshell terminal window:

cloudshell launch-tutorial project-walkthrough.md

If you don't want to use Google Cloud Shell Editor, you could go through the instructions manually by following the steps below.

Local Setup

Install Terraform

Check if Terraform is already installed on your system by running the following command:

terraform -v

If it is not installed, visit the official website for specific setup instructions for your system. Select your operating system on the website and follow the instructions.

E.g. for Ubuntu the instructions are:

# add hashicorp's public key to your keyring
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
# add hashicorp's repo as source for apt
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
# install terraform
sudo apt update && sudo apt install terraform

Run this command again to verify, that the installation was successful:

terraform -v

Install gcloud CLI tool

Check if gcloud is already installed on your system by running the following command:

gcloud -v

If it is not installed, visit the official website for specific setup instructions for your system. Select your operating system on the website and follow the instructions.

E.g. for Ubuntu the instructions are:

# add GCP's public key to your keyring
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
# add GCP repo as source for apt
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# install gcloud
sudo apt update && sudo apt install google-cloud-cli

Run this command again to verify, that the installation was successful:

gcloud -v

About

Work in Progress - Brown bag session for presenting Terraform to my coworkers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages