Skip to content

Commit

Permalink
Fix aks region version lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp committed Oct 8, 2024
1 parent 2cc1375 commit 15fc744
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sdk/identity/test-resources-pre.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ param (
[Parameter(ValueFromRemainingArguments = $true)]
$RemainingArguments,

[Parameter()]
[string] $Location = '',

[Parameter(Mandatory = $true)]
[ValidatePattern('^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$')]
[string] $TestApplicationId,
Expand Down Expand Up @@ -54,7 +51,8 @@ Write-Host "Azure CLI version: $az_version"
az cloud set --name $Environment
az login --service-principal -u $TestApplicationId --tenant $TenantId --allow-no-subscriptions --federated-token $env:ARM_OIDC_TOKEN
az account set --subscription $SubscriptionId
$versions = az aks get-versions -l westus -o json | ConvertFrom-Json
$region = if ($Environment -eq 'AzureUSGovernment') { 'usgovvirginia' } elseif ($Environment -eq 'AzureChinaCloud') { 'chinanorth3' } else { 'westus' }
$versions = az aks get-versions -l $region -o json | ConvertFrom-Json
Write-Host "AKS versions: $($versions | ConvertTo-Json -Depth 100)"
$patchVersions = $versions.values | Where-Object { $_.isPreview -eq $null } | Select-Object -ExpandProperty patchVersions
Write-Host "AKS patch versions: $($patchVersions | ConvertTo-Json -Depth 100)"
Expand Down

0 comments on commit 15fc744

Please sign in to comment.