shalb / cluster.dev

Cloud-native infrastructure templating. Creating cloud installers for SaaS. Replication of complex cloud-native infrastructures.
https://docs.cluster.dev/
GNU Affero General Public License v3.0
401 stars 36 forks source link

Terraform issues on Macbook M1 #206

Closed ilkerkorkut closed 1 year ago

ilkerkorkut commented 1 year ago

Problem: I'm getting following tf errors on my Mac M1 machine. I know It depends on the terraform script, but is there a way to handle these errors in aspect of cdev?

eg error:

│ Error: Incompatible provider version
│
│ Provider registry.terraform.io/hashicorp/null v2.1.2 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.
╵

╷
│ Error: Incompatible provider version
│
│ Provider registry.terraform.io/hashicorp/random v2.3.1 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.

Cluster.dev Version: 0.7.16

Cluster.dev Config: Example k3s cluster template

romanprog commented 1 year ago

old version of provider in the k3s stack template repo https://github.com/shalb/cdev-aws-k3s

voatsap commented 1 year ago

@ilkerkorkut cdev just rely on provider versions that are binded inside the terraform code requirements. As @romanprog in stack template https://github.com/shalb/cdev-aws-k3s we invoking the terraform module to create K3s cluster: https://github.com/shalb/cdev-aws-k3s/blob/main/aws-k3s.yaml#L61C13-L61C58 And in the module particulary the provider is set here: https://github.com/shalb/terraform-aws-k3s/blob/master/init.tf#L2-L12

So you can clone stack template and module locally and upgrade the required provider versions and to make it work on your platform.

BTW you can create a PR on the target stack template and k3s terraform modules, so we could merge it and fix that issues for all users. Thanks )

romanprog commented 1 year ago

k3s stack template updated All providers and modules updated to latest versions. @ilkerkorkut try deploying the cluster again using the examples from the master branch. https://github.com/shalb/cdev-aws-k3s/tree/main/examples

No need to update cdev client version

ilkerkorkut commented 1 year ago

Thanks for the updates. Keeping all these dependencies(tf related) on my repositories is better to manage their versions etc. I'm closing this issue.