Forum Discussion
GouravIN
Apr 15, 2022Brass Contributor
How to pass ARM Variable as parameter of PowerShell in ARM
Hi There, I am working on a ARM template and it is working fine however I want to pass ARM variable(s) should be passed in the argument rather hardcoding. Like same storage account name should be...
- Apr 15, 2022
You can use concat function to dynamically frame the arguments. You can replace Line 192 with the below code.
"arguments":"[concat('-azsub ''Goukumar''',' -rg ''pstest''',' -keyvault ''pstestk''',' -storageaccount ''',variables('storageAccountName'),'''',' -secretname ''secretarm333''')]",
Please note the escape sequence is single quote.
Thanks,
Praveen Sreeram
PrawinSreeram
Apr 15, 2022Copper Contributor
You can use concat function to dynamically frame the arguments. You can replace Line 192 with the below code.
"arguments":"[concat('-azsub ''Goukumar''',' -rg ''pstest''',' -keyvault ''pstestk''',' -storageaccount ''',variables('storageAccountName'),'''',' -secretname ''secretarm333''')]",
Please note the escape sequence is single quote.
Thanks,
Praveen Sreeram