Packer | Hugonweb Annotated Link Bibliography
https://developer.hashicorp.com/packer
Declarative tool for creating virtual machine images. This way you can bake all of the installed software into an image, rather than having to provision once a virtual machine boots.
This plus it's parent Terraform (open source version: OpenTofu) seem to be the best way to do infrastructure as code, at least at a certain scale.
A similar tool, for bare metal, is goldboot