IT:AD:Azure:PowerShell:Resource Group Deployment:Upload (New-AzureRmResourceGroupDeployment)

Summary

Once you've learnt the basics of the format of a RMT file: * IT:AD:Azure:ARM:HowTo:Understand

you have to deploy it.

You can deploy it using the command line (or a powershell file that contains the release command).

# deploy the template to the resource group
New-AzureRmResourceGroupDeployment -Name ExampleDeployment -ResourceGroupName Spike02 -TemplateFile spike02.resources.json

The file has parameters.

If they are not provided, you'll be queried.

PS D:\tmp> New-AzureRmResourceGroupDeployment -Name ExampleDeployment -ResourceGroupName Spike02 -TemplateFile spike02.r
esources.json

cmdlet New-AzureRmResourceGroupDeployment at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
storageAccountName:

You can abort that command and provide the missing arguments on the command line:

New-AzureRmResourceGroupDeployment -Name ExampleDeployment -ResourceGroupName Spike02 -TemplateFile spike02.resources.json storageAccountName -spike02StorageAccount

The result is that the resource is created:

PS D:\tmp> New-AzureRmResourceGroupDeployment -Name ExampleDeployment -ResourceGroupName Spike02 -TemplateFile spike02.r
esources.json -storageAccountName "spike02sa"


DeploymentName          : ExampleDeployment
ResourceGroupName       : Spike02
ProvisioningState       : Succeeded
Timestamp               : 9/1/2016 9:27:11 PM
Mode                    : Incremental
TemplateLink            :
Parameters              :
                          Name             Type                       Value
                          ===============  =========================  ==========
                          storageAccountName  String                     spike02sa

Outputs                 :
DeploymentDebugLogLevel :



PS D:\tmp>

  • /home/skysigal/public_html/data/pages/it/ad/azure/powershell/resource_group_deployment/upload.txt
  • Last modified: 2023/11/04 23:18
  • by 127.0.0.1