Is there a way to send a string with special characters to an ARM template custom extension? Currently having an issue with only receiving a portion of the password ex password fkdl2#dlsj I only see fkdl2 of the password being sent to the shell script. The rest of the characters are being stripped off.
"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')]"
}
}
CodePudding user response:
You could use the base64 function when passing the argument:
"commandToExecute":"[concat('sh /example/dir/setup.sh ', base64(parameters('password')))]"
and then decode it inside the setup.sh
script