Skip to content

Commit

Permalink
Reenable ability to deploy with private networking
Browse files Browse the repository at this point in the history
  • Loading branch information
BMurri committed Aug 22, 2024
1 parent ac770fa commit 45b68d9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/deploy-cromwell-on-azure/Deployer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,11 @@ await Execute("Validating existing Azure resources...", async () =>

ConsoleEx.WriteLine($"Deploying Cromwell on Azure version {targetVersion}...");

if (!string.IsNullOrEmpty(configuration.BatchNodesSubnetId))
{
configuration.BatchSubnetName = new ResourceIdentifier(configuration.BatchNodesSubnetId).Name;
}

var vnetAndSubnet = await ValidateAndGetExistingVirtualNetworkAsync();

if (string.IsNullOrWhiteSpace(configuration.ResourceGroupName))
Expand Down Expand Up @@ -514,11 +519,6 @@ await Task.WhenAll(
configuration.BatchSubnetName = string.IsNullOrEmpty(configuration.BatchSubnetName) ? configuration.DefaultBatchSubnetName : configuration.BatchSubnetName;
configuration.VmSubnetName = string.IsNullOrEmpty(configuration.VmSubnetName) ? configuration.DefaultVmSubnetName : configuration.VmSubnetName;
vnetAndSubnet = await CreateVnetAndSubnetsAsync();
if (string.IsNullOrEmpty(this.configuration.BatchNodesSubnetId))
{
this.configuration.BatchNodesSubnetId = vnetAndSubnet.Value.batchSubnet.Id;
}
}
}),
Task.Run(async () =>
Expand Down Expand Up @@ -598,6 +598,11 @@ await Task.WhenAll(
})
]);

if (string.IsNullOrEmpty(this.configuration.BatchNodesSubnetId))
{
configuration.BatchNodesSubnetId = vnetAndSubnet.Value.batchSubnet.Id;
}

var clientId = managedIdentity.Data.ClientId;
var settings = ConfigureSettings(clientId?.ToString("D"));

Expand Down

0 comments on commit 45b68d9

Please sign in to comment.