Reputation: 43
I am trying to deploy an ARM template.
here are the template and parameters file path:
[string]
$templateFilePath = "C:\Users\Desktop\template_abc.json",
[string]
$parametersFilePath = "C:\Users\Desktop\parameters_xyz.json"
)
Deployment commands:
Write-Host "Starting deployment...";
if(Test-Path $parametersFilePath) {
New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateFile $templateFilePath -TemplateParameterFile $parametersFilePath;
}
else {
New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateFile $templateFilePath;
}
I want to add one more parameter file to my deployment, like : parameters_lmn.json, how can I accommodate both xyz and lmn parameter file in a single deployment?
Upvotes: 2
Views: 1934
Reputation: 43
You could use https://powersnippets.com/join-object/ to merge the two json object. You'll need to decide which parameter file overwrites the other in case both define the same parameter.
Upvotes: 3