No API, no problem

Don’t you just love when you are toying around with the newest Microsoft features and want to integrate it inn to your Terraform code, and realize the feature does not support API at all.

This is the feeling of love i felt when atempting to deploy Microsoft foundry workflows with the use of Terraform.

Giving up at this stage is not really a option since scaling the infrastructure is a priority. So how do one solve such a issue?

The solution is to go to your browser, and monitor exactly what data goes inn and out, and catch the exact POST request you need.

Then you make a dirty powershell script that does that post request for you, with the payload you want.

Lastly you need the powershell code to be invoked by the Terraform code with local exec.

It may not be the prettiest solution to implement IaC to whatever solution you want. But the result speaks for itself, IaC on a solution that is “UI only”.

This may be as dirty a hack can get, but what else can you do when one is using so hip technology that not even Microsoft has a API for it.