macOS
Set up your MacBook for using Terraform.
Install
-
Homebrew
This page uses Homebrew for installs, and chances are you already using it.
If you do not have it installed already, then follow the instructions on https://brew.sh.
-
iTerm2
You can use the default Terminal app or your preferred terminal emulator.
We recommend iTerm2. You can download the stable version from the downloads page, or you can use Homebrew:
brew install --cask iterm2
You can customise iTerm2 to your hearts content, but going minimal is definitely recommended as a starting point.
Appearance > General > Theme: Minimal
-
Git
brew install git
-
GitHub CLI
brew install gh
-
Install the terraform binary
brew tap hashicorp/tap brew install hashicorp/tap/terraform
-
Azure CLI
brew install azure-cli
-
Install jq
brew install jq
If you want to customise the colours to match the jsonc output of the Azure CLI then add the following line into your ~/.zshrc file:
export JQ_COLORS="1;90:1;34:0;34:1;36:0;33:1;37:1;37"
-
Visual Studio Code
Install vscode by following the instructions.
Ensure you have installed the ‘code’ command in the PATH.
-
Install the Hashicorp Terraform extension pack
The HashiCorp Terraform extension for Visual Studio Code (VS Code) with the Terraform Language Server adds editing features for Terraform files such as syntax highlighting, IntelliSense, code navigation, code formatting, module explorer, etc.
Validation
As a test, open up your terminal and check the following commands:
-
Show the Azure CLI version
az version
-
Show the Terraform version
terraform version
-
Make a directory and move into it
mkdir test cd test
-
Open vscode from the command line
code .
This should open vscode with the current working directory in the Explorer pane.
If you are using Ubuntu on WSL2 then you should see the Remote Development icon in the left hand side of the status bar at the bottom of the screen.
-
Open the integrated terminal
Click on View > Terminal in the menu, or use the keyboard shortcut,
^
+`
.Your selected shell should open up in the integrated terminal pane.
Help us improve
Azure Citadel is a community site built on GitHub, please contribute and send a pull request
Make a change