asdf manage multiple version Terraform with GCP

We will use asdf as version manager with Terraform

Installation

I will use Homebrew (Mac) + zsh to demonstrate.

# http://asdf-vm.com/guide/getting-started.html#_3-install-asdf

## Installation
brew install asdf

## Add asdf to zshrc
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.zshrc

Install Terraform dependencies

asdf list-all terraform
asdf install terraform 0.14.11
asdf global terraform 0.14.11

Install Google Cloud CLI

brew install --cask google-cloud-sdk
# or
curl https://sdk.cloud.google.com | bash

Google Cloud CLI login

gcloud auth application-default login

Try to do terraform init and plan

# CD under project root directory

# Init terraform
terraform init

# Check changes
terraform plan