Sad Tux - Windows bias detected
This page contains Windows bias

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

Detected Bias Types
windows_first
powershell_heavy
windows_tools
Summary
The documentation provides both Bash (Azure CLI) and PowerShell examples throughout, but there is a notable emphasis on PowerShell, especially in the prerequisites and setup steps. PowerShell commands are given equal or greater prominence than Bash, and Windows-specific tools (Azure PowerShell) are mentioned alongside or even before their Linux equivalents. There are no Linux-specific tools or patterns discussed, and the documentation assumes parity between Bash and PowerShell without addressing platform-specific nuances. No Linux-only examples or troubleshooting are provided, and some steps (e.g., Bicep installation) are more detailed for PowerShell/Windows users.
Recommendations
  • Ensure that Bash/Azure CLI examples are always presented first, as Bash is more universally available across platforms.
  • Add explicit notes about platform differences, such as file path conventions, environment variable syntax, and installation steps for Linux/macOS users.
  • Include troubleshooting tips or common issues for Linux environments (e.g., permissions, dependency installation).
  • Provide links to Linux/macOS-specific installation guides where appropriate.
  • Where PowerShell is mentioned, clarify that it is available cross-platform, but also highlight any differences in behavior or prerequisites on Linux/macOS.
  • Consider adding a section or appendix specifically for Linux/macOS users to address any unique considerations.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2025-07-12 23:44 #41 cancelled Biased Biased
2025-07-12 00:58 #8 cancelled Clean Clean
2025-07-10 05:06 #7 processing Clean Clean

Flagged Code Snippets

$params = @{
  environmentName = $ContainerAppsEnvironment
  logAnalyticsWorkspaceName = $LogAnalyticsWorkspaceName
  appInsightsName = $AppInsightsName
  containerAppName = $ContainerAppName
  azureContainerRegistry = $RegistryName
  azureContainerRegistryImage = $ImageName
  azureContainerRegistryImageTag = $ImageTag
  azureContainerName = $ContainerName
  acrPullDefinitionId = $AcrPullDefinitionId
  userAssignedIdentityName = $UserAssignedIdentityName
  location = $Location
}

New-AzResourceGroupDeployment `
  -ResourceGroupName $ResourceGroupName `
  -TemplateParameterObject $params `
  -TemplateFile $BicepTemplate `
  -SkipTemplateParameterPrompt
New-AzResourceGroup -Location $Location -Name $ResourceGroupName
$IdentityId = (Get-AzUserAssignedIdentity -Name $IdentityName -ResourceGroupName $ResourceGroupName).Id
$PrincipalId = (Get-AzUserAssignedIdentity -Name $IdentityName -ResourceGroupName $ResourceGroupName).PrincipalId
$WorkspaceArgs = @{
    Name = 'myworkspace'
    ResourceGroupName = $ResourceGroupName
    Location = $Location
    PublicNetworkAccessForIngestion = 'Enabled'
    PublicNetworkAccessForQuery = 'Enabled'
}
New-AzOperationalInsightsWorkspace @WorkspaceArgs
$WorkspaceId = (Get-AzOperationalInsightsWorkspace -ResourceGroupName $ResourceGroupName -Name $WorkspaceArgs.Name).CustomerId
$WorkspaceSharedKey = (Get-AzOperationalInsightsWorkspaceSharedKey -ResourceGroupName $ResourceGroupName -Name $WorkspaceArgs.Name).PrimarySharedKey
$EnvArgs = @{
    EnvName = $ContainerAppsEnvironment
    ResourceGroupName = $ResourceGroupName
    Location = $Location
    AppLogConfigurationDestination = 'log-analytics'
    LogAnalyticConfigurationCustomerId = $WorkspaceId
    LogAnalyticConfigurationSharedKey = $WorkspaceSharedKey
}

