Workaround for Homebrew: “terraform@0.12 has been disabled because it is not supported upstream!”

I needed to install an older version of Terraform on my work Mac, but got this error:

Error: terraform@0.12 has been disabled because it is not supported upstream!

I tried to edit terraform@0.12 and tried to install without success. This is what worked:

HOMEBREW_NO_INSTALL_FROM_API=1 brew install terraform@0.12


?  Source brew install terraform@0.12
Error: terraform@0.12 has been disabled because it is not supported upstream!
?  Source HOMEBREW_NO_INSTALL_FROM_API=1 brew install terraform@0.12
==> Fetching terraform@0.12
==> Downloading https://ghcr.io/v2/homebrew/core/terraform/0.12/manifests/0.12.31
####################################################################################################################################################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/terraform/0.12/blobs/sha256:21aa5de3857889453b4ec7ed810df350b22838cda61baa7e6db6a0c3946d5891
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:21aa5de3857889453b4ec7ed810df350b22838cda61baa7e6db6a0c3946d5891?se=2023-05-16T20%3A55%3A00Z&sig=Cdb%2F%2FXmhPJNspNN6FdcDiFLysIMJiYZvKxCH
####################################################################################################################################################################################################################### 100.0%
==> Pouring terraform@0.12--0.12.31.monterey.bottle.tar.gz
==> Caveats
terraform@0.12 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have terraform@0.12 first in your PATH, run:
echo ‘export PATH=”/usr/local/opt/terraform@0.12/bin:$PATH”‘ >> ~/.zshrc
==> Summary
? /usr/local/Cellar/terraform@0.12/0.12.31: 6 files, 42.7MB
==> Running `brew cleanup terraform@0.12`…
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
? Source terraform version
Terraform v0.12.31

Your version of Terraform is out of date! The latest version
is 1.4.6. You can update by downloading from https://www.terraform.io/downloads.html

Remote Development with Visual Studio Code

I recently came across Windows Subsystem for Linux, as I’ve been a Mac and JetBrains Rider user since 2012. I discovered the Remote development extensions for VS Code and discovered how much of a gem it is.

Here are the pages I went over to learn more about it (note this is a work-in-progress):

The Seven Wastes of Software Development

Based on Toyota’s lean manufacturing, the same concepts apply to agile software development. They are:

  • Partially Done Work: Work in Progress, e.g. Code not checked in, code not tested, test cases not executed, requirements analyzed but not developed, etc.
  • Extra Features: features fully developed, tested and delivered to the end user, but was never used
  • Relearning:  Spending effort in learning something more than once because of loss of information. This loss occurs due to lengthy delays or task switching or handoffs.
  • Handoffs: Passing a piece of information from one team member to another, which may cause loss or change in information. For example, communicating customer requirements from a customer representative to the analyst, then a team leader, and finally to a developer.
  • Delays: These are time intervals in which one or more team members are idle waiting for input from another activity. For example, waiting for staffing in a project, approval processes, lengthy feedback loops, requirements gathering, etc.
  • Task Switching: Interruptions during execution, which causes huge ineffectiveness in time usage, like switching focus or priorities, working on more than one thing at a time, serving multiple customers at a time, fixing issues while developing new features, etc.
  • Defects: Defect waste is not only the time spent in testing and fixing the defect, but also the time it lies undetected, which causes subtle undetected issues in the operations at the customer site.

Use this in your retrospectives to gain insight and improve your team’s efficiency and productivity.

Reference: https://www.linkedin.com/pulse/what-seven-wastes-software-development-zeinab-saadalla-farag/

Git: Command to fix corrupted repository

I occasionally get fatal, such as:


error: cannot lock ref 'refs/remotes/origin/AB-123': is at dffbe642f088781a5e485227927e141ddb73443a but expected e377921a6d00f4d4c0463774990e03343683177e

Rebasing doesn’t work, but if you do the following it will resolve it:


git gc --prune=now

This guarantees to remove all git garbage.

NOTE: Make sure all your code has been committed before doing this.