Skip to content

Commit 6a03758

Browse files
Replaced hardcoded location
1 parent 89f0833 commit 6a03758

File tree

2 files changed

+74917
-26496
lines changed

2 files changed

+74917
-26496
lines changed

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineScaleSetTests.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,11 +867,15 @@ function Test-VirtualMachineScaleSetNetworking
867867
$rgname = Get-ComputeTestResourceName
868868
$ipName = Get-ComputeTestResourceName
869869
$nsgName = Get-ComputeTestResourceName
870+
$namespace = "Microsoft.Compute";
871+
$type = "virtualMachineScaleSets/publicIPAddresses";
872+
$location = Get-AzureRmResourceProvider -ProviderNamespace $namespace | where {$_.ResourceTypes[0].ResourceTypeName -eq $type};
873+
$loc = "";
874+
if($location) { $loc = $location.Locations[0] } else { $loc = "southeastasia" };
870875

871876
try
872877
{
873878
# Common
874-
$loc = 'southeastasia';
875879
New-AzureRMResourceGroup -Name $rgname -Location $loc -Force;
876880

877881
# SRP

0 commit comments

Comments
 (0)