Today I tried to create a Terraform plan on the MacOS, running on Apple Silicon (M1). Just as usual I installed Terraform with brew but after running ’terraform init’ I got this error:
Provider registry.terraform.io/hashicorp/template does not have a package available for your current platform, darwin_arm64.
So it looks like that brew doesn’t have a build for the silicon… Apparently itis very easy to solve this issue. You need to compile the binary your self with Go.
git clone https://github.com/hashicorp/terraform-provider-template && cd terraform-provider-template && go build
Now you should have binary package in your directory named ’terraform-provider-template’. This binary needs to be moved to the Terraform plugins directory. By default the directory is located in ‘~/.terraform.d/plugins/registry.terraform.io/hashicorp/’.
Now create the ’template’ directory if it doesn’t exists already:
mkdir -p ~/.terraform.d/plugins/registry.terraform.io/hashicorp/template
Copy the binary to the directory and make it executable:
cp terraform-provider-template ~/.terraform.d/plugins/registry.terraform.io/hashicorp/template/
Now its all done and it should be working.Reply via email