I have a requirement in a project to add dgraph cluster on need basis.
If the flag is true,consider the cluster(provision them) and the MDEXes for index propogation otherwise do not provision them at all.
out of curiosity : why bother creating another Dgraph Cluster ??? why not declare new Dgraphs (plus hosts etc....) in your appconfig and Add/Delete them in the existing Dgraph Cluster ???
As long as your application can run a script, it should be as simple as running that script when the triggering condition is met. It should also be possible to make a web service call into the EAC (but I haven't tried that one)