I think that using Packer instead of Terraform would be better choice there as this tool is built for such purposes.
Your wish is my command!
Thanks again for the tip, it definitely made more sense. Unfortunately the behavior of Packer to create an AMI is engraved into it, and it can’t be disabled, so I had to resort to an hacky solution to not make it do it.
In the end, it’s still better and cleaner than the Terraform solution.
Hey, I am the story author. Thanks for the tip!
I am definitely not a power user of Terraform and Packer, so I guess it has shown. However, I did look at Packer originally and I thought that its purpose was more for building base images (or AMIs) to use to spawn other instances/VMs, rather than to just run an instance to produce an artifact.
For example, the amazon AMI builder explicitly mentions that its purpose is to generate AMI images. I’d greatly appreciate if you could give me some insight, I’ll dig deeper in the documentation meanwhile.
EDIT: just saw https://www.packer.io/docs/post-processors/artifice/, going to play with it now!
You can use https://github.com/nix-community/nixos-generators to create a bootable aarch64 image cross compiled from x86 out of the box.
Just replied via e-mail to you, but for anyone else that’s reading: I have added a section which includes nixos-generators as it’s an amazing tool. I didn’t update the Vagrant section mostly because it’s just a log of stuff that I have done to get it working, but I have added a note.
Let me know if you have any other suggestions!
Generators were one of the interesting things I learned from the Super Bootable 64 post a few days ago. Super convenient tool. Thanks for the reminder.