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
⚠️
windows_first
Summary:
The documentation is heavily centered around PowerShell, which is a Windows-native tool, and all usage examples (including on Linux and macOS) require PowerShell. The toolkit itself is implemented as PowerShell scripts, and there are no examples or guidance for using the toolkit with native Linux/Unix shells or tools (such as Bash, sh, or Python). The Windows installation section appears first, reinforcing a Windows-first perspective. There is no mention of alternative approaches for Linux users who may not wish to install PowerShell.
Recommendations:
- Provide native Bash or shell script examples for Linux and macOS users, or clarify if PowerShell Core is the only supported runtime.
- Consider developing or highlighting any cross-platform wrappers or CLI tools (e.g., a Docker container or a dotnet global tool) that do not require PowerShell.
- Reorder the installation instructions to present Linux and macOS equally or before Windows, or group them together to avoid a Windows-first impression.
- Explicitly state in the introduction that PowerShell Core is required on all platforms, and provide rationale for this dependency.
- If possible, offer guidance for integrating the toolkit into common Linux CI/CD environments (e.g., GitHub Actions, Azure Pipelines with Bash).
Create pull request
Flagged Code Snippets
Get-ChildItem *.ps1, *.psd1, *.ps1xml, *.psm1 -Recurse | Unblock-File
Import-Module .\arm-ttk.psd1
Test-AzTemplate -TemplatePath \path\to\template
{
"environment": {},
"enabled": true,
"continueOnError": false,
"alwaysRun": false,
"displayName": "Download TTK",
"timeoutInMinutes": 0,
"condition": "succeeded()",
"task": {
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
"versionSpec": "2.*",
"definitionType": "task"
},
"inputs": {
"targetType": "inline",
"filePath": "",
"arguments": "",
"script": "New-Item '$(ttk.folder)' -ItemType Directory\nInvoke-WebRequest -uri '$(ttk.uri)' -OutFile \"$(ttk.folder)/$(ttk.asset.filename)\" -Verbose\nGet-ChildItem '$(ttk.folder)' -Recurse\n\nWrite-Host \"Expanding files...\"\nExpand-Archive -Path '$(ttk.folder)/*.zip' -DestinationPath '$(ttk.folder)' -Verbose\n\nWrite-Host \"Expanded files found:\"\nGet-ChildItem '$(ttk.folder)' -Recurse",
"errorActionPreference": "stop",
"failOnStderr": "false",
"ignoreLASTEXITCODE": "false",
"pwsh": "true",
"workingDirectory": ""
}
}
- pwsh: |
Import-Module $(ttk.folder)/arm-ttk/arm-ttk.psd1 -Verbose
$testOutput = @(Test-AzTemplate -TemplatePath "$(sample.folder)")
$testOutput
if ($testOutput | ? {$_.Errors }) {
exit 1
} else {
Write-Host "##vso[task.setvariable variable=result.best.practice]$true"
exit 0
}
errorActionPreference: continue
failOnStderr: true
displayName: 'Run Best Practices Tests'
continueOnError: true
Get-ChildItem *.ps1, *.psd1, *.ps1xml, *.psm1 -Recurse | Unblock-File
Import-Module ./arm-ttk.psd1
Test-AzTemplate -TemplatePath /path/to/template
Get-ChildItem *.ps1, *.psd1, *.ps1xml, *.psm1 -Recurse | Unblock-File
Import-Module ./arm-ttk.psd1
Test-AzTemplate -TemplatePath /path/to/template
Test-AzTemplate -TemplatePath $TemplateFolder
Test-AzTemplate -TemplatePath $TemplateFolder -File cdn.json
Test-AzTemplate -TemplatePath $TemplateFolder -Test "Resources Should Have Location"
param(
[Parameter(Mandatory=$true,Position=0)]
[PSObject]
$TemplateObject
)
# Implement test logic that evaluates parts of the template.
# Output error with: Write-Error -Message
param(
[Parameter(Mandatory)]
[string]
$TemplateText
)
# Implement test logic that performs string operations.
# Output error with: Write-Error -Message
Test-AzMarketplacePackage -TemplatePath "Path to the unzipped package folder"
- pwsh: |
New-Item '$(ttk.folder)' -ItemType Directory
Invoke-WebRequest -uri '$(ttk.uri)' -OutFile "$(ttk.folder)/$(ttk.asset.filename)" -Verbose
Get-ChildItem '$(ttk.folder)' -Recurse
Write-Host "Expanding files..."
Expand-Archive -Path '$(ttk.folder)/*.zip' -DestinationPath '$(ttk.folder)' -Verbose
Write-Host "Expanded files found:"
Get-ChildItem '$(ttk.folder)' -Recurse
displayName: 'Download TTK'
{
"environment": {},
"enabled": true,
"continueOnError": true,
"alwaysRun": false,
"displayName": "Run Best Practices Tests",
"timeoutInMinutes": 0,
"condition": "succeeded()",
"task": {
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
"versionSpec": "2.*",
"definitionType": "task"
},
"inputs": {
"targetType": "inline",
"filePath": "",
"arguments": "",
"script": "Import-Module $(ttk.folder)/arm-ttk/arm-ttk.psd1 -Verbose\n$testOutput = @(Test-AzTemplate -TemplatePath \"$(sample.folder)\")\n$testOutput\n\nif ($testOutput | ? {$_.Errors }) {\n exit 1 \n} else {\n Write-Host \"##vso[task.setvariable variable=result.best.practice]$true\"\n exit 0\n} \n",
"errorActionPreference": "continue",
"failOnStderr": "true",
"ignoreLASTEXITCODE": "false",
"pwsh": "true",
"workingDirectory": ""
}
}