Articles → MICROSOFT AZURE → Whatif Command For Azure ARM

Whatif Command For Azure ARM






Purpose





Steps




  1. Upgrade the PowerShell
  2. Install 1.12.1-preview of Az.Resources module
  3. Create a IP address and download the template files
  4. Run whatif command



Upgrade The Powershell




iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"





Install 1.12.1-Preview Of Az.Resources Module




Install-Module Az.Resources -RequiredVersion 1.12.1-preview -AllowPrerelease



Create A IP Address And Download The Template Files




Picture showing the downloaded template files

Click to Enlarge



Picture showing setting the value attribute in parameters.json file

Click to Enlarge


Run Whatif Command




New-AzResourceGroupDeployment -ResourceGroupName "RG2" -TemplateParameterFile ./parameters.json -TemplateFile ./template.json -WhatIf




Picture showing the output of whatif command in Azure

Click to Enlarge



New-AzResourceGroupDeployment -ResourceGroupName "RG2" -TemplateParameterFile ./parameters.json -TemplateFile ./template.json




Picture showing the execution of New-AzResourceGroupDeployment command in PowerShell

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, May 19, 2022

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250