【发布时间】:2017-02-28 17:01:57
【问题描述】:
我正在尝试从 ARM 模板部署具有 DSC 扩展的 VM。根据各种消息来源,甚至this SO question,,我正在按照正确的方式将凭据对象传递给我的脚本:
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.19",
"autoUpgradeMinorVersion": true,
"settings": {
"modulesUrl": "[concat(parameters('_artifactsLocation'), '/', variables('ConfigureRSArchiveFolder'), '/', variables('ConfigureRSArchiveFileName'), '/', parameters('_artifactsLocationSasToken'))]",
"configurationFunction": "[variables('rsConfigurationConfigurationFunction')]",
"properties": {
"SQLSAAdminAuthCreds": {
"UserName": "[parameters('SSRSvmAdminUsername')]",
"Password": "PrivateSettingsRef:SAPassword"
}
}
},
"protectedSettings": {
"Items": {
"SAPassword": "[parameters('SSRSvmAdminPassword')]"
}
}
}
但是,当我部署它时,我收到以下错误消息:
Error message: "The DSC Extension received an incorrect input: The password element of
argument 'SQLSAAdminAuthCreds' to configuration 'PrepareSSRSServer' does not
match the required format. It should be as follows
{
"UserName" : "MyUserName",
"Password" : "PrivateSettingsRef:MyPassword"
}.
Please correct the input and retry executing the extension.".
据我所知,我的格式是正确的。我错过了什么?谢谢
【问题讨论】:
-
你试过硬编码吗?我看不出你的模板有什么问题
-
硬编码密码?嗯,我试试,但是不能用……
-
不幸的是,它总是返回相同的错误消息。我尝试更改 apiVersion,将“属性”更改为“configurationArguments”,将凭据更改为完全在 protectedSettings 中传递。它总是给出相同的错误信息...
-
您是否尝试过使用具有相同功能的 github 快速入门模板,看看它们是否适合您?
标签: azure azure-resource-manager dsc arm-template