Logging Azure Cleanup Workflows to Custom Tables in Log Analytics

Building on my previous article about using Azure Automation to clean up orphaned resources, this is Part 2. Here, I'll show you how to send the collected logs to a Log Analytics workspace using the newer Log Ingestion API. The Log Analytics HTTP Data Collector API was the original method for sending custom data to …

Continue reading Logging Azure Cleanup Workflows to Custom Tables in Log Analytics

Azure Policy as Code using Terraform – Part 1

Azure Policy is the cornerstone of governance in Azure. Creating and deploying policies at scale, as well as managing policy and initiative assignments for a large enterprise, is a massive undertaking. In highly regulated industries, the number of policies can run into hundreds to meet compliance requirements. The policy definition itself, when embedded in code, …

Continue reading Azure Policy as Code using Terraform – Part 1

Dynamic Terraform Module for Azure Diagnostic Settings

Enabling diagnostic settings is a fundamental requirement for deploying services on Azure. Each type of resource has a different set of log and metric categories. It could get quickly complicated and clunky if you don't use a dynamic way to fetch those log and metric categories. However, before we open the floodgates, we also need …

Continue reading Dynamic Terraform Module for Azure Diagnostic Settings

Deploying Azure Service Bus with filters

Azure Service Bus topics are used to deliver messages to multiple subscribers. By default a copy of the message is sent to each subscription. But this behavior can be changed by adding rules or filters to the subscription. When a subscription is created, a default rule is added to the subscription. The default rule is …

Continue reading Deploying Azure Service Bus with filters

Creating custom roles in Azure

Recently, I've been working on an Azure Function that'll automate the creation of a resource group and a Cosmos DB account within that resource group. The function app was configured to use MSI(Managed Service Identity). The function app will run under this identity and the MSI needs to have access to perform the required operations …

Continue reading Creating custom roles in Azure

Azure ARM Templates – Are nested loops possible?

Have you ever wanted to create a nested loop in an ARM template? Currently, it's not possible to create resources within a nested loop. You can use the copy element to create multiple instances of a resource by looping over an array. But you can't loop over an inner array to create sub-resources. For example, …

Continue reading Azure ARM Templates – Are nested loops possible?

Azure ARM Templates – Conditionally setting resource properties

Using Azure Resource Manager(ARM) templates, you can deploy resources based on some condition. You can use the Condition element or the If function to achieve this. When you want to conditionally deploy a top-level resource based on the value of a parameter, the condition element can be used. Conditions cannot be used with child resources. …

Continue reading Azure ARM Templates – Conditionally setting resource properties

Deploying Azure resources using ARM templates

This post describes the process of creating a Resource Group project, adding resources and deploying the resources to Azure. The following image illustrates the resources that are being deployed and their dependencies. Creating a Resource Group deployment project Select Azure Resource Group under the Cloud section in the New Project window. A main ARM template …

Continue reading Deploying Azure resources using ARM templates