ancient-diamond-80011
05/17/2023, 11:54 AMterraform
provider on an arm-based mac?gdev --env=dev -l5 plugins terraform plan-module -- gke
in the examples/terraform-gke
directory in 0.13
branch, i see it should be downloading the arm-specific version
[silly] Found 'getEnvironmentStatus' handler on 'terraform'
ℹ providers → Fetching terraform-1-2-9...
ℹ providers [debug] → Downloading https://releases.hashicorp.com/terraform/1.2.9/terraform_1.2.9_darwin_arm64.zip...
✔ providers [debug] → Done
✔ providers → Fetched terraform-1-2-9
ℹ providers [silly] → Execing '/Users/walther/.garden/tools/terraform-1-2-9/8ee4dc2174e5ecb9/terraform validate -json' in /Users/walther/git/garden/examples/terraform-gke/terraform
ℹ providers [silly] → Completing node resolve-provider.terraform:process. aborted=false, error=Command "/Users/walther/.garden/tools/terraform-1-2-9/8ee4dc2174e5ecb9/terraform validate -json" failed with code Unknown system error -8:
/Users/walther/.garden/tools/terraform-1-2-9/8ee4dc2174e5ecb9/terraform --help
results in zsh: exec format error: /Users/walther/.garden/tools/terraform-1-2-9/8ee4dc2174e5ecb9/terraform
arm64
in it
b) trying to run in x86 mode with arch -x86_64 terraform
also results in cannot execute binary file
c) we should be using sha256
verification for the downloads so in theory we should be validating things
d) but manually downloading the zip, extracting, and comparing the resulting binary files differterraform
binary to the correct directory, so this is not blocking, but it is slightly curiousfreezing-pharmacist-34446
05/17/2023, 12:23 PMancient-diamond-80011
05/17/2023, 12:43 PM╷
│ Error: Incompatible provider version
│
│ Provider registry.terraform.io/hashicorp/template v2.2.0 does not have a
│ package available for your current platform, darwin_arm64.
│
│ Provider releases are separate from Terraform CLI releases, so not all
│ providers are available for all platforms. Other versions of this provider
│ may have different platforms supported.
╵
this provider has been archived and last released 3 years ago https://registry.terraform.io/providers/hashicorp/template/latest
sadly it seems to be some transitive dependency - didn't find it in our examples under any required_providers
terraform providers
lists it at the root level, even though the versions.tf
does not mention it. i have also removed the .terraform.lock.hcl
(and the cache .terraform
directory) so it shouldn't be coming from there either
terraform providers
Providers required by configuration:
.
├── provider[registry.terraform.io/hashicorp/google] ~> 4.65
├── provider[registry.terraform.io/hashicorp/kubernetes] ~> 2.20
├── provider[registry.terraform.io/hashicorp/local]
├── provider[registry.terraform.io/hashicorp/template]
├── module.gcp-network
│ ├── provider[registry.terraform.io/hashicorp/google-beta] >= 3.45.0, < 5.0.0
│ ├── provider[registry.terraform.io/hashicorp/google] >= 3.83.0, < 5.0.0
│ ├── module.vpc
│ │ ├── provider[registry.terraform.io/hashicorp/google-beta] >= 3.45.0
│ │ └── provider[registry.terraform.io/hashicorp/google] >= 3.45.0
│ ├── module.firewall_rules
│ │ └── provider[registry.terraform.io/hashicorp/google] >= 3.33.0, < 5.0.0
│ ├── module.routes
│ │ └── provider[registry.terraform.io/hashicorp/google] >= 3.83.0, < 5.0.0
│ └── module.subnets
│ └── provider[registry.terraform.io/hashicorp/google] >= 4.25.0, < 5.0.0
└── module.gke
├── provider[registry.terraform.io/hashicorp/kubernetes] ~> 2.10
├── provider[registry.terraform.io/hashicorp/random] >= 2.1.0
└── provider[registry.terraform.io/hashicorp/google] >= 4.51.0, < 5.0.0
purple-oyster-28927
05/17/2023, 3:34 PMancient-diamond-80011
05/17/2023, 3:35 PM