Azure Resource Manager overview
1. Azure Resource Manager overview
Welcome back! In this video, we will talk about Infrastructure as Code and how it's done in Azure.2. Infrastructure as Code overview
Think of Infrastructure as Code like an architectural blueprint for your cloud: instead of telling contractors what to do each day, you hand them a drawing and every wall, door, and outlet appears exactly as specified. Code, instead of being used inside a particular app, is used to define what services the app consists of and how each of them is configured.3. IaC deployment
Once you write such code, you can then run it to automate the process of deploying your entire environment. You no longer have to deploy and configure each service by hand.4. Introduction to ARM templates
There are multiple ways of doing IaC in Azure. The original and the oldest mechanism is Azure Resource Manager (ARM) templates: JSON that describes what to build, how to configure it, and in what order, so you can stand up API Management and any other related services the same way in dev, test, and prod. This enables repeatability and automation.5. Creating ARM templates
New services can be templated from existing services. Think of this as taking a snapshot of your building so you can recreate it elsewhere or keep it under version control. To do so, you can open your API Management instance in Azure Portal and use the Automation script or Export template blade to generate a template. The Portal gathers the current configuration: service settings, APIs, policies, and connected pieces, and produces a downloadable JSON plus a parameters file. We can then change some configuration, apply different names, and redeploy the services to a different environment.6. ARM template structure
The JSON inside an ARM template adheres to a specific structure. Think of it as a map. The resources section of the template is the main section. It's the floor plan itself, listing each thing to build, such as the API Management service and its child resources for APIs, products, and policies, each with a type, API version, and properties. But besides this section, there are other sections in the template that make it more flexible.7. ARM template parameters and variables
Parameters are the blank lines on a form: values you fill in at deploy time, such as the APIM name, location, SKU, or publisher details. Variables are your scratchpad—computed helpers that keep the template well-structured, like concatenating environment names, building resource IDs, and removing unnecessary duplications, making the template easier to read and harder to make mistakes in if it ever has to be modified.8. ARM template outputs
Outputs, which is an optional section, are the receipt you take home: useful values emitted after deployment, like the gateway URL or resource IDs, so other scripts can chain work without guesswork. They can be used by other scripts in a chain of deployment scripts.9. Let's practice!
Let's see how ARM templates are exported!Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.