Open kolpav opened 2 years ago
Hi @kolpav . I have added cross-compilation for darwin (amd64 & arm64) and linux (arm64) in version 0.0.9. Now provider should be available for Terraform on your platform.
But I think this is far from enough because there are probably a lot things to be done before anything could be deployed from OSX to NixOS host because of cross-compilation. I am sure there will be a lot of problems. Maybe I could address some of them on the Terraform provider level configuration wrapper. But I don't use OSX in my everyday life and can not test this changes. So, hopefully this could be done by somebody in future, I'll do my best to help
Forgot to mention: there is another way to deploy configuration to NixOS hosts from OSX, some of my teammates using this, you could run a Docker container with Nix like this:
docker run -it -v nix:/nix:rw -v $HOME/.ssh:/chroot/.ssh:rw -v $(pwd):/src -e HOME=/chroot -w /src --platform=linux/amd64 nixos/nix:2.9.0
It will run container with Nix. Inside this container you could run nix-shell -p terraform
which will provide a Terraform tool.
This relies on the fact that Docker uses virtual machine on OSX.
@corpix That was quick, thank you. installation passed I'll give it a go, hopefully I'll be able to get rid of ansible soon. Since you mentioned using docker as an workaround for potential compatibility issues, there is also https://github.com/lima-vm/lima (docker/-compose) and https://multipass.run for quick cli vms might be useful for your teammates or future readers.
Could you please provide target for darwin platform there should be very little incompatibility when building I think.
I have tried to do it myself and make a PR but failed maybe when I am done with reading all the pills,nixpkgs resources I will be able to contribute somehow I would really like this project succeed it looks great and exactly what I would like to use 👍