kreuzwerker / m1-terraform-provider-helper

CLI to support with downloading and compiling terraform providers for Mac with M1 chip

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sumologic provider fails to install despite install command completing successfully

avaDarwin opened this issue · comments

Expected Behavior

m1-terraform-provider-helper install... results in a compiled binary for the provider in .terraform/providers/registry.terraform.io/...

Actual Behavior

m1-terraform-provider-helper install... returns with Successfully installed..., but the compiled provider isn't placed in .terraform/providers.

m1-terraform-provider-helper lockfile upgrade adds a hash to the lockfile. Manually navigating to the repo at $HOME/.m1-terraform-provider-helper/terraform-provider-sumologic, checking out the version tag and running go build produces a compiled provider, but manually copying that binary to .terraform/providers/sumologic/sumologic/2.9.6/darwin_arm64/ results in the hash not being found in the lockfile.

Steps to Reproduce (including precondition)

$ m1-terraform-provider-helper install sumologic/sumologic -v 2.9.6
Getting provider data from terraform registry
Getting source code...
Compiling...
Successfully installed sumologic/sumologic 2.9.6

$ ls .terraform/providers/registry.terraform.io/
gavinbunney  grafana  hashicorp

$ terraform plan
...
Error: registry.terraform.io/sumologic/sumologic: there is no package for registry.terraform.io/sumologic/sumologic 2.9.6 cached in .terraform/providers

Screenshot on This Problem (if possible)

See repro steps.

Your Environment

  • OS: Monterey (12.6)
  • m1-terraform-provider-helper version: v0.8.1
commented

I tried to reproduce your issue, but it is working for me.
Which terraform version are you using?
Did you run tf init?
The install command copies the compiled binary into the local mirror directories (~/.terraform.d/plugins/....). Only by issuing a tf init those binaries are copied into your project .terraform

That did it, tyvm