New-AzContainerAppManagedEnv @EnvArgs
$IdentityName = '<YOUR_IDENTITY_NAME>'
New-AzUserAssignedIdentity -Name $IdentityName -ResourceGroupName $ResourceGroupName -Location $Location
$RegistryId = (Get-AzContainerRegistry -ResourceGroupName <RegistryResourceGroup> -Name $RegistryName).Id
New-AzRoleAssignment -ObjectId $PrincipalId -Scope $RegistryId -RoleDefinitionName acrpull
$CredentialArgs = @{
    Server = $RegistryName + '.azurecr.io'
    Identity = $IdentityId
}
$CredentialObject = New-AzContainerAppRegistryCredentialObject @CredentialArgs
$ImageParams = @{
    Name = 'my-container-app'
    Image = $RegistryName + '.azurecr.io/' + $ImageName + ':latest'
}
$TemplateObj = New-AzContainerAppTemplateObject @ImageParams
$EnvId = (Get-AzContainerAppManagedEnv -EnvName $ContainerAppsEnvironment -ResourceGroupName $ResourceGroupName).Id

$AppArgs = @{
    Name = 'my-container-app'
    Location = $Location
    ResourceGroupName = $ResourceGroupName
    ManagedEnvironmentId = $EnvId
    ConfigurationRegistry = $CredentialObject
    UserAssignedIdentity = @($IdentityId)
    TemplateContainer = $TemplateObj
    IngressTargetPort = 80
    IngressExternal = $true
}
New-AzContainerApp @AppArgs
Remove-AzResourceGroup -Name $ResourceGroupName -Force
$ImageParams = @{
    Name = "my-container-app"
    Image = "mcr.microsoft.com/k8se/quickstart:latest"
}
$TemplateObj = New-AzContainerAppTemplateObject @ImageParams
$EnvId = (Get-AzContainerAppManagedEnv -EnvName $ContainerAppsEnvironment -ResourceGroupName $ResourceGroupName).Id

$AppArgs = @{
    Name = "my-container-app"
    Location = $Location
    ResourceGroupName = $ResourceGroupName
    ManagedEnvironmentId = $EnvId
    IdentityType = "SystemAssigned"
    TemplateContainer = $TemplateObj
    IngressTargetPort = 80
    IngressExternal = $true

}
New-AzContainerApp @AppArgs
$CredentialArgs = @{
    Server = $RegistryName + '.azurecr.io'
    Identity = 'system'
}
$CredentialObject = New-AzContainerAppRegistryCredentialObject @CredentialArgs
$ImageParams = @{
    Name = 'my-container-app'
    Image = $RegistryName + ".azurecr.io/" + $ImageName + ":latest"
}
$TemplateObj = New-AzContainerAppTemplateObject @ImageParams

$AppArgs = @{
    Name = 'my-container-app'
    Location = $Location
    ResourceGroupName = $ResourceGroupName
    ConfigurationRegistry = $CredentialObject
    IdentityType = 'SystemAssigned'
    TemplateContainer = $TemplateObj
    IngressTargetPort = 80
    IngressExternal = $true
}
Update-AzContainerApp @AppArgs
Remove-AzResourceGroup -Name $ResourceGroupName -Force
$ResourceGroupName = '<RESOURCE_GROUP_NAME>'
$Location = '<LOCATION>'
$RegistryName = '<REGISTRY_NAME>'
$ImageName = '<IMAGE_NAME>'
$ImageTag = '<IMAGE_TAG>'
$BicepTemplate = '<BICEP_TEMPLATE>'
$ContainerAppsEnvironment = '<ENVIRONMENT_NAME>'
$ContainerName = '<CONTAINER_NAME>'
$ContainerAppName = '<CONTAINERAPP_NAME>'
$UserAssignedIdentityName = '<USER_ASSIGNED_IDENTITY_NAME>'
$LogAnalyticsWorkspaceName = '<LOG_ANALYTICS_WORKSPACE_NAME>'
$AppInsightsName = '<LOG_ANALYTICS_WORKSPACE_NAME>'
$AcrPullDefinitionId = '7f951dda-4ed3-4680-a7ca-43fe172d538d'