hashicorp / setup-terraform

Sets up Terraform CLI in your GitHub Actions workflow.
https://developer.hashicorp.com/terraform/tutorials/automation/github-actions
Mozilla Public License 2.0
1.39k stars 243 forks source link

Automatically fallback to darwin/amd64 for Terraform versions before 1.0.2 #409

Closed bflad closed 7 months ago

bflad commented 7 months ago

Reference: https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/

GitHub hosted runners for macos-latest are automatically being upgraded to macOS 14 and arm64 architecture machines. Any workflows that are using the upgraded runner can return an error such as:

Error: Terraform version 0.12.* not available for darwin and arm64

This adds special case logic to automatically fallback to darwin/amd64 when darwin/arm64 is detected and the version is below 1.0.2, which is the first version that had darwin/arm64 release assets. macOS should emulate and run the amd64 binaries until Apple or GitHub removes the emulation support.

bflad commented 7 months ago

They do! For example: https://github.com/hashicorp/setup-terraform/pull/404 / https://github.com/hashicorp/setup-terraform/actions/runs/8790489292/job/24122612523

github-actions[bot] commented 6 months ago

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.