【发布时间】:2018-05-02 07:00:12
【问题描述】:
我正在尝试部署 ARM 模板。
这里是模板和参数文件路径:
[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;
}
我想在我的部署中再添加一个参数文件,例如:parameters_lmn.json,如何在一个部署中同时容纳 xyz 和 lmn 参数文件?
【问题讨论】:
-
您是否要将多个值传递给
$templateFilePath和$parametersFilePath?
标签: powershell azure arm-template