From 4f11c1cde0a4dfe4609657e77f1c656e65a64dd8 Mon Sep 17 00:00:00 2001 From: alicia-td <166751279+alicia-td@users.noreply.github.com> Date: Thu, 18 Jul 2024 10:21:28 -0700 Subject: [PATCH] fix: pass vault as unique name and send as output --- .../ai-unlimited-without-lb.bicep | 55 +++++++++---------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/deployments/azure/templates/bicep/ai-unlimited/ai-unlimited-without-lb.bicep b/deployments/azure/templates/bicep/ai-unlimited/ai-unlimited-without-lb.bicep index 1fbb748..8c8ec60 100644 --- a/deployments/azure/templates/bicep/ai-unlimited/ai-unlimited-without-lb.bicep +++ b/deployments/azure/templates/bicep/ai-unlimited/ai-unlimited-without-lb.bicep @@ -88,34 +88,28 @@ var registry = 'teradata' var workspaceRepository = 'ai-unlimited-workspaces' var workspaceSchedulerRepository = 'ai-unlimited-scheduler' -var cloudInitData = base64( - format( - loadTextContent('../../../scripts/ai-unlimited.cloudinit.yaml'), - base64( - format( - loadTextContent('../../../scripts/ai-unlimited.service'), - registry, - workspaceRepository, - AiUnlimitedVersion, - AiUnlimitedHttpPort, - AiUnlimitedGrpcPort, - subscription().subscriptionId, - subscription().tenantId, - '--network-alias ai-unlimited' - ) - ), - base64( - format( - loadTextContent('../../../scripts/ai-unlimited-scheduler.service'), - registry, - workspaceSchedulerRepository, - AiUnlimitedSchedulerVersion, - // AiUnlimitedSchedulerGrpcPort, - AiUnlimitedSchedulerHttpPort - ) - ) - ) -) +var cloudInitData = base64(format( + loadTextContent('../../../scripts/ai-unlimited.cloudinit.yaml'), + base64(format( + loadTextContent('../../../scripts/ai-unlimited.service'), + registry, + workspaceRepository, + AiUnlimitedVersion, + AiUnlimitedHttpPort, + AiUnlimitedGrpcPort, + subscription().subscriptionId, + subscription().tenantId, + '--network-alias ai-unlimited' + )), + base64(format( + loadTextContent('../../../scripts/ai-unlimited-scheduler.service'), + registry, + workspaceSchedulerRepository, + AiUnlimitedSchedulerVersion, + // AiUnlimitedSchedulerGrpcPort, + AiUnlimitedSchedulerHttpPort + )) +)) resource rg 'Microsoft.Resources/resourceGroups@2022-09-01' existing = { name: ResourceGroupName @@ -146,7 +140,7 @@ module vaultAccessPolicy '../modules/vault/access-policy.bicep' = if (UseKeyVaul scope: rg name: 'vault-access-policy' params: { - vaultName: AiUnlimitedName + vaultName: vault.outputs.name accessPolicy: { tenantId: subscription().tenantId objectId: aiUnlimited.outputs.PrincipleId @@ -231,4 +225,5 @@ output AiUnlimitedPrivateHttpAccess string = 'http://${aiUnlimited.outputs.Priva output AiUnlimitedPublicGrpcAccess string = 'http://${aiUnlimited.outputs.PublicIP}:${AiUnlimitedGrpcPort}' output AiUnlimitedPrivateGrpcAccess string = 'http://${aiUnlimited.outputs.PrivateIP}:${AiUnlimitedGrpcPort}' output sshCommand string = 'ssh azureuser@${aiUnlimited.outputs.PublicIP}' -output SecurityGroup string = firewall.outputs.Id +output KeyVaultName string = (UseKeyVault == 'New') ? vault.outputs.name : '' +output NetworkSecurityGroupId string = firewall.outputs.Id