有沒有辦法將帶有特殊字符的字串發送到 ARM 模板自定義擴展?目前具有只有在收到密碼前密碼的一部分的問題fkdl2#dlsj我只看到fkdl2的密碼發送到shell腳本。其余角色正在被剝離。
"properties":{
"publisher":"Microsoft.Azure.Extensions",
"type":"CustomScript",
"typeHandlerVersion":"2.1",
"autoUpgradeMinorVersion":true,
"settings":{
"skipDos2Unix":false,
"timestamp":123456789
},
"protectedSettings":{
"commandToExecute":"[concat('sh /example/dir/setup.sh ', parameters('password')]"
}
}
uj5u.com熱心網友回復:
您可以在傳遞引數時使用base64函式:
"commandToExecute":"[concat('sh /example/dir/setup.sh ', base64(parameters('password')))]"
然后在setup.sh腳本中對其進行解碼
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/319014.html
上一篇:Azure企業管理員與全域管理員
