A scalable Iaas terraform code which spins us Azure infrastructure


Use Case

An internet-facing web site with NoSQL database. The Website has a presentation layer using Angular on Nodejs which gets data via the service layer built using .Net Core WebAPI. The WebAPI interacts with CosmosDB using SQL API


Resource Group → All components will reside inside the resource group matt-rg-ex03a

VirtualNetwork → All components lies within the virtual network and have NSG rules defined

Subnet → Presentation and Service layer resides in their own subnet with NSG defined

VM Scaleset → Two sets of VM Scales defined. Presentation layers are on…

Remote into your Virtual Machine on Azure Cloud using your browser

The above diagram shows a simple Azure landscape with a VM scale set for Windows and Linux which are isolated via NSG rules from the internet. Colleagues connect to the VM scale set by first connecting to the Jump server and from there access the other resources of the application

Azure Bastion helps in removing the Jump Server concept and enables us to connect to infrastructure via the browser itself.

This is how it looks after Bastion is installed

Azure Development using CosmosDB offline Emulator

Use Case: Your organization decides to move away from on-premise databases and decided to put their money on cloud-based data stores. Azure offers a No SQL database via Azure CosmosDB. Having and always running CosmosDB (even though with smaller RU) for Development purposes costs money. Hence Offline Emulator of CosmosDB helps in overcoming the cost challenges during development

Problem State: Your companies IT estate is unfortunately on Windows 7/8. …

Problem Statement: I have a very large CSV file containing millions of records which need to be chunked into smaller files. These files would be later ingested into a database


  1. Create a program to read the file line by line and create a new file
  2. Use third-party tools to split the file
  3. Use the MacOs native tool split to chunk the files


Option #3: Use the MacOs native tool split to chunk the files


  1. Creating a program to split the file involves cost & effort
  2. Third-party tools, not my favourite.

SPLIT command


split [-a sufflen] [-b…

The above diagram shows the Architecture diagram of this simple application

In this article, we are defining Azure application which has the following component

  1. 1 Linux Virtual machines hosting NodeJs App
  2. CosmosDB with SQL API

The terraform code block folder structure is defined as shown below

The series attempts to explore how the terraform script can be leveraged to create Azure resources on Azure public cloud. In this example, we use terraform script to create App Services and Azure Database for PostgreSQL with Azure Traffic Manage is taken from the Microsoft site shown below


  • The application is developed using Nodejs with PostgreSQL as the underlying database server.
  • A public DNS CNAME record is mapped to the URL of the traffic manager
  • Virtual network and subnet are not required as the services used as PaaS
  • All the components would be deployed in the same geographic location…

Working with Docker for Windows can be painful. If you are downloading Microsoft images, it's highly likely that you will be running out of space in your C drive. In order to solve these issues, it would be ideal that we move our downloaded images from the C drive to another drive, maybe D drive.

In order to change the drive letter, please follow the steps below

  • Right Click on the Docker Desktop icon from the bottom right corner of taskbar as shown below
  • select Settings

In order to make PM2 work on Windows 7 using NPM, we need to do a few configuration changes

Create a folder to hold the environment config e.g D:\Matt\.pm2 (using cmd to rename with . extension)

Create an environment variable called PM2_Home and set the value for the newly created folder

Run the npm -i pm2 -g to install the PM2

After the installation, the following folders would be created

Matt Thankachan

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store