Much has been written about Genghis Khan, the great ancient Mongol emperor. Probably much of it is just a legend. Maybe, who knows, he was just someone who really liked to ride horses.

The other children of the tribe would often argue over toys made from horse bones. But little Temüjin, who would one day be known as Genghis Khan, would say, “I want to ride a pony.”

Temüjin wanted to ride over the next hill and see what was on the other side. He would often end up quite far before his father sent his brothers to find him.

Temüjin became a kind, cheerful yet a bit shy young man. As usual, his fellow tribesmen would continue quarreling over just anything. But Temüjin would sit quietly and finally say, “What if we just forget this and ride over those mountains to see what’s on the other side?”

Unfortunately, Temüjin lived in a time when tourism was not highly appreciated. It would sometimes literally come to clashes with narrow-minded locals even if you only wanted to visit new places and politely ask, “Good evening, would you happen to have any hotel rooms available for me and my hundred thousand buddies, by chance?”

Azure Bicep

Riding a pony is probably a lot of fun. But configuring your infrastructure with Azure Bicep can also feel like fun as a pony ride. Especially after exhausting yourself fighting with a complex Terraform configuration file - and perhaps quarreling with your colleagues about what went wrong.

Luckily, times have changed and we can use Azure Bicep today to conquer all interesting regions without upsetting locals.

Since we have convinced ourselves at this point that Genghis Khan was just a misunderstood jolly fellow who only wanted to say “hello” to the world, we can now safely help him a little bit and define a “Hello World” app for all the regions he ever traveled.

So let’s go all the way back to the place where it all started. I define an Azure resource group for the endless Mongolian steppes:

The response tells us that the action was successful:

Now let’ write a Bicep file main.bicep and define all of Temüjin’s regions:

Then, define a loop that deploys Temüjin’s peace-loving “Hello World” app to each region:

Then implement the region-app file region-app.bicep and define the resource plan for each Temüjin’s region:

Remember to define the actual application for each region:

Finally, expand your empire to take over these regions with a single command:

Looks to easy to be true, doesn’t it? But it still begs the question why do we really have to help this medieval crackpot very stable genius whom we barely know?
But wouldn’t it so much better if this dude could mind his own business and write his schripts himself, so we could focus on our own stuff that we really care about? For example lawning the lawn, walking the dog, washing the dishes, writing silly blog posts etc.?

could do his owen Bicep scripting by himself without bothering normal people like us? After all, we might rather want to focus on stuff that matters to us (like mowing the lawn, washing the dishes, vacuum cleaning our homes etc.) instead of helping some medieval wacko whom we barely know? So let’s ride beyond the next hill and so Temüjin how to…

Automatically generate Bicep files

But wouldn’t it be better that he could just mind his own conquest business and we could focus on our own stuff, which is even more interesting to ourselves, like mowing the lawn, washing the dishes, vacuum cleaning our homes etc? Surely, but

But would it be

That would be it. Next time, let’s examine how to encrypt Genghis Khan’s own book The Secret History of the Mongols in MongoDB Atlas on Azure.

Until then, happy tourism!