Azure Resource Manager overview

Azure API Management

Fiodar Sazanavets

Senior Software Engineer at Microsoft

Infrastructure as Code overview

  • Think of IaC as an architectural blueprint for your cloud
  • Instead of daily instructions, the blueprint defines the full design
  • Code is used not inside the app, but to define:
    • What services the app consists of
    • How each service is configured

Infrastructure as code

Azure API Management

IaC deployment

  • Once written, IaC code can be executed to deploy the entire environment
  • No need to configure each service manually
  • Deployment becomes faster, repeatable, and less error-prone

IaC deployment

Azure API Management

Introduction to ARM templates

  • Multiple ways to do IaC in Azure
  • ARM templates are a classic mechanism
  • These templates are based on JSON
  • Consistent resource deployment across environments
  • Repeatability and automation

Automation menu section

Azure API Management

Creating ARM templates

ARM template export

  • New services can be templated from existing ones

    • Like taking a snapshot of a building to recreate elsewhere
  • In Azure Portal:

    • Open APIM instance -> Automation script or Export template blade
    • Portal gathers current configuration (settings, APIs, policies, connections)
    • Produces downloadable JSON + parameters file
  • Modify configs, rename, and redeploy

Azure API Management

ARM template structure

  • An ARM template is JSON that follows a specific structure
  • Think of it as a map or floor plan for your environment

  • Resources section = the main floor plan

    • Lists everything to build (e.g., APIM service, APIs, products, policies)
    • Each resource has a type, API version, and properties
  • Other template sections add flexibility beyond resources

ARM Template Structure

Azure API Management

ARM template parameters and variables

ARM template parameters and variables

  • Parameters are like blank lines on a form

    • Filled in at deploy time (APIM name, location, SKU, publisher details)
  • Variables are like a scratchpad

    • Computed helpers to keep the template structured
    • Examples: concatenate environment names, build resource IDs, avoid duplication
    • Makes templates easier to read and safer to modify
Azure API Management

ARM template outputs

  • Outputs are optional
  • Think of them as the receipt you take home after deployment
  • Provide useful values like gateway URL or resource IDs
  • Allow other scripts in a deployment chain to use these values

ARM template outputs

Azure API Management

Let's practice!

Azure API Management

Preparing Video For Download...