Skip to content

Commit 2df038e

Browse files
authored
Reenable ability to deploy with private networking (#774)
1 parent 076d7d8 commit 2df038e

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/deploy-tes-on-azure/Deployer.cs

+10-5
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,11 @@ await Execute("Validating existing Azure resources...", async () =>
494494

495495
ConsoleEx.WriteLine($"Deploying TES on Azure version {targetVersion}...");
496496

497+
if (!string.IsNullOrEmpty(configuration.BatchNodesSubnetId))
498+
{
499+
configuration.BatchSubnetName = new ResourceIdentifier(configuration.BatchNodesSubnetId).Name;
500+
}
501+
497502
var vnetAndSubnet = await ValidateAndGetExistingVirtualNetworkAsync();
498503

499504
if (string.IsNullOrWhiteSpace(configuration.ResourceGroupName))
@@ -538,11 +543,6 @@ await Task.WhenAll(
538543
configuration.BatchSubnetName = string.IsNullOrEmpty(configuration.BatchSubnetName) ? configuration.DefaultBatchSubnetName : configuration.BatchSubnetName;
539544
configuration.VmSubnetName = string.IsNullOrEmpty(configuration.VmSubnetName) ? configuration.DefaultVmSubnetName : configuration.VmSubnetName;
540545
vnetAndSubnet = await CreateVnetAndSubnetsAsync();
541-
542-
if (string.IsNullOrEmpty(configuration.BatchNodesSubnetId))
543-
{
544-
configuration.BatchNodesSubnetId = vnetAndSubnet.Value.batchSubnet.Id;
545-
}
546546
}
547547
}),
548548
Task.Run(async () =>
@@ -609,6 +609,11 @@ await Task.WhenAll(
609609
})
610610
]);
611611

612+
if (string.IsNullOrEmpty(configuration.BatchNodesSubnetId))
613+
{
614+
configuration.BatchNodesSubnetId = vnetAndSubnet.Value.batchSubnet.Id;
615+
}
616+
612617
var clientId = managedIdentity.Data.ClientId;
613618
var settings = ConfigureSettings(clientId?.ToString("D"));
614619

0 commit comments

Comments
 (0)