Dealing with conditional Terraform Resources on Azure using Availability Sets

Sometimes when you are defining infrastructure with Terraform you run into issues that start to require conditional resources. Consider the following problem: You have a virtual machine cluster running in 3 environments in Azure, Test Staging Production These 3 environments are made up of the following resources — Azure Virtual Machine Resource Azure Availability Set …

Dealing with conditional Terraform Resources on Azure using Availability Sets Read More »

Share this content:

Creating Terraform Conditional resource based on mapped key.

Let’s create a conditional resource in Terraform based on a mapped key. Following post used for reference: https://medium.com/@business_99069/terraform-conditional-resources-based-on-a-map-key-a37fd329d3a1 Start with a map data structure in our variable.tfvars: Create a conditional azurerm_network_interface_backend_address_pool_assocation resource based on the value of the “docker_role” key in the above map. The lookup used in the logic below will only return true …

Creating Terraform Conditional resource based on mapped key. Read More »

Share this content:

Using Azure Runbooks to automate scale set operations with Powershell jobs

Azure Powershell runbooks are cool. I’ve been exploring using them as a way to avoid using a dedicated VM for running simple PowerShell Scripts in Azure. I have a group of instances that are running from a dedicated Scale Set that I need to reboot nightly. It’s pretty easy to get this going. You can …

Using Azure Runbooks to automate scale set operations with Powershell jobs Read More »

Share this content: