{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"forceUpdateTag": {
"type": "string",
"defaultValue": "[newGuid()]"
}
},
"variables": {
"deploymentScriptSharedProperties": {
"forceUpdateTag": "[parameters('forceUpdateTag')]",
"azPowerShellVersion": "10.1",
"retentionInterval": "P1D"
}
},
"resources": [
{
"type": "Microsoft.Resources/deploymentScripts",
"apiVersion": "2020-10-01",
"name": "escapingTest",
"location": "[resourceGroup().location]",
"kind": "AzurePowerShell",
"properties": "[union(variables('deploymentScriptSharedProperties'), createObject('scriptContent', '$DeploymentScriptOutputs = @{}; $DeploymentScriptOutputs.escaped = \"de''''f\";'))]"
}
],
"outputs": {
"scriptOutput": {
"type": "string",
"value": "[reference('escapingTest').outputs.escaped]"
}
}
}
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"languageVersion": "2.0",
"contentVersion": "1.0.0.0",
"parameters": {
"forceUpdateTag": {
"type": "string",
"defaultValue": "[newGuid()]"
}
},
"variables": {
"deploymentScriptSharedProperties": {
"forceUpdateTag": "[parameters('forceUpdateTag')]",
"azPowerShellVersion": "10.1",
"retentionInterval": "P1D"
}
},
"resources": {
"escapingTest": {
"type": "Microsoft.Resources/deploymentScripts",
"apiVersion": "2020-10-01",
"name": "escapingTest",
"location": "[resourceGroup().location]",
"kind": "AzurePowerShell",
"properties": "[union(variables('deploymentScriptSharedProperties'), createObject('scriptContent', '$DeploymentScriptOutputs = @{}; $DeploymentScriptOutputs.escaped = \"de''f\";'))]"
}
},
"outputs": {
"scriptOutput": {
"type": "string",
"value": "[reference('escapingTest').outputs.escaped]"
}
}
}