IT:AD:Azure:PowerShell:Resource Group Deployment:Upload (New-AzureRmResourceGroupDeployment)
- See also:
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).
Process
- Ensure you are signed in:
- Ensure you know what subscription you are working with:
- Ensure you have a
Resource Groupto deploy to:
# 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>