Hi DataMiner Community,
I would like to check if there is a way to integrate or trigger a Terraform script from within DataMiner.
The idea is to see whether DataMiner can execute or interact with Terraform automation, for example to provision, update, or manage infrastructure based on certain DataMiner actions, alarms, or automation scripts.
Has anyone implemented something similar before?
Would this typically be handled through a DataMiner Automation script, a connector, an external API call, or another integration approach?
Any guidance or recommended best practices would be appreciated.
Best regards,
Hi Deema,
Yes, you can absolutely do this! While there is no native integration between DataMiner and Terraform, the standard and most effective way I think to handle this is indeed through a DataMiner Automation Script.
Here is how you can set it up:
1. The Core: DataMiner Automation Script
You can use a C# Automation Script to directly trigger your Terraform CLI:
-
In Visual Studio, create a new project using the standard DataMiner Automation Script template.
-
Inside the script, you can use something like
System.Diagnostics.Processto run the Terraform CLI on your host system (passing commands liketerraform applyordestroyalong with any dynamic variables) based on DataMiner alarms, actions, or schedules (via correlation rules in DataMiner).
2. The Reverse: User-Defined API (UDAPI)
If you also need Terraform to talk back to DataMiner (for example, to notify DataMiner when a deployment is complete or to report a state change):
-
You can create a User-Defined API (UDAPI) to act as an incoming gateway. You can follow the official DataMiner UDAPI Tutorial here to set up your endpoint:
-
From the Terraform side, you can then use Terraform's HTTP provider to call your newly published UDAPI endpoint and send data back to DataMiner.
This gives you a highly flexible, two-way workflow!
If this helped, please mark the question as solved 🙂
Kind regards,