Template v2.2.0 does not have a package available - Mac M1

For Terraform Installation and Successful terraform init

Steps to install terraform of your choice of version using Homebrew:

  1. brew install tfenv
  2. tfenv list_remote
  3. tfenv install
    tfenv install 1.0.9 #example
    ​​tfenv use 1.0.9 #to switch into this version

Now, while executing terraform init you might face the below error if you are working in a MAC with M1 chip in it,

Error: Incompatible provider version

│ Provider Terraform Registry v2.2.0 does not have a
│ package available for your current platform, darwin_arm64.

Please follow the steps given below:

  1. brew install kreuzwerker/taps/m1-terraform-provider-helper
  2. m1-terraform-provider-helper activate
  3. m1-terraform-provider-helper install hashicorp/template -v v2.2.0

What is “kreuzwerker/taps/m1-terraform-provider-helper” ?
A CLI to manage the installation of terraform providers for the Mac M1 chip.

For complete info:
https://kreuzwerker.de/en/post/use-m1-terraform-provider-helper-to-compile-terraform-providers-for-mac-m1

After following the above steps, terraform init will run successfully !!!

11 Likes