How do I build a gui for our terraform solution?

We recently did a project with terraform to deploy virtual machines on a on-premises vcenter. Now we want to build a nice gui for this. Imagine a IT teacher needs to prepare a class and needs 10 windows servers. We know how to do this with terraform, we know how to build a desktop application (html, css and JavaScript using electron) but how do we connect the two? We are looking for some advise from experienced programmers as we aren’t. Any tips are appreciated!

We tried to write .tf files with JavaScript using the node library “GenesisDevice”, but I don’t think this is best practice