A tool for deploying Azure infrastructure based on proven practices. Azure building blocks take advantage of the Azure CLI and Azure Resource Manager templates to provision collections of resources as logical units with production-ready settings.
Important: The Azure Building Blocks project will not be undergoing further development. For advanced deployment template capabilities refer to Bicep, Azure Resource Manager template specs and the Azure Resource Manager template documentation. New development should not leverage Azure Building Blocks.
Note: Version 2.1.1 of Azure Building Blocks introduced breaking changes to versions earlier than 2.0.4. Versions earlier than 2.0.4 will no longer function. Please upgrade to version 2.0.4 or greater to continue using Azure Building Blocks.
The Azure Building Blocks project is a command line tool and set of Azure Resource Manager templates designed to simplify deployment of Azure resources. Users author a set of simplified parameters to specify settings for Azure resources, and the command line tool merges these parameters with best practice defaults to produce a set of final parameter files that can be deployed with the Azure Resource Manager templates.
Install the Azure Building Blocks using npm:
npm install -g @mspnp/azure-building-blocks
Verify the version of azure building blocks you are running using the command below. Make sure you are running version 2.0.4 or later.
azbb -V
Then, author an Azure Building Blocks parameter file and run the azbb
command line tool.
Full documentation for the command line tool and parameter file schema is available on the Wiki.
Azure Building Blocks parameters to deploy three identical VMs:
"type": "VirtualMachine",
"settings": {
"vmCount": 3,
"osType": "windows",
"namePrefix": "test",
"adminPassword": "testPassw0rd!23",
"nics": [{"subnetName": "web"}],
"virtualNetwork": {"name": "ra-vnet"}
}
The command line tool merges best practice defaults to the parameters as follows:
To add a scaleset with three identical VMs:
"type": "VirtualMachine",
"settings": {
"vmCount": 3,
"osType": "windows",
"namePrefix": "test",
"adminPassword": "testPassw0rd!23",
"nics": [{
"subnetName": "web",
"isPublic": false
}],
"virtualNetwork": {"name": "ra-vnet"},
"scaleSetSettings": { }
}
The list below shows changes introduced with the latest versions.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.