aanderse / teraflops

a terraform ops tool which is sure to be a flop
MIT License
44 stars 2 forks source link

Azure Cloud deployments using Terraform/Opentofu possible/planned ? #7

Closed AkechiShiro closed 4 months ago

AkechiShiro commented 6 months ago

Hi,

I would like to use this to deploy in Azure VMs running NixOS and manage them, do you think it could be possible to achieve this ?

aanderse commented 6 months ago

i found out that opentofu support isn't great in nixpkgs yet... but it is being worked on, so i'm waiting on that at the moment to avoid having to write workarounds

any cloud provider which has a terraform plugin is relatively simple to get working existing plugins are a good example to work from

have you ever used the terraform provider for azure?

AkechiShiro commented 6 months ago

Not yet, but I plan to try it someday, I'll try and use terraform first until the opentofu's implementation gets way better, I guess, it's matter of time for sure.

AkechiShiro commented 6 months ago

Just I've seen nixos-infect cannot work on Azure for unknown reasons as of right now, would this be a blocker for this use case ?

aanderse commented 6 months ago

Just I've seen nixos-infect cannot work on Azure for unknown reasons as of right now, would this be a blocker for this use case ?

presumably this is not a blocker, though i would need to look into more detail

i would guess that using our azure-image generation code we could do something similar to the virtualbox plugin

if you wanted to get this working i would be more than happy to work together on this - just let me know

AkechiShiro commented 6 months ago

I will definitely try and see if we can make this work at some point, not right now tho, but in a month or two

I'm willing to work on it with you.

KiaraGrouwstra commented 5 months ago

@AkechiShiro you can try opentofu like this :)

aanderse commented 5 months ago

it would be great if the readme included this - thank you very much for linking this @KiaraGrouwstra!

KiaraGrouwstra commented 5 months ago

@AkechiShiro looks like some commands like set-args do expect a binary named terraform - so i now added an extra package (pkgs.writeShellScriptBin "terraform" "tofu $@") to address that.

AkechiShiro commented 5 months ago

Thanks a lot for the instructions @KiaraGrouwstra !

EDIT : I think we could close this issue once there is a PR with these instructions in the README @aanderse

aanderse commented 5 months ago

@AkechiShiro looks like some commands like set-args do expect a binary named terraform - so i now added an extra package (pkgs.writeShellScriptBin "terraform" "tofu $@") to address that.

i think it would be nicer if we have the teraflops script attempt to use tofu if it can't find terraform

i will set some time aside soon to document this, etc...

thanks again for your help! ❤️

aanderse commented 4 months ago

EDIT : I think we could close this issue once there is a PR with these instructions in the README @aanderse

@AkechiShiro if you plan on collaborating on azure backend we could use this issue as a starting place, otherwise feel free to close the issue if you feel it is no longer relevant 👍

AkechiShiro commented 4 months ago

For now I'll be closing it, for the azure backend, I may open this issue back later, or open a new one, but at the moment it's not my focus right now.

Thanks for the improvements to use opentofu more easily !