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
powershell_heavy
windows_first
missing_linux_example
Summary
The documentation page demonstrates a strong Windows bias by providing only PowerShell-based automation and CLI examples, with no equivalent Bash or Linux shell scripts. All code snippets and instructions are tailored for PowerShell users, implicitly prioritizing Windows environments. There is no mention of Linux or cross-platform scripting alternatives, which may hinder accessibility for Linux or macOS administrators.
Recommendations
  • Provide equivalent Bash shell scripts for all PowerShell examples, ensuring Linux and macOS users can follow the same automation steps.
  • Explicitly mention that the Azure CLI commands can be run from any platform, and show cross-platform command-line usage.
  • Where PowerShell-specific syntax is used (such as environment variable assignment or error handling), offer a Linux/Bash alternative.
  • Include a note or section on platform compatibility, clarifying that both Windows and Linux are supported and providing links to relevant setup guides for each.
  • Review tool recommendations (e.g., Azure Data Studio, Azure CLI) to ensure installation and usage instructions are not Windows-centric.
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

. "./CreateArcEnabledAksOnEZ"

function CreateManagedSqlOnArcEnabledAksEz {
    param(
        [string] $ManagedInstanceName,
        [string] $dbname,
        [string] $SubscriptionId,
        [string] $AKSClusterResourceGroupName,
        [string] $location = "westus",
        [string] $AKSName,
        [string] $edgeZone,
        [int] $nodeCount = 2,
        [string] $vmSize = "standard_nv12ads_a10_v5",
        [string] $ArcResourceGroupName,
        [string] $DataControllerName,
        [string] $CustomLocationName,
        [string] $Namespace,
        [string] $DataControllerConfigProfile,
        [string] $KeyVaultName,
        [string] $VaultSecretUser,
        [string] $VaultSecretPass,
        [switch] $Debug
    )

    try {
        # Set the subscription
        az account set --subscription $SubscriptionId

        # Create the ARC-enabled EZ AKS cluster
        createArcEnabledAksOnEz -SubscriptionId $SubscriptionId -AKSClusterResourceGroupName $AKSClusterResourceGroupName -location $location -AKSName $AKSName -edgeZone $edgeZone -nodeCount $nodeCount -vmSize $vmSize -ArcResourceGroupName $ArcResourceGroupName -Debug:$Debug
        
        # Define name of the connected cluster resource
        $CLUSTER_NAME = "$ArcResourceGroupName-cluster"

        # Create a key vault and store login
        $AZDATA_USERNAME = az keyvault secret show --vault-name $KeyVaultName --name $VaultSecretUser --query value -o tsv
        $AZDATA_PASSWORD = az keyvault secret show --vault-name $KeyVaultName --name $VaultSecretPass --query value -o tsv
        
        # Define login for data controller and metrics
        $ENV:AZDATA_LOGSUI_USERNAME = $AZDATA_USERNAME
        $ENV:AZDATA_LOGSUI_PASSWORD = $AZDATA_PASSWORD
        $ENV:AZDATA_METRICSUI_USERNAME = $AZDATA_USERNAME
        $ENV:AZDATA_METRICSUI_PASSWORD = $AZDATA_PASSWORD

        # Define the connected cluster and extension for the custom location
        $CONNECTED_CLUSTER_ID=$(az connectedk8s show --resource-group $ArcResourceGroupName --name $CLUSTER_NAME --query id --output tsv)
        $EXTENSION_ID=$(az k8s-extension show `
        --cluster-type connectedClusters `
        --name 'my-data-controller-custom-location-ext' `
        --cluster-name $CLUSTER_NAME `
        --resource-group $ArcResourceGroupName `
        --query id `
        --output tsv)

        # Create a custom location for the data controller
        Write-Output "Creating data controller custom location..."
        az customlocation create `
        --resource-group $ArcResourceGroupName `
        --name $CustomLocationName `
        --host-resource-id $CONNECTED_CLUSTER_ID `
        --namespace $Namespace `
        --cluster-extension-ids $EXTENSION_ID

        # Create data controller on Arc-enabled AKS cluster
        Write-Output "Creating Arc Data Controller..."
        az arcdata dc create --name $DataControllerName --subscription $SubscriptionId --cluster-name $CLUSTER_NAME --resource-group $ArcResourceGroupName --connectivity-mode direct --custom-location $CustomLocationName --profile-name $DataControllerConfigProfile

        # Create a managed instance in the custom location
        Write-Output "Creating managed instance..."
        az sql mi-arc create --name $ManagedInstanceName --resource-group $ArcResourceGroupName --custom-location $CustomLocationName 
    }
    catch {
        # Catch any error
        Write-Error "An error occurred"
        Write-Error $Error[0]
    }

}

CreateManagedSqlOnArcEnabledAksEz -ManagedInstanceName "my-managed-instance" `
                        -dbname "myDB" `
                        -SubscriptionId "<your subscription>" `
                        -AKSClusterResourceGroupName "my-aks-cluster-group" `
                        -location "westus" `
                        -AKSName "my-aks-cluster" `
                        -edgeZone "losangeles" `
                        -nodeCount 2 `
                        -vmSize "standard_nv12ad-DataControllerConfigProfiles_a10_v5" `
                        -ArcResourceGroupName "myArcResourceGroup" `
                        -DataControllerName "myDataController" `
                        -CustomLocationName "dc-custom-location" `
                        -Namespace "my-data-controller-custom-location" `
                        -DataControllerConfigProfile "azure-arc-aks-premium-storage" `
                        -KeyVaultName "ezDataControllerConfig" `
                        -VaultSecretUser "AZDATA-USERNAME" `
                        -VaultSecretPass "AZDATA-PASSWORD"