aztfmod / rover

The rover is a docker container in charge of the deployment of the Terraform platform engineering for Azure
MIT License
172 stars 142 forks source link

[feature-request] Add ARM64 container for Apple M1 chips #220

Closed hyperfocus1337 closed 2 years ago

hyperfocus1337 commented 2 years ago

I can tell testing CAF code locally is noticeable a LOT slower locally compared to our CI.

Would like to see an ARM64 container at some point to somewhat mitigate the performance penalty.

As a sidenote, these providers would first need to get darwin_arm64 versions to make it work.

❯ terraform init
Initializing modules...

Initializing the backend...

Initializing provider plugins...
- Reusing previous version of hashicorp/tls from the dependency lock file
- Reusing previous version of hashicorp/template from the dependency lock file
- Reusing previous version of hashicorp/external from the dependency lock file
- Reusing previous version of aztfmod/azurecaf from the dependency lock file
- Reusing previous version of hashicorp/time from the dependency lock file
- Reusing previous version of hashicorp/azuread from the dependency lock file
- Reusing previous version of hashicorp/null from the dependency lock file
- Reusing previous version of hashicorp/random from the dependency lock file
- Reusing previous version of hashicorp/azurerm from the dependency lock file
- Installing hashicorp/azuread v1.4.0...
- Installed hashicorp/azuread v1.4.0 (signed by HashiCorp)
- Installing hashicorp/null v3.1.0...
- Installed hashicorp/null v3.1.0 (signed by HashiCorp)
- Installing hashicorp/random v3.1.0...
- Installed hashicorp/random v3.1.0 (signed by HashiCorp)
- Installing hashicorp/azurerm v2.81.0...
- Installed hashicorp/azurerm v2.81.0 (signed by HashiCorp)
- Installing hashicorp/tls v3.1.0...
- Installed hashicorp/tls v3.1.0 (signed by HashiCorp)
- Installing hashicorp/time v0.7.2...
- Installed hashicorp/time v0.7.2 (signed by HashiCorp)
- Installing hashicorp/external v2.1.0...
- Installed hashicorp/external v2.1.0 (signed by HashiCorp)
╷
│ Error: Incompatible provider version
│
│ Provider registry.terraform.io/aztfmod/azurecaf v1.2.7 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/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.

Thanks for looking into it.

hyperfocus1337 commented 2 years ago

The azurecaf version was upgraded to 1.2.9 which resolved the missing darwin_arm64 binary.

And the deprecated template provider was resolved in https://github.com/aztfmod/terraform-azurerm-caf/issues/820.

I can now use terraform locally outside the rover container without any issues, but an arm64 version of the rover container is still missing, which would be a nice complement.

arnaudlh commented 2 years ago

@hyperfocus1337 - I pushed a WIP branch for multi-arch targeting, still a lot of work to do but feel free to test and contribute - https://github.com/aztfmod/rover/tree/AL-M1

arnaudlh commented 2 years ago

Available now for testing under roveralpha:

https://hub.docker.com/r/aztfmod/roveralpha/tags?page=1&ordering=last_updated

image

hyperfocus1337 commented 2 years ago

Awesome, thank you!!

arnaudlh commented 2 years ago

the build number check is not ok yet, just run export ROVER_RUNNER=true in the meantime