0
我使用Azure的DSC試圖通過一個加密參數對XPackage像這樣Azure DSC擴展:是否可以將安全參數傳遞給xPackage Arguments值?
azureDeploy.json
"parameters": {
"appPassword": {
"type": "securestring",
},
}
...
"resources": [
{
"type": "extensions",
"name": "DSC",
"apiVersion": "2015-06-15",
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.20",
"protectedSettings": {
"appPassword": "[parameters('appPassword')]",
"configurationUrlSasToken": "[parameters('_artifactsLocationSasToken')]",
"artifactsLocationSasToken": "[parameters('_artifactsLocationSasToken')]"
}
}
configuration.ps1
Configuration vm
{
param (
appPassword
)
...
xPackage app
{
...
Arguments = "/S /v`"/qn ADMIN_USER_PASSWORD=$appPassword`""
}
然而,當我做到這一點,「 ADMIN_USER_PASSWORD「值未設置爲參數。如果我在設置的作用下傳遞了相同的參數。
我假設它是'參數( $ appPassword )'不''param( appPassword )'? – TravisEz13