Forum Discussion

GouravIN's avatar
GouravIN
Brass Contributor
Apr 15, 2022
Solved

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...
  • PrawinSreeram's avatar
    Apr 15, 2022

    GouravIN 

    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

    https://praveenkumarsreeram.com/  

Resources