cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
447
Views
0
Helpful
0
Replies

Web UI to trigger Terraform commands

BoyntonBrown
Level 1
Level 1

In our company our trainers execute locally Terraforms commands (Init, Validate, Plan, Apply) to allocate resources for online courses, that last two to three days. Currently Terraform commands deploy to Oracle Cloud Infrastructure (OCI), but in the future it might be Azure, AWS or any other similar platform.

While the trainers would still be responsible to update and create Terraform config files, the goal would be to create an easy web UI to allow the managers to start/stop online courses as they don't have programming skills and would not be able to execute the commands through a terminal.
The complexity or triggering terraform commands would be handled behind the scenes.

Do you have any suggestions in how to make the Terraform commands callable programmatically and an easy way to handle the config files?

 

My architecture plan would be the following and I would like some feedback about it:

1- Web UI: Given a list of available courses, it accepts the users' commands to start/stop a course.

2- The UI calls a REST API (Azure Function, for instance) to start the wished operations. Here Given some ID metadata passed from the UI I would gather the Terraform configs specific to the target course from a Storage System or DB.

3- In the Azure Function context, with Node.js (but other languages might be also possible if bringing more benefits) I will have the Terraform libraries installed and I execute the specific commands to allocate resources and create the environment accordingly. My Lowes Life

Not having prior experience with Terraform, I don't know if this is a good approach or there might be better patterns to achieve the above. In bold, I tried to underline the main blocks involved.

0 Replies 0