OCI Terraform Provider on Macbook M1
perlporter opened this issue · comments
I am having trouble executing your code, see:
Do you have any tips, to help me ?
Provider registry.terraform.io/hashicorp/oci v4.62.0 does not have a package available for your current platform, darwin_arm64.
Thank you...
Hi!
Apparently that provider is not available for the mac M1, at least not yet, from what I can see here:
https://releases.hashicorp.com/terraform-provider-oci/4.62.0/
Do you have the "rosetta" emulation environment on your mac M1?
(I think it should help, but I'm not sure. I don't have a M1 myself to test...)
Hi @jpetazzo !
I'm trying using Rosetta2, but not work too, see:
➜ ampernetacle (main) ✔ uname -a
Darwin toothless.ramenzoni.lan 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:29:10 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T8101 x86_64
➜ ampernetacle (main) ✔ arch
i386
Error: Incompatible provider version
Provider registry.terraform.io/hashicorp/oci v4.62.0 does not have a package available for your current platform, darwin_arm64.
Is there anything else you could test?
I see!
I did a little bit of reasearch and found issue hashicorp/terraform#27257 which has some instructions to compile a provider from source.
I don't have an M1 machine here to try it out unfortunately...
I wonder if it might be easier to run it within a Docker container using QEMU emulation.
Do you have Docker installed on your machine, per chance?
I would suggest to create an instance on Oracle cloud and run from there.
The way to authenticate with oci changes a bit, but it is not complicated
https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#How2
Otherwise I was also able to run it using Roseta
Apparently, recent versions of the OCI provider (see https://releases.hashicorp.com/terraform-provider-oci/4.69.0/) have Darwin arm64 releases. So I think it should work on the M1 now (even without Rosetta).
I'll close this issue, but will be happy to re-open if someone is still experiencing problems when trying to run this on the M1! (I don't have an M1 to test myself :))