Automating Deployment of Azure API Management Changes Using Azure DevOps — Part 1

Wael Kdouh
12 min readJun 10, 2021

This is part 1 of a 2 part series where we discuss automating the deployment of an APIM changes as well as automating the Logic Apps deployment which are utilized as backends for the APIM instance.

Part 1 — Automating Deployment of Azure API Management Changes Using Azure DevOps

Part 2 — Automating Deployment of Azure Logic App Using Azure DevOps

With the strategic value of APIs, a continuous integration (CI) and continuous deployment (CD) pipeline has become an important aspect of API development. It allows organizations to automate deployment of API changes without error-prone manual steps, detect issues earlier, and ultimately deliver value to end users faster.

I recently embarked on a journey along with my colleague Lukman Balunywa to uncover all the details behind automating the deployment of Azure API Management changes using Azure DevOps. Whereas in this post we focus on utilizing Azure DevOps to create the CI/CD pipelines, these same pipelines could be recreated using Github Actions as well.

Before we get into the weeds lets start by understanding the problem statement here. Organizations today normally have multiple deployment environments (e.g., Development, Testing, Production) and use separate API Management instances for each environment.

As a result, organizations often face the following challenges:

  • How to automate deployment of APIs into API Management?
  • How to migrate configurations from one environment to another?

One solution that exists today is the “Extractor” tool which is presented here. We won’t go into the details of the “Extractor” tool as the aforementioned link is self explanatory. Instead, we will be presenting the implementation details of the Azure DevOps CI/CD pipeline and along the way uncover some of the challenges that we faced while utilizing the “Extractor” tool.

Figure 1 and Figure 2 below show both the source and target environments we are dealing with in our scenario. The idea here is that a team would be able to make changes to the APIs in the Sandbox environment and then automate the deployment of these changes in the Maintenance -> Performance -> Production environments. Another important detail here is that each APIM instance targets its own set of Logic Apps, OAuth Server, and…

--

--

Wael Kdouh

Principal Cloud Solution Architect at Microsoft. I assist enterprise customers in crafting exceptional architectures for success.