How? I've always viewed TF as good at anything except metal; the best I would know to do is remote-exec but at that point you might as well drop to raw shell.
I mean that the only way I can think to use terraform to provision bare metal is to remote-exec a shell script (ex. to `apt install foo`), at which point you might as well skip terraform and `ssh targethost apt install foo` or `scp ./my-install-commands.sh root@targethost: && ssh root@targethost sh my-install-commands.sh`
Sure. That's effectively what Ansible does as well. You could even just have TF call that and be done.
The point that I'm trying to make is that I see a disconnect between deployment and provisioning.
I want both in a single tool (ala: Pulumi), even with bare metal. Ideally, in a programming language like TS or golang that is easy to get up to speed with and wraps up the complexity of getting servers up and running (as well as maintaining them over time).
I have a whole bunch of bare metal sitting in data centers all over the world, how am I expected to manage it?
Ansible/Salt/Chef is obviously one type of solution, but like you said, being able to code things in TS is really nice.
One thing TF does well, is bare metal.