3.3.4 Describe ARM and Azure ARM Templates
Description of Azure ARM and ARM templates.
ARM provides a management layer to create, update and delete resources in your Azure account. When a request is sent from any Azure tool, ARM receives it.
ARM Benefits
Manage infrastructure via templates rather than scripts. A Resource Manager template is a JSON file.
Deploy, manage and monitor all the resources for your solution as a group.
Re-deploy solution consistently over life cycle.
Define dependencies between resources.
Apply access control to all services with RBAC.
Apply tags to resources to logically organize them.
Clarify billing.
Infrastructure as Code
This is a concept where infrastructure is managed as lines of code. This can be used to manage entire deployments with repeatable templates and configurations. ARM templates and Bicep are two examples of this.
ARM Templates
Describe the resources you want in a declarative JSON format. The deployment code is verified before running to ensure all resources will be created correctly. This then creates the resources in parallel. The developer only needs to define the state and configuration of each resource in the ARM template. They can even execute PowerShell or Bash.
Benefits of ARM Templates
Declarative Syntax: You declare what you want to deploy, but don't write the actual programming commands and sequence to deploy the resources.
Repeatable Results: Repeatedly deploy infrastructure consistently. The same template can be used for production and development.
Orchestration: ARM ensures resources are created in the correct order and deploys in parallel where possible. The template is deployed using one command.
Module Files: Templates can be broken into smaller components and linked at deployment. Templates can be nested.
Extensibility: Can be used with PowerShell and Bash to extend the ability to setup resources during deployment.
Bicep
Support for all Resource Types and API Versions: Supports all preview and GA versions for Azure services.
Simple Syntax: More concise and easier to read than JSON, requires no programming language knowledge.
Repeatable Results: Bicep files are idempotent, meaning the same file can be used many times to get resources in the same state.
Orchestration: ARM ensures resources are created in the correct order and deploys in parallel where possible. The template is deployed using one command.
Modularity: Can be split into managed parts using modules. This lets you simplify development.