Home
%3CLINGO-SUB%20id%3D%22lingo-sub-359138%22%20slang%3D%22en-US%22%3EStep-By-Step%3A%20Introduction%20to%20Azure%20Command%20Line%20Interface%20(CLI)%20with%20Azure%20Arm%20Templates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-359138%22%20slang%3D%22en-US%22%3E%3CP%3EWorking%20with%20Azure%20Resource%20Manager%20Templates%20provides%20you%20with%20a%20way%20to%20codify%20your%20infrastructure%20using%20JSON!%26nbsp%3B%20In%20this%20tutorial%20we'll%20show%20you%20how%20to%20get%20started%20with%20using%20different%20parameters%20along%20side%20with%20your%20template.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-resource-manager%2Fresource-group-overview%2F%3FWT.mc_id%3Darmapache-youtube-jagord%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EFrom%20the%20Azure%20Resource%20Manager%20Overview%3A%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3EAzure%20Resource%20Manager%20is%20the%20deployment%20and%20management%20service%20for%20Azure.%20It%20provides%20a%20consistent%20management%20layer%20that%20enables%20you%20to%20create%2C%20update%2C%20and%20delete%20resources%20in%20your%20Azure%20subscription.%20You%20can%20use%20its%20access%20control%2C%20auditing%2C%20and%20tagging%20features%20to%20secure%20and%20organize%20your%20resources%20after%20deployment.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20you%20take%20actions%20through%20the%20portal%2C%20PowerShell%2C%20Azure%20CLI%2C%20REST%20APIs%2C%20or%20client%20SDKs%2C%20the%20Azure%20Resource%20Manager%20API%20handles%20your%20request.%20Because%20all%20requests%20are%20handled%20through%20the%20same%20API%2C%20you%20see%20consistent%20results%20and%20capabilities%20in%20all%20the%20different%20tools.%20All%20capabilities%20that%20are%20available%20in%20the%20portal%20are%20also%20available%20through%20PowerShell%2C%20Azure%20CLI%2C%20REST%20APIs%2C%20and%20client%20SDKs.%20Functionality%20initially%20released%20through%20APIs%20will%20be%20represented%20in%20the%20portal%20within%20180%20days%20of%20initial%20release.%3C%2FP%3E%0A%3CP%3EThe%20following%20image%20shows%20how%20all%20the%20tools%20interact%20with%20the%20Azure%20Resource%20Manager%20API.%20The%20API%20passes%20requests%20to%20the%20Resource%20Manager%20service%2C%20which%20authenticates%20and%20authorizes%20the%20requests.%20Resource%20Manager%20then%20routes%20the%20requests%20to%20the%20appropriate%20service.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EWith%20Resource%20Manager%2C%20you%20can%20create%20a%20template%20(in%20JSON%20format)%20that%20defines%20the%20infrastructure%20and%20configuration%20of%20your%20Azure%20solution.%20By%20using%20a%20template%2C%20you%20can%20repeatedly%20deploy%20your%20solution%20throughout%20its%20lifecycle%20and%20have%20confidence%20your%20resources%20are%20deployed%20in%20a%20consistent%20state.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3C%2FP%3E%3CDIV%20class%3D%22video-embed-center%20video-embed%22%3E%3CIFRAME%20class%3D%22embedly-embed%22%20src%3D%22https%3A%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%253A%252F%252Fwww.youtube.com%252Fembed%252FT2tpEyN0aQw%253Ffeature%253Doembed%26amp%3Burl%3Dhttp%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253DT2tpEyN0aQw%26amp%3Bimage%3Dhttps%253A%252F%252Fi.ytimg.com%252Fvi%252FT2tpEyN0aQw%252Fhqdefault.jpg%26amp%3Bkey%3Dfad07bfa4bd747d3bdea27e17b533c0e%26amp%3Btype%3Dtext%252Fhtml%26amp%3Bschema%3Dyoutube%22%20width%3D%22600%22%20height%3D%22337%22%20scrolling%3D%22no%22%20frameborder%3D%220%22%20allow%3D%22autoplay%3B%20fullscreen%22%20allowfullscreen%3D%22true%22%20title%3D%22Video%22%3E%3C%2FIFRAME%3E%3C%2FDIV%3E%3CP%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20follow%20along%20with%20this%20tutorial%20it's%20recommended%20you%20have%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAzure%20Account%3C%2FLI%3E%0A%3CLI%3ESome%20Bash%20shell%20experience%3C%2FLI%3E%0A%3CLI%3EGeneral%20understanding%20of%20scripting%2Fprogramming%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EImportant%20links%20you'll%20need%20to%20have%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-resource-manager%2Fresource-manager-templates-parameters%3FWT.mc_id%3Darmapache-youtube-jagord%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EParameters%20section%20of%20Azure%20Resource%20Manager%20templates%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-resource-manager%2Fresource-group-template-deploy-cli%2F%3FWT.mc_id%3Darmapache-youtube-jagord%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EDeploy%20resources%20with%20Resource%20Manager%20templates%20and%20Azure%20CLI%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-quickstart-templates%2Ftree%2Fmaster%2Fubuntu-apache-test-page%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Eubuntu-apache-test-page%20GitHub%20Repo%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20create%20a%20resource%20group%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Eaz%20group%20create%20-l%20centralus%20-n%20%26lt%3Binsert%20your%20preferred%20name%20here%26gt%3B%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBasic%20deploy%20of%20an%20ARM%20template%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Eaz%20group%20deployment%20create%20%20--name%20%26lt%3Byour-deploy-name%26gt%3B%20%20--resource-group%20%26lt%3Byour%20resource%20group%20name%26gt%3B%20--template-file%20azuredeploy.json%20%0A%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDeploy%20with%20specified%20parameters%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Eaz%20group%20deployment%20create%20--name%20%26lt%3Byour%20deployment%20group%26gt%3B%20--resource-group%3D%26lt%3Byour%20resource%20group%20name%26gt%3B%20--template-file%20azuredeploy.json%20--parameter%20location%3Deastus%20testPageTitle%3D%22demo%20jay%22%20testPageBody%3D%22%26lt%3Bp%26gt%3BThis%20is%20a%20really%20cool%20test%20page.%26lt%3B%2Fp%26gt%3B%22%20adminUsername%3D%26lt%3Byour%20preferred%20username%26gt%3B%20adminPassword%3D%26lt%3Byour%20preferred%20password%26gt%3B%20dnsNameForPublicIP%3D%26lt%3Byour%20preferred%20hostname%26gt%3B%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHave%20additional%20questions%20about%20this%20tutorial%3F%26nbsp%3B%20Feel%20free%20to%20leave%20a%20message%20here%20or%20in%20the%20YouTube%20comments!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-359138%22%20slang%3D%22en-US%22%3E%3CP%3EWorking%20with%20Azure%20Resource%20Manager%20Templates%20provides%20you%20with%20a%20way%20to%20codify%20your%20infrastructure%20using%20JSON!%26nbsp%3B%20In%20this%20tutorial%20we'll%20show%20you%20how%20to%20get%20started%20with%20using%20different%20parameters%20along%20side%20with%20your%20template.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20650px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84856iA38C3901DB975733%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22consistent-management-layer.png%22%20title%3D%22consistent-management-layer.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-359138%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Resource%20Manager%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Working with Azure Resource Manager Templates provides you with a way to codify your infrastructure using JSON!  In this tutorial we'll show you how to get started with using different parameters along side with your template.  

 

From the Azure Resource Manager Overview:

 

Azure Resource Manager is the deployment and management service for Azure. It provides a consistent management layer that enables you to create, update, and delete resources in your Azure subscription. You can use its access control, auditing, and tagging features to secure and organize your resources after deployment.

 

When you take actions through the portal, PowerShell, Azure CLI, REST APIs, or client SDKs, the Azure Resource Manager API handles your request. Because all requests are handled through the same API, you see consistent results and capabilities in all the different tools. All capabilities that are available in the portal are also available through PowerShell, Azure CLI, REST APIs, and client SDKs. Functionality initially released through APIs will be represented in the portal within 180 days of initial release.

The following image shows how all the tools interact with the Azure Resource Manager API. The API passes requests to the Resource Manager service, which authenticates and authorizes the requests. Resource Manager then routes the requests to the appropriate service.

 

With Resource Manager, you can create a template (in JSON format) that defines the infrastructure and configuration of your Azure solution. By using a template, you can repeatedly deploy your solution throughout its lifecycle and have confidence your resources are deployed in a consistent state.

 

 

To follow along with this tutorial it's recommended you have:

 

  • Azure Account
  • Some Bash shell experience
  • General understanding of scripting/programming

Important links you'll need to have:

 

Parameters section of Azure Resource Manager templates

Deploy resources with Resource Manager templates and Azure CLI

ubuntu-apache-test-page GitHub Repo

 

 

 

To create a resource group:

 

 

az group create -l centralus -n <insert your preferred name here>

 

 

Basic deploy of an ARM template:

 

 

az group deployment create  --name <your-deploy-name>  --resource-group <your resource group name> --template-file azuredeploy.json 

 

 

Deploy with specified parameters:

 

 

az group deployment create --name <your deployment group> --resource-group=<your resource group name> --template-file azuredeploy.json --parameter location=eastus testPageTitle="demo jay" testPageBody="<p>This is a really cool test page.</p>" adminUsername=<your preferred username> adminPassword=<your preferred password> dnsNameForPublicIP=<your preferred hostname>

 

 

Have additional questions about this tutorial?  Feel free to leave a message here or in the YouTube comments!