Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing darwin_arm64 binary for the hashicorp/template provider (Apple Silicon, M1) #30055

Closed
larstobi opened this issue Dec 1, 2021 · 4 comments
Labels
enhancement new new issue not yet triaged

Comments

@larstobi
Copy link

larstobi commented Dec 1, 2021

If I use the darwin_arm64 binary of terraform, then I cannot run terraform init if I use the template_file provider.

(A quick terraform -version will reveal if you run amd64 on Rosetta or on arm64.)

The releases show that the darwin_arm64 is in fact not published:

I have checked out the source code for this and built it on my M1 macbook, and it compiles and runs without issue, so it should be a quick fix for Hashicorp to publish this binary for the same 2.2.0 version.

@larstobi larstobi added enhancement new new issue not yet triaged labels Dec 1, 2021
@jbardin
Copy link
Member

jbardin commented Dec 1, 2021

Hi @larstobi,

The template provider was deprecated before darwin_arm64 providers were released, and the repository is now archived and read-only. The functionality from this provider is now handled by the templatefile function in Terraform.

Thanks!

@jbardin jbardin closed this as completed Dec 1, 2021
@larstobi
Copy link
Author

larstobi commented Dec 1, 2021

@jbardin
Thanks. I was able to migrate most of our uses of template_file to templatefile(), however some uses are not possible to migrate, like when using the output of a resource as an input to template_file:

data "aws_s3_bucket_object" "example" {
  bucket = "example-bucket-name"
  key    = "example.yaml"
}

data "template_file" "example" {
  template = data.aws_s3_bucket_object.example.body
  vars = {
    foo  = "bar"
  }
}

Since the templatefile() function doesn't support string input, but requires a file name, it can't be converted. Is this use case supported by a different function?

If I can't make it work by other means, I can see there is a fork of your old template provider repo that has published a binary for darwin_arm64 here: https://github.com/gxben/terraform-provider-template/tree/v2.2.0-m1

@larstobi
Copy link
Author

larstobi commented Dec 1, 2021

#26838

It seems that the only way forward is to use a self-compiled darwin_arm64 provider or a the third party one from gxben, as the above use case is impossible to achieve without using a deprecated provider running on terraform with Intel emulation.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 1, 2022

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

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

2 participants