Personal experimentation using Terraform to setup infrastructure on Azure.
Note that detailed documentation is provided within the individual example folders themselves.
- Script can be viewed at: 0-scripts/install-terraform
#/bin/bash
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common curl
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install terraform
terraform -install-autocomplete
Note: the install script also installs autocompletion for your default shell (bash and zsh are supported)
The scripts folder also contains scripts to install necessary Windows Host dependencies: az-cli
and (optionally) terraform
.
# install az via chocolatey
cinst -y az
# login
az login
# list accounts
az account list
# set subscription via its ID from above
az account set --subscription="SUBSCRIPTION_ID"
See: Azure Provider: Authenticating using Azure CLI for details.