Hi Laurence,
This is safe since tempdb itself is ephemeral and is recreated upon restart anyway. We have been doing this in production for a year now. The only minor catch is that you need a way to create the tempdb folder upon the server start and grant the appropriate permissions to the MSSQLSERVER service. We handle that by a scheduled task that runs at startup. If you're curious, here's the two actions we run:
%ComSpec% /C IF NOT EXIST "D:\Databases\Data\" MKDIR "D:\Databases\Data\"
icacls.exe "D:\Databases\Data" /grant *S-1-5-80-3880718306-3832830129-1677859214-2598158968-1052248003:(OI)(CI)(F)
Obviously, our tempdb files are configured to live in the D:\Database\Data folder.
Also, even though the 😧 drives are technically ephemeral, they survive across a guest OS reboot and I've rarely seen them actually be deprovisioned even when the VM has been deallocated. They will definitely disappear if you redeploy the VM.
Hope that helps,
Blaine