cloudposse/terraform-external-module-artifact

Error when init on M1 (hashicorp/template deprecated)

Closed this issue · 5 comments

Describe the Bug

Hi, we're using one of your Terraform modules (terraform-aws-datadog-integration, which got split off to terraform-aws-datadog-lambda-forwarder). However, it has a dependency on this module which in turn depends on hashicorp/template.

Unfortunately, the latest version of hashicorp/template does not support the darwin_arm64 platform so it is not installable on M1 devices. It appears it has been deprecated (hashicorp/terraform-provider-template#85) and thus will never gain support for it (hashicorp/terraform-provider-aws#22985).

Do you know if there's any work to switch off hashicorp/template for this module? Just checking so we could best prepare long-term. Thank you! (for this and the great work overall)

Expected Behavior

Can initialize project on a Mac M1 device

Steps to Reproduce

Steps to reproduce the behavior:

  1. Include cloudposse/terraform-external-module-artifact in terraform project
  2. Run terraform init

Screenshots

╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/template v2.2.0: the local package for registry.terraform.io/hashicorp/template 2.2.0 doesn't match any of the checksums previously recorded in the dependency lock file (this
│ might be because the available checksums are for packages targeting different platforms)

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

  • Mac 12.1
  • Terraform v1.0.5 on darwin_arm64

Additional Context

Add any other context about the problem here.

hi,
I sorted this issue with the following command

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

details are at https://discuss.hashicorp.com/t/template-v2-2-0-does-not-have-a-package-available-mac-m1/35099/3

Hi @ismailyenigul , thanks for the tip! How did you work around the terraform lock file? I found that I'd have to delete the lock file when working with other people on my team without M1 because it has to lock to your local copy vs. the actual copy.

Hi @kingston
I also had to delete .terraform.lock.hcl

template module has been deprecated, this should be replaces with template_file instead of shimming for the Arch imo.

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

Small correction:

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