Problem
When running terraform init on a computer with an Apple M1 chip (darwin_arm64), you may encounter the following error for the hashicorp/template provider:
Provider registry.terraform.io/hashicorp/template v2.2.0 does not have a package available for your current platform, darwin_arm64.
Cause
This error occurs because the hashicorp/template provider was deprecated and archived before Apple released the M1 chip. As a result, no version of the provider was ever compiled for the darwin_arm64 architecture.
Solution
The functionality of the hashicorp/template provider has been superseded by the built-in templatefile() function. You must refactor your configuration to use this function instead of the deprecated provider.
Additional Information
For more details on implementation, refer to the Terraform documentation on the templatefile() function.