Install the Terraform Command Line Interface (CLI) to manage infrastructure and interact with Terraform state, providers, configuration files, and Terraform Cloud.
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
brew update
brew upgrade hashicorp/tap/terraform
terraform version
$ which terraform
/opt/homebrew/bin/terraform
$ echo "complete -C /opt/homebrew/bin/terraform terraform" >> ~/.bash_profile
$ source ~/.bash_profile