Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy automatically an Azure API management?

Within API management, I created an API that enables to call a serverless function app. Now I would like to deploy automatically this functionnality. Here are the possibilities I saw on internet :

  • Create and configure the api management through the portal (this is not what I call an automatic deployment)
  • Use Powershell command (unfortunally I am working with linux)
  • ARM (Azure Resource Manager): this is not easy and I did find how to create an API with Azure function app
  • Terraform: same as ARM, it is not clear for me how to create an API with Azure function app

If someone has an experience, links or ideas I would be very thankful.

Regards,

like image 263
Yassir S Avatar asked Dec 01 '18 10:12

Yassir S


People also ask

How do I automate an Azure deployment?

To automate provisioning of Azure resources, you can use Terraform, Ansible, Chef, Puppet, Azure PowerShell, Azure CLI, or Azure Resource Manager templates. To configure VMs, you can use cloud-init (for Linux VMs) or Azure Automation State Configuration (DSC).

How long does it take to deploy Azure Apim?

Expect ~45-75 minutes.


2 Answers

We are currently using Terraform for all our Azure infrastructure including API Management and I would strongly recommend it.

It is creating and updating everything we want, including api policies and has a relativity small learning curve.

You can start learning here:

https://learn.hashicorp.com/terraform?track=azure#azure

The docs for APIM are here:

https://www.terraform.io/docs/providers/azurerm/r/api_management.html

Once the initial learning curve is done the rest is easy and the benefits are many.

like image 101
Mark W Avatar answered Nov 09 '22 16:11

Mark W


Azure Powershell is 100% cross platform now, so that's an option. Here are some samples: https://learn.microsoft.com/en-us/azure/api-management/powershell-samples

You can also use ARM Templates to spin it up. Configuring it is a lot harder. You can map any of these calls to the ARM Template.

Terraform - i think its still in the works. https://github.com/terraform-providers/terraform-provider-azurerm/issues/1177. But I wouldnt go that way.

like image 42
4c74356b41 Avatar answered Nov 09 '22 15:11

4c74356b41