🔥Let’s Do DevOps: Make Tofu/Terraform More Failure Tolerant with AzApi Provider!🚀

Kyler Middleton
6 min readJun 10, 2024

This blog series focuses on presenting complex DevOps projects as simple and approachable via plain language and lots of pictures. You can do it!

A note as we start — I’ve always been an open source kid, and I’ll continue to be so. To reflect that, I’ll be using OpenTofu/Tofu primarily, rather than Terraform, which is now not an open source tool due to a relicensing by Hashicorp. That said, at this point all the code I’ll share will work on both platform exactly the same. Let me know if you want to hear me expand on why I’ve made this decision or other topics here.

This article closely follows this one:

Hey all!

This article follows one where I go over what the AzAPI Tofu (also Terraform!) Provider is, and how you can use it to find all sorts of info about Azure, including all the subnets across an entire subscription. That’s pretty awesome, go read it if you haven’t.

This article builds on that topic, and shares a technique I created for a work project — to find the primary private IP of a bunch of hosts that might change rapidly over time — for instance, a pool of application hosts that might grow over time. That list of private IPs can be fed to an Application Gateway or a FrontDoor resource, and traffic can be routed to them — but not if Tofu can’t find them!

This particular project had an additional complication — the Resource Groups that…

--

--

Kyler Middleton

DevNetSecOps, DevRel, cloud security chick. I will teach you, it’s unavoidable. She/Her 🏳️‍🌈🏳️‍🌈, INFJ-A, support the EFF!