About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
powershell_heavy
⚠️
windows_tools
⚠️
missing_linux_example
Summary:
The documentation page demonstrates a bias toward Windows and PowerShell by exclusively using Azure PowerShell (New-AzResourceGroupDeployment) for command-line examples and referencing 'AzurePowerShell' as the script kind in ARM template resources. There are no examples using Azure CLI or Bash, and no mention of Linux scripting environments or tools, which may disadvantage users working on Linux or macOS platforms.
Recommendations:
- Provide equivalent Azure CLI (az deployment group create) examples alongside PowerShell commands for deploying templates and passing parameters.
- Include examples using 'AzureCLI' as the 'kind' property in deploymentScripts resources, not just 'AzurePowerShell'.
- Explicitly mention that the examples apply to both Windows and Linux, or clarify any platform-specific differences.
- Add Bash or shell command examples where relevant, especially for parameter passing and template deployment.
- Balance the order of examples so that Linux/CLI approaches are presented alongside or before Windows/PowerShell ones.
Create pull request
Flagged Code Snippets
New-AzResourceGroupDeployment -ResourceGroupName demoGroup -TemplateFile azuredeploy.json -demoParam1 "[[test value]"
{
"$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]"
}
}
}
{
"$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]"
}
}
}
New-AzResourceGroupDeployment -ResourceGroupName demoGroup -TemplateFile azuredeploy.json -demoParam1 "[test value]"