azure api management,

Azure API Management with ARM

Sven Malvik Sven Malvik Connect Mar 28, 2020 · 2 mins read
Azure API Management with ARM

Deploying an ARM template (Azure Resource Management)-template from GitHub is the simplest way of provisioning an instance of API Management, BUT - there are a couple of things we need to be aware of.

Deploy Azure API Management with ARM from GitHub

The Microsoft Azure API Management Product Team has provided some ARM templates with a nice button that let us with a click load some settings into Azure. What’s missing are some parameters like email address, name and SKU that we have to set manually. We want to automate this of course, and we’ll do that in a minute. First, we’ll look at how this manual process works.

Azure API Management TemplatesAzure API Management Templates

Let’s Deploy to Azure, and see what happens.

Create Azure API Management in the portalCreate Azure API Management in the portal

Since we have used a public available ARM template, we need to set some parameters. An interesting observation is that the default SKU is Developer. We know that from previous deployments. But if we want to change it to Consumption, we’ll see that it’s not available. This template is from 2017 where Consumption was not available. What I’ve done now is to fork the repo and made some changes in the ARM template.

azuredeploy.jsonazuredeploy.json

I’ve not only added two SKUs, but I’ve also added 0 to skuCount as an allowed value. 0 is the value we have to set for Consumption. Deploying from my fork svenmalvik/azure-quickstart-templates/101-azure-api-management-create will make it possible to choose Consumption as well. I’ve set Consumption as default. To fully automated the deployment of the ARM template, we need to set some more default values like email and name.

Deploy Azure API Management with ARM from a local machine

Instead of clicking a nice blue button on GitHub, I was wondering if I just can apply the ARM template with default values and without any interactions. The code below deploys the remote ARM template that doesn’t need our attention.

# Create resource group
New-AzResourceGroup -Name "apim-with-arm-rg" -Location "West Europe"

# Deploy remote ARM template
New-AzResourceGroupDeployment -ResourceGroupName "apim-with-arm-rg" -TemplateUri https://raw.githubusercontent.com/svenmalvik/azure-quickstart-templates/master/101-azure-api-management-create/azuredeploy.json

Deploy Azure API Management with remote ARM templateDeploy Azure API Management with remote ARM template

Conclusion

Working with ARM templates is a bit more work that we’ve seen in a previous post where we deployed API Management with the Azure PowerShell module. The advantage with ARM is its completeness. There are certain configurations like setting a custom domain that we can’t do with PowerShell today and where ARM fits perfectly.

Join Newsletter
Get the latest updates right in your inbox. I never spam!
Sven Malvik
Written by Sven Malvik

Latest Stories

Event-Driven Infrastructure with App Configuration

Azure App Configuration is great for externalizing application configurations. But what if an application is our infrastructure? How coul...

Sep 12, 2020

Logging in Azure API Management

This post is a complete step-by-step guide on how to send logs from Azure API Management to Azure Event Hub with PowerShell. We start by ...

Apr 11, 2020

Understanding Policies in Azure API Management

Policies are the heart of Azure API Management. They let us change the behavior of our APIs in a very flexible manner. Before I dive in t...

Apr 18, 2020

How Virtual Machine Classic is Different to (Normal) VM in Azure

Have you ever wondered what a “classic” Virtual Machines in Azure is? Some virtual machines are classic and some others are not. Why is t...

Feb 06, 2021

Serving Website Images from Azure CDN with SSL

In this post I will show you step by step how to serve images on a website from Azure CDN with SSL enabled. My blog has a couple of Azure...

Apr 25, 2020

How To Manage Azure Virtual Machines

I will go through the first steps for managing Virtual Machines. We will create a Windows VM, start the Internet Information Service IIS,...

Dec 26, 2020

Backup and Restore in Azure API Management

As infrastructure gets more complex, more parts will eventually break. This is even more true as we make frequently changes. Sometimes we...

May 02, 2020

Introduction to Azure API Management

Azure API Management (APIM) is a way to create consistent and modern API gateways for existing backend services. It provides an interface...

Jan 25, 2021

How to Use Azure Bastion as a Jump Host

Knowing about Azure Bastion is part of the AZ-303 exam for becoming an Azure Solution Architect. Bastion is very useful in cases where yo...

Dec 20, 2020

Using Azure API Management APIs with Docker

We use Azure API Management in some cases for calling external services from Azure Kubernetes Service (AKS). Azure API Management acts in...

Jun 27, 2020

Introduction to Farmer - IaC with Azure

As many companies move their services to the cloud, the way we interact with the cloud, the tooling, becomes more important. In Azure we ...

Sep 26, 2020

Latest Stories

Event-Driven Infrastructure with App Configuration

Event-Driven Infrastructure with App Configuration

Azure App Configuration is great for externalizing application configurations. But what if an application is our infrastructure? How coul...

Sep 12, 2020

Logging in Azure API Management

Logging in Azure API Management

This post is a complete step-by-step guide on how to send logs from Azure API Management to Azure Event Hub with PowerShell. We start by ...

Apr 11, 2020

Understanding Policies in Azure API Management

Understanding Policies in Azure API Management

Policies are the heart of Azure API Management. They let us change the behavior of our APIs in a very flexible manner. Before I dive in t...

Apr 18, 2020

How Virtual Machine Classic is Different to (Normal) VM in Azure

How Virtual Machine Classic is Different to (Normal) VM in Azure

Have you ever wondered what a “classic” Virtual Machines in Azure is? Some virtual machines are classic and some others are not. Why is t...

Feb 06, 2021

Serving Website Images from Azure CDN with SSL

Serving Website Images from Azure CDN with SSL

In this post I will show you step by step how to serve images on a website from Azure CDN with SSL enabled. My blog has a couple of Azure...

Apr 25, 2020

How To Manage Azure Virtual Machines

How To Manage Azure Virtual Machines

I will go through the first steps for managing Virtual Machines. We will create a Windows VM, start the Internet Information Service IIS,...

Dec 26, 2020

Backup and Restore in Azure API Management

Backup and Restore in Azure API Management

As infrastructure gets more complex, more parts will eventually break. This is even more true as we make frequently changes. Sometimes we...

May 02, 2020

Introduction to Azure API Management

Introduction to Azure API Management

Azure API Management (APIM) is a way to create consistent and modern API gateways for existing backend services. It provides an interface...

Jan 25, 2021

How to Use Azure Bastion as a Jump Host

How to Use Azure Bastion as a Jump Host

Knowing about Azure Bastion is part of the AZ-303 exam for becoming an Azure Solution Architect. Bastion is very useful in cases where yo...

Dec 20, 2020

Using Azure API Management APIs with Docker

Using Azure API Management APIs with Docker

We use Azure API Management in some cases for calling external services from Azure Kubernetes Service (AKS). Azure API Management acts in...

Jun 27, 2020

Introduction to Farmer - IaC with Azure

Introduction to Farmer - IaC with Azure

As many companies move their services to the cloud, the way we interact with the cloud, the tooling, becomes more important. In Azure we ...

Sep 26, 2020