Sunday, November 28, 2021

Bicep Templates for APIM Configuration - Part 1

Here are some of the Bicep templates I came across when working through. 

Create an APIM Instance


resource apim 'Microsoft.ApiManagement/service@2021-04-01-preview' = {
  name: apimName
  location: region
  sku: {
    name: sku
    capacity: 1
  }
  properties: {
    publisherEmail: publisherEmail
    publisherName: publisherName
    virtualNetworkConfiguration: {
      subnetResourceId: '/subscriptions/${subscription().subscriptionId}/resourceGroups/${resourceGroup().name}/providers/Microsoft.Network/virtualNetworks/${virtualNetworkName}/subnets/${subnetName_ApimAccess}'
    }
    virtualNetworkType:'External'
  }
}

This example allows the APIM to be connected to a subnet on a virtual network.

Sunday, November 14, 2021

Azure Cloud Adoption Framework: Where to start?

 With my brief time of over 6 years on Azure, I have involved with many migrations, new developments as well as lift and shifts. One question that every instance had in our minds was where to start? This is a very business critical question. Developers often like to see good processes and practices while managers do like to see results soon. End of the day one of the key unclear reason to go to cloud is believing cloud can do super stuffs at a lower price. Is it so?


Saturday, October 23, 2021

Bicep Templates for Cosmos DB Setup

 Recently I came up with a few templates for setting up Cosmos DB Infrastructure for a demonstration. Following steps will show how to setup the Cosmos DB, Create Collections,  Create Private DNS Zones and Setup a Custom SQL role. 

The complete example is available publicly on GitHub. 

https://github.com/Malind19/springdata-infrastructure/blob/main/modules/cosmos.bicep

Sunday, September 5, 2021

Advantage of using B2C in your next application

Gone are the days you spend days building the security functionalities like Login,  Registration and Password Reset.  There are plenty of modern authentication mechanisms that can be plugged and played such as Facebook, Google, LinkedIn, Live and so on. What is there is a way you can use all of them in matter of clicks?


Wednesday, October 21, 2020

Using TimerInfo object in Timer Functions

 TimerInfo object can be used to various purposes in a Timer Function. There are three main properties that can be used to make the logic. 


IsPastDue 

As I mentioned in the previous article this can be determined to know whether this function was scheduled to run previously. Depending on this you can decide to make certain actions. 

Debugging Azure Timer Functions

Azure Timer Functions are great way to run your scheduled jobs and may be process data, or send a summary email likewise. One of the questions I received during a session was how do we trigger them when testing. This can be done in two ways. 

1. Set Cron Expression to pick up the next minute

If you set the following Cron expression, it will trigger on exact same minute. In this example, on 42nd minute. So whenever you debug you can set the next minute or two and then let it trigger and debug them. 


Thursday, August 13, 2020

Azure Resource Graph Explorer

 

Azure Resource Graph Explorer is a powerful tool that lets you interact with the resources across multiple subscriptions. 

You can browse it through the All. Resources screen -> Open Query option. 


Then there are many pre defined set of queries that allows you to begin easily. 

The following query lets you find all the resources by a tag 'production' 

Resources
where tags.environment=~'production'
project name 

If you have configured tags correctly, you can see all your production resources with this. 

Apart from the results view, it shows the chart view as well for possible results. 

Once you are satisfied with it, you can save the query as a private or a shared query via Save Query windo.