Deploying Azure API Management

Deploying Azure API Management

There are many deployment-options we can choose of when it comes to Azure resources, and I discussed some of them in previous posts. This post will give you a quick overview over some of these options for provisioning an instance of Azure API Management from my point of view. I will focus on pros and cons between these options for deploying Azure API Management: Portal, Azure Cli, ARM, REST, PowerShell, Terraform and Pulumi.

Portal

Deploying an instance of APIM from the portal is great for getting started in case you haven't before. It's basically just a click on the create button. The only "hard"-work is setting the right configurations for your purpose, like SKU and capacity. Once configured, it takes about 3 minutes for the Consumption-plan and about an hour for the rest.

The only negative to say about this deployment-option is also the most critical for a business. You can't automate it. You can’t find out who did what changes after three months, which is the limit in the Activity Log.

Azure Cli

Deploying from the command-line is another simple option of provisioning Azure API Management. We didn’t discuss this option previously. The great advantage with this options is that it supports basically all Azure resources. We just login to our Azure account and can manage more or less everything.

ARM

Deploying APIM with Azure Resource Management (ARM) templates is powerful. Everything can be configured. There is also lots of documentation which is a huge advantage. They can easily be applied to your subscription to manage your resources.

But they are also hard to maintain. ARM templates are static files where we set all configurations hard-coded. If you want to work with them in a efficient way, some tooling around them is recommenced.

PowerShell

I use PowerShell a lot for operations with Azure API Management. It's as simple as using Azure Cli. We just get a slightly higher language which makes coding a bit simpler and a bit more fun. I work with a Mac which isn't a problem at all. We deploy our PowerShell-scripts from Azure DevOps and a Windows machine. PowerShell is already pre-installed which makes it even easier.

REST

Working with REST is the most flexible option we have. We can send http requests from any tool and any language that supports it.

The only negative really to say is that we need to build our requests. Compared to PowerShell it's a bit more work.

Terraform

Terraform has some nice advantages. It's fast, easy to manage your entire infrastructure, and it shows changes before it applies them to your subscription. It's also open source. Whenever you need a configuration that might not be in the newest version of Terraform, you are able to create a pull request and add it yourself. In case of Azure API Management, there was actually at least one configuration that was not supported yet. Even if Terraform has some super features, not everything is supported. It's always a bit behind of what's possible.

Pulumi

I haven’t covered Pulumi in a previous post. working with Pulumi gives some advantages over Terraform. The major differences between Terraform and Pulumi is that Terraform requires you to learn a new custom language, the HCL DSL. In contrast, Pulumi lets you use languages you already know and love, like JavaScript, TypeScript, Python, and Go. Here is an example of Python.

No alt text provided for this image

Pulumi doesn’t support every configuration either. Like Terraform. deploying the Consumption tier isn’t possible yet.

Conclusion

We have many options to choose of when managing Azure resources. In my experience, deploying an instance of Azure API Management is great with PowerShell. The reason is simple because when adding APIs and managing other API Management configurations, the PowerShell support is great.

要查看或添加评论,请登录

Sven Malvik??的更多文章

社区洞察

其他会员也浏览了