diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..68dc843 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,162 @@ +# Include any files or directories that you don't want to be copied to your +# container here (e.g., local build artifacts, temporary files, etc.). +# +# For more help, visit the .dockerignore file reference guide at +# https://docs.docker.com/engine/reference/builder/#dockerignore-file + +**/.DS_Store +**/__pycache__ +**/.venv +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/bin +**/charts +**/docker-compose* +**/compose* +**/Dockerfile* +**/*.Dockerfile +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.log + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# VS Code +.vscode/ + +# Ignore other unnecessary files +*.bak +*.swp +.DS_Store +*.pdb +*.sqlite3 diff --git a/infra/abbreviations.json b/infra/abbreviations.json index 1533dee..93b9565 100644 --- a/infra/abbreviations.json +++ b/infra/abbreviations.json @@ -1,136 +1,227 @@ { - "analysisServicesServers": "as", - "apiManagementService": "apim-", - "appConfigurationStores": "appcs-", - "appManagedEnvironments": "cae-", - "appContainerApps": "ca-", - "authorizationPolicyDefinitions": "policy-", - "automationAutomationAccounts": "aa-", - "blueprintBlueprints": "bp-", - "blueprintBlueprintsArtifacts": "bpa-", - "cacheRedis": "redis-", - "cdnProfiles": "cdnp-", - "cdnProfilesEndpoints": "cdne-", - "cognitiveServicesAccounts": "cog-", - "cognitiveServicesFormRecognizer": "cog-fr-", - "cognitiveServicesTextAnalytics": "cog-ta-", - "computeAvailabilitySets": "avail-", - "computeCloudServices": "cld-", - "computeDiskEncryptionSets": "des", - "computeDisks": "disk", - "computeDisksOs": "osdisk", - "computeGalleries": "gal", - "computeSnapshots": "snap-", - "computeVirtualMachines": "vm", - "computeVirtualMachineScaleSets": "vmss-", - "containerInstanceContainerGroups": "ci", - "containerRegistryRegistries": "cr", - "containerServiceManagedClusters": "aks-", - "databricksWorkspaces": "dbw-", - "dataFactoryFactories": "adf-", - "dataLakeAnalyticsAccounts": "dla", - "dataLakeStoreAccounts": "dls", - "dataMigrationServices": "dms-", - "dBforMySQLServers": "mysql-", - "dBforPostgreSQLServers": "psql-", - "devicesIotHubs": "iot-", - "devicesProvisioningServices": "provs-", - "devicesProvisioningServicesCertificates": "pcert-", - "documentDBDatabaseAccounts": "cosmos-", - "documentDBMongoDatabaseAccounts": "cosmon-", - "eventGridDomains": "evgd-", - "eventGridDomainsTopics": "evgt-", - "eventGridEventSubscriptions": "evgs-", - "eventHubNamespaces": "evhns-", - "eventHubNamespacesEventHubs": "evh-", - "hdInsightClustersHadoop": "hadoop-", - "hdInsightClustersHbase": "hbase-", - "hdInsightClustersKafka": "kafka-", - "hdInsightClustersMl": "mls-", - "hdInsightClustersSpark": "spark-", - "hdInsightClustersStorm": "storm-", - "hybridComputeMachines": "arcs-", - "insightsActionGroups": "ag-", - "insightsComponents": "appi-", - "keyVaultVaults": "kv-", - "kubernetesConnectedClusters": "arck", - "kustoClusters": "dec", - "kustoClustersDatabases": "dedb", - "logicIntegrationAccounts": "ia-", - "logicWorkflows": "logic-", - "machineLearningServicesWorkspaces": "mlw-", - "managedIdentityUserAssignedIdentities": "id-", - "managementManagementGroups": "mg-", - "migrateAssessmentProjects": "migr-", - "networkApplicationGateways": "agw-", - "networkApplicationSecurityGroups": "asg-", - "networkAzureFirewalls": "afw-", - "networkBastionHosts": "bas-", - "networkConnections": "con-", - "networkDnsZones": "dnsz-", - "networkExpressRouteCircuits": "erc-", - "networkFirewallPolicies": "afwp-", - "networkFirewallPoliciesWebApplication": "waf", - "networkFirewallPoliciesRuleGroups": "wafrg", - "networkFrontDoors": "fd-", - "networkFrontdoorWebApplicationFirewallPolicies": "fdfp-", - "networkLoadBalancersExternal": "lbe-", - "networkLoadBalancersInternal": "lbi-", - "networkLoadBalancersInboundNatRules": "rule-", - "networkLocalNetworkGateways": "lgw-", - "networkNatGateways": "ng-", - "networkNetworkInterfaces": "nic-", - "networkNetworkSecurityGroups": "nsg-", - "networkNetworkSecurityGroupsSecurityRules": "nsgsr-", - "networkNetworkWatchers": "nw-", - "networkPrivateDnsZones": "pdnsz-", - "networkPrivateLinkServices": "pl-", - "networkPublicIPAddresses": "pip-", - "networkPublicIPPrefixes": "ippre-", - "networkRouteFilters": "rf-", - "networkRouteTables": "rt-", - "networkRouteTablesRoutes": "udr-", - "networkTrafficManagerProfiles": "traf-", - "networkVirtualNetworkGateways": "vgw-", - "networkVirtualNetworks": "vnet-", - "networkVirtualNetworksSubnets": "snet-", - "networkVirtualNetworksVirtualNetworkPeerings": "peer-", - "networkVirtualWans": "vwan-", - "networkVpnGateways": "vpng-", - "networkVpnGatewaysVpnConnections": "vcn-", - "networkVpnGatewaysVpnSites": "vst-", - "notificationHubsNamespaces": "ntfns-", - "notificationHubsNamespacesNotificationHubs": "ntf-", - "operationalInsightsWorkspaces": "log-", - "portalDashboards": "dash-", - "powerBIDedicatedCapacities": "pbi-", - "purviewAccounts": "pview-", - "recoveryServicesVaults": "rsv-", - "resourcesResourceGroups": "rg-", - "searchSearchServices": "srch-", - "serviceBusNamespaces": "sb-", - "serviceBusNamespacesQueues": "sbq-", - "serviceBusNamespacesTopics": "sbt-", - "serviceEndPointPolicies": "se-", - "serviceFabricClusters": "sf-", - "signalRServiceSignalR": "sigr", - "sqlManagedInstances": "sqlmi-", - "sqlServers": "sql-", - "sqlServersDataWarehouse": "sqldw-", - "sqlServersDatabases": "sqldb-", - "sqlServersDatabasesStretch": "sqlstrdb-", - "storageStorageAccounts": "st", - "storageStorageAccountsVm": "stvm", - "storSimpleManagers": "ssimp", - "streamAnalyticsCluster": "asa-", - "synapseWorkspaces": "syn", - "synapseWorkspacesAnalyticsWorkspaces": "synw", - "synapseWorkspacesSqlPoolsDedicated": "syndp", - "synapseWorkspacesSqlPoolsSpark": "synsp", - "timeSeriesInsightsEnvironments": "tsi-", - "webServerFarms": "plan-", - "webSitesAppService": "app-", - "webSitesAppServiceEnvironment": "ase-", - "webSitesFunctions": "func-", - "webStaticSites": "stapp-" -} + "ai": { + "aiSearch": "srch-", + "aiServices": "aisa-", + "aiVideoIndexer": "avi-", + "machineLearningWorkspace": "mlw-", + "openAIService": "oai-", + "botService": "bot-", + "computerVision": "cv-", + "contentModerator": "cm-", + "contentSafety": "cs-", + "customVisionPrediction": "cstv-", + "customVisionTraining": "cstvt-", + "documentIntelligence": "di-", + "faceApi": "face-", + "healthInsights": "hi-", + "immersiveReader": "ir-", + "languageService": "lang-", + "speechService": "spch-", + "translator": "trsl-", + "aiHub": "aih-", + "aiHubProject": "aihp-" + }, + "analytics": { + "analysisServicesServer": "as", + "databricksWorkspace": "dbw-", + "dataExplorerCluster": "dec", + "dataExplorerClusterDatabase": "dedb", + "dataFactory": "adf-", + "digitalTwin": "dt-", + "streamAnalytics": "asa-", + "synapseAnalyticsPrivateLinkHub": "synplh-", + "synapseAnalyticsSQLDedicatedPool": "syndp", + "synapseAnalyticsSparkPool": "synsp", + "synapseAnalyticsWorkspaces": "synw", + "dataLakeStoreAccount": "dls", + "dataLakeAnalyticsAccount": "dla", + "eventHubsNamespace": "evhns-", + "eventHub": "evh-", + "eventGridDomain": "evgd-", + "eventGridSubscriptions": "evgs-", + "eventGridTopic": "evgt-", + "eventGridSystemTopic": "egst-", + "hdInsightHadoopCluster": "hadoop-", + "hdInsightHBaseCluster": "hbase-", + "hdInsightKafkaCluster": "kafka-", + "hdInsightSparkCluster": "spark-", + "hdInsightStormCluster": "storm-", + "hdInsightMLServicesCluster": "mls-", + "iotHub": "iot-", + "provisioningServices": "provs-", + "provisioningServicesCertificate": "pcert-", + "powerBIEmbedded": "pbi-", + "timeSeriesInsightsEnvironment": "tsi-" + }, + "compute": { + "appServiceEnvironment": "ase-", + "appServicePlan": "asp-", + "loadTesting": "lt-", + "availabilitySet": "avail-", + "arcEnabledServer": "arcs-", + "arcEnabledKubernetesCluster": "arck", + "batchAccounts": "ba-", + "cloudService": "cld-", + "communicationServices": "acs-", + "diskEncryptionSet": "des", + "functionApp": "func-", + "gallery": "gal", + "hostingEnvironment": "host-", + "imageTemplate": "it-", + "managedDiskOS": "osdisk", + "managedDiskData": "disk", + "notificationHubs": "ntf-", + "notificationHubsNamespace": "ntfns-", + "proximityPlacementGroup": "ppg-", + "restorePointCollection": "rpc-", + "snapshot": "snap-", + "staticWebApp": "stapp-", + "virtualMachine": "vm", + "virtualMachineScaleSet": "vmss-", + "virtualMachineMaintenanceConfiguration": "mc-", + "virtualMachineStorageAccount": "stvm", + "webApp": "app-" + }, + "containers": { + "aksCluster": "aks-", + "aksSystemNodePool": "npsystem-", + "aksUserNodePool": "np-", + "containerApp": "ca-", + "containerAppsEnvironment": "cae-", + "containerRegistry": "cr", + "containerInstance": "ci", + "serviceFabricCluster": "sf-", + "serviceFabricManagedCluster": "sfmc-" + }, + "databases": { + "cosmosDBDatabase": "cosmos-", + "cosmosDBApacheCassandra": "coscas-", + "cosmosDBMongoDB": "cosmon-", + "cosmosDBNoSQL": "cosno-", + "cosmosDBTable": "costab-", + "cosmosDBGremlin": "cosgrm-", + "cosmosDBPostgreSQL": "cospos-", + "cacheForRedis": "redis-", + "sqlDatabaseServer": "sql-", + "sqlDatabase": "sqldb-", + "sqlElasticJobAgent": "sqlja-", + "sqlElasticPool": "sqlep-", + "mariaDBServer": "maria-", + "mariaDBDatabase": "mariadb-", + "mySQLDatabase": "mysql-", + "postgreSQLDatabase": "psql-", + "sqlServerStretchDatabase": "sqlstrdb-", + "sqlManagedInstance": "sqlmi-" + }, + "developerTools": { + "appConfigurationStore": "appcs-", + "mapsAccount": "map-", + "signalR": "sigr", + "webPubSub": "wps-" + }, + "devOps": { + "managedGrafana": "amg-" + }, + "integration": { + "apiManagementService": "apim-", + "integrationAccount": "ia-", + "logicApp": "logic-", + "serviceBusNamespace": "sbns-", + "serviceBusQueue": "sbq-", + "serviceBusTopic": "sbt-", + "serviceBusTopicSubscription": "sbts-" + }, + "managementGovernance": { + "automationAccount": "aa-", + "applicationInsights": "appi-", + "monitorActionGroup": "ag-", + "monitorDataCollectionRules": "dcr-", + "monitorAlertProcessingRule": "apr-", + "blueprint": "bp-", + "blueprintAssignment": "bpa-", + "dataCollectionEndpoint": "dce-", + "logAnalyticsWorkspace": "log-", + "logAnalyticsQueryPacks": "pack-", + "managementGroup": "mg-", + "purviewInstance": "pview-", + "resourceGroup": "rg-", + "templateSpecsName": "ts-" + }, + "migration": { + "migrateProject": "migr-", + "databaseMigrationService": "dms-", + "recoveryServicesVault": "rsv-" + }, + "networking": { + "applicationGateway": "agw-", + "applicationSecurityGroup": "asg-", + "cdnProfile": "cdnp-", + "cdnEndpoint": "cdne-", + "connections": "con-", + "dnsForwardingRuleset": "dnsfrs-", + "dnsPrivateResolver": "dnspr-", + "dnsPrivateResolverInboundEndpoint": "in-", + "dnsPrivateResolverOutboundEndpoint": "out-", + "firewall": "afw-", + "firewallPolicy": "afwp-", + "expressRouteCircuit": "erc-", + "expressRouteGateway": "ergw-", + "frontDoorProfile": "afd-", + "frontDoorEndpoint": "fde-", + "frontDoorFirewallPolicy": "fdfp-", + "ipGroups": "ipg-", + "loadBalancerInternal": "lbi-", + "loadBalancerExternal": "lbe-", + "loadBalancerRule": "rule-", + "localNetworkGateway": "lgw-", + "natGateway": "ng-", + "networkInterface": "nic-", + "networkSecurityGroup": "nsg-", + "networkSecurityGroupSecurityRules": "nsgsr-", + "networkWatcher": "nw-", + "privateLink": "pl-", + "privateEndpoint": "pep-", + "publicIPAddress": "pip-", + "publicIPAddressPrefix": "ippre-", + "routeFilter": "rf-", + "routeServer": "rtserv-", + "routeTable": "rt-", + "serviceEndpointPolicy": "se-", + "trafficManagerProfile": "traf-", + "userDefinedRoute": "udr-", + "virtualNetwork": "vnet-", + "virtualNetworkGateway": "vgw-", + "virtualNetworkManager": "vnm-", + "virtualNetworkPeering": "peer-", + "virtualNetworkSubnet": "snet-", + "virtualWAN": "vwan-", + "virtualWANHub": "vhub-" + }, + "security": { + "bastion": "bas-", + "keyVault": "kv-", + "keyVaultManagedHSM": "kvmhsm-", + "managedIdentity": "id-", + "sshKey": "sshkey-", + "vpnGateway": "vpng-", + "vpnConnection": "vcn-", + "vpnSite": "vst-", + "webApplicationFirewallPolicy": "waf", + "webApplicationFirewallPolicyRuleGroup": "wafrg" + }, + "storage": { + "storSimple": "ssimp", + "backupVault": "bvault-", + "backupVaultPolicy": "bkpol-", + "fileShare": "share-", + "storageAccount": "st", + "storageSyncService": "sss-" + }, + "virtualDesktop": { + "labServicesPlan": "lp-", + "virtualDesktopHostPool": "vdpool-", + "virtualDesktopApplicationGroup": "vdag-", + "virtualDesktopWorkspace": "vdws-", + "virtualDesktopScalingPlan": "vdscaling-" + } + } \ No newline at end of file diff --git a/infra/deploy_ai_foundry.bicep b/infra/deploy_ai_foundry.bicep index 2dde9b1..11f49e5 100644 --- a/infra/deploy_ai_foundry.bicep +++ b/infra/deploy_ai_foundry.bicep @@ -11,20 +11,21 @@ param managedIdentityObjectId string param aiServicesEndpoint string param aiServicesKey string param aiServicesId string +var abbrs = loadJsonContent('./abbreviations.json') -param storageName string = '${solutionName}hubst' +var storageName = '${abbrs.storage.storageAccount}${solutionName}' var storageSkuName = 'Standard_LRS' -var aiServicesName = '${solutionName}-ais' -var workspaceName = '${solutionName}-log' -var keyvaultName = '${solutionName}-kv' +var aiServicesName = '${abbrs.ai.aiServices}${solutionName}' +var workspaceName = '${abbrs.managementGovernance.logAnalyticsWorkspace}${solutionName}' +var keyvaultName = '${abbrs.security.keyVault}${solutionName}' var location = solutionLocation -var azureAiHubName = '${solutionName}-hub' +var azureAiHubName = '${abbrs.ai.aiHub}${solutionName}' var aiHubFriendlyName = azureAiHubName var aiHubDescription = 'AI Hub for KM template' -var aiProjectName = '${solutionName}-prj' +var aiProjectName = '${abbrs.ai.aiHubProject}${solutionName}' var aiProjectFriendlyName = aiProjectName -var aiSearchName = '${solutionName}-srch' +var aiSearchName = '${abbrs.ai.aiSearch}${solutionName}' resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = { diff --git a/infra/deploy_keyvault.bicep b/infra/deploy_keyvault.bicep index ac8102d..a10a9af 100644 --- a/infra/deploy_keyvault.bicep +++ b/infra/deploy_keyvault.bicep @@ -5,7 +5,7 @@ param solutionName string param solutionLocation string param managedIdentityObjectId string -var keyvaultName = '${solutionName}-kv' +param keyvaultName string resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { name: keyvaultName diff --git a/infra/deploy_managed_identity.bicep b/infra/deploy_managed_identity.bicep index e01e466..6e0b9dc 100644 --- a/infra/deploy_managed_identity.bicep +++ b/infra/deploy_managed_identity.bicep @@ -10,7 +10,9 @@ param solutionName string param solutionLocation string @description('Name') -param miName string = '${ solutionName }-id' + +param miName string + resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = { name: miName diff --git a/infra/main.bicep b/infra/main.bicep index 7c3a3fb..51977ce 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -1,7 +1,7 @@ @minLength(3) @description('Prefix for all resources created by this template. This should be 3-20 characters long. If your provide a prefix longer than 20 characters, it will be truncated to 20 characters.') param Prefix string - +var abbrs = loadJsonContent('./abbreviations.json') var safePrefix = length(Prefix) > 20 ? substring(Prefix, 0, 20) : Prefix @allowed([ @@ -49,7 +49,7 @@ var llmModel = 'gpt-4o' var storageSkuName = 'Standard_LRS' var storageContainerName = replace(replace(replace(replace('${ResourcePrefix}cast', '-', ''), '_', ''), '.', ''),'/', '') var gptModelVersion = '2024-08-06' -var azureAiServicesName = '${ResourcePrefix}-ais' +var azureAiServicesName = '${abbrs.ai.aiServices}${ResourcePrefix}' @@ -102,6 +102,7 @@ resource azureAiServicesDeployments 'Microsoft.CognitiveServices/accounts/deploy module managedIdentityModule 'deploy_managed_identity.bicep' = { name: 'deploy_managed_identity' params: { + miName:'${abbrs.security.managedIdentity}${ResourcePrefix}' solutionName: ResourcePrefix solutionLocation: location } @@ -113,6 +114,7 @@ module managedIdentityModule 'deploy_managed_identity.bicep' = { module kvault 'deploy_keyvault.bicep' = { name: 'deploy_keyvault' params: { + keyvaultName: '${abbrs.security.keyVault}${ResourcePrefix}' solutionName: ResourcePrefix solutionLocation: location managedIdentityObjectId:managedIdentityModule.outputs.managedIdentityOutput.objectId @@ -150,10 +152,10 @@ module containerAppsEnvironment 'br/public:avm/res/app/managed-environment:0.9.1 } module databaseAccount 'br/public:avm/res/document-db/database-account:0.9.0' = { - name: toLower('${ResourcePrefix}cosmos') + name: toLower('${abbrs.databases.cosmosDBDatabase}${ResourcePrefix}databaseAccount') params: { // Required parameters - name: toLower('${ResourcePrefix}cosno') + name: toLower('${abbrs.databases.cosmosDBDatabase}${ResourcePrefix}databaseAccount') // Non-required parameters enableAnalyticalStorage: true location: dblocation @@ -217,7 +219,7 @@ module databaseAccount 'br/public:avm/res/document-db/database-account:0.9.0' = } module containerAppFrontend 'br/public:avm/res/app/container-app:0.13.0' = { - name: toLower('${ResourcePrefix}-Fnt-ca') + name: toLower('${abbrs.containers.containerApp}${ResourcePrefix}containerAppFrontend') params: { managedIdentities: { systemAssigned: true @@ -247,7 +249,7 @@ module containerAppFrontend 'br/public:avm/res/app/container-app:0.13.0' = { scaleMinReplicas: 1 scaleMaxReplicas: 1 environmentResourceId: containerAppsEnvironment.outputs.resourceId - name: toLower('${ResourcePrefix}Fnt') + name: toLower('${abbrs.containers.containerApp}${ResourcePrefix}Frontend') // Non-required parameters location: location } @@ -255,7 +257,7 @@ module containerAppFrontend 'br/public:avm/res/app/container-app:0.13.0' = { resource containerAppBackend 'Microsoft.App/containerApps@2023-05-01' = { - name: toLower('${ResourcePrefix}Bck-ca') + name: toLower('${abbrs.containers.containerApp}${ResourcePrefix}Backend') location: location identity: { type: 'SystemAssigned' @@ -452,7 +454,7 @@ resource containers 'Microsoft.Storage/storageAccounts/blobServices/containers@2 }] resource aiHubProject 'Microsoft.MachineLearningServices/workspaces@2024-01-01-preview' existing = { - name: '${ResourcePrefix}-prj' // aiProjectName must be calculated - available at main start. + name: '${abbrs.ai.aiHubProject}${ResourcePrefix}' // aiProjectName must be calculated - available at main start. } resource aiDeveloper 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = { diff --git a/infra/main.json b/infra/main.json index 759f186..c2344f8 100644 --- a/infra/main.json +++ b/infra/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.35.1.17967", - "templateHash": "18182441225742462111" + "version": "0.33.93.31351", + "templateHash": "16851365929061577011" } }, "parameters": { @@ -53,6 +53,234 @@ } }, "variables": { + "$fxv#0": { + "ai": { + "aiSearch": "srch-", + "aiServices": "aisa-", + "aiVideoIndexer": "avi-", + "machineLearningWorkspace": "mlw-", + "openAIService": "oai-", + "botService": "bot-", + "computerVision": "cv-", + "contentModerator": "cm-", + "contentSafety": "cs-", + "customVisionPrediction": "cstv-", + "customVisionTraining": "cstvt-", + "documentIntelligence": "di-", + "faceApi": "face-", + "healthInsights": "hi-", + "immersiveReader": "ir-", + "languageService": "lang-", + "speechService": "spch-", + "translator": "trsl-", + "aiHub": "aih-", + "aiHubProject": "aihp-" + }, + "analytics": { + "analysisServicesServer": "as", + "databricksWorkspace": "dbw-", + "dataExplorerCluster": "dec", + "dataExplorerClusterDatabase": "dedb", + "dataFactory": "adf-", + "digitalTwin": "dt-", + "streamAnalytics": "asa-", + "synapseAnalyticsPrivateLinkHub": "synplh-", + "synapseAnalyticsSQLDedicatedPool": "syndp", + "synapseAnalyticsSparkPool": "synsp", + "synapseAnalyticsWorkspaces": "synw", + "dataLakeStoreAccount": "dls", + "dataLakeAnalyticsAccount": "dla", + "eventHubsNamespace": "evhns-", + "eventHub": "evh-", + "eventGridDomain": "evgd-", + "eventGridSubscriptions": "evgs-", + "eventGridTopic": "evgt-", + "eventGridSystemTopic": "egst-", + "hdInsightHadoopCluster": "hadoop-", + "hdInsightHBaseCluster": "hbase-", + "hdInsightKafkaCluster": "kafka-", + "hdInsightSparkCluster": "spark-", + "hdInsightStormCluster": "storm-", + "hdInsightMLServicesCluster": "mls-", + "iotHub": "iot-", + "provisioningServices": "provs-", + "provisioningServicesCertificate": "pcert-", + "powerBIEmbedded": "pbi-", + "timeSeriesInsightsEnvironment": "tsi-" + }, + "compute": { + "appServiceEnvironment": "ase-", + "appServicePlan": "asp-", + "loadTesting": "lt-", + "availabilitySet": "avail-", + "arcEnabledServer": "arcs-", + "arcEnabledKubernetesCluster": "arck", + "batchAccounts": "ba-", + "cloudService": "cld-", + "communicationServices": "acs-", + "diskEncryptionSet": "des", + "functionApp": "func-", + "gallery": "gal", + "hostingEnvironment": "host-", + "imageTemplate": "it-", + "managedDiskOS": "osdisk", + "managedDiskData": "disk", + "notificationHubs": "ntf-", + "notificationHubsNamespace": "ntfns-", + "proximityPlacementGroup": "ppg-", + "restorePointCollection": "rpc-", + "snapshot": "snap-", + "staticWebApp": "stapp-", + "virtualMachine": "vm", + "virtualMachineScaleSet": "vmss-", + "virtualMachineMaintenanceConfiguration": "mc-", + "virtualMachineStorageAccount": "stvm", + "webApp": "app-" + }, + "containers": { + "aksCluster": "aks-", + "aksSystemNodePool": "npsystem-", + "aksUserNodePool": "np-", + "containerApp": "ca-", + "containerAppsEnvironment": "cae-", + "containerRegistry": "cr", + "containerInstance": "ci", + "serviceFabricCluster": "sf-", + "serviceFabricManagedCluster": "sfmc-" + }, + "databases": { + "cosmosDBDatabase": "cosmos-", + "cosmosDBApacheCassandra": "coscas-", + "cosmosDBMongoDB": "cosmon-", + "cosmosDBNoSQL": "cosno-", + "cosmosDBTable": "costab-", + "cosmosDBGremlin": "cosgrm-", + "cosmosDBPostgreSQL": "cospos-", + "cacheForRedis": "redis-", + "sqlDatabaseServer": "sql-", + "sqlDatabase": "sqldb-", + "sqlElasticJobAgent": "sqlja-", + "sqlElasticPool": "sqlep-", + "mariaDBServer": "maria-", + "mariaDBDatabase": "mariadb-", + "mySQLDatabase": "mysql-", + "postgreSQLDatabase": "psql-", + "sqlServerStretchDatabase": "sqlstrdb-", + "sqlManagedInstance": "sqlmi-" + }, + "developerTools": { + "appConfigurationStore": "appcs-", + "mapsAccount": "map-", + "signalR": "sigr", + "webPubSub": "wps-" + }, + "devOps": { + "managedGrafana": "amg-" + }, + "integration": { + "apiManagementService": "apim-", + "integrationAccount": "ia-", + "logicApp": "logic-", + "serviceBusNamespace": "sbns-", + "serviceBusQueue": "sbq-", + "serviceBusTopic": "sbt-", + "serviceBusTopicSubscription": "sbts-" + }, + "managementGovernance": { + "automationAccount": "aa-", + "applicationInsights": "appi-", + "monitorActionGroup": "ag-", + "monitorDataCollectionRules": "dcr-", + "monitorAlertProcessingRule": "apr-", + "blueprint": "bp-", + "blueprintAssignment": "bpa-", + "dataCollectionEndpoint": "dce-", + "logAnalyticsWorkspace": "log-", + "logAnalyticsQueryPacks": "pack-", + "managementGroup": "mg-", + "purviewInstance": "pview-", + "resourceGroup": "rg-", + "templateSpecsName": "ts-" + }, + "migration": { + "migrateProject": "migr-", + "databaseMigrationService": "dms-", + "recoveryServicesVault": "rsv-" + }, + "networking": { + "applicationGateway": "agw-", + "applicationSecurityGroup": "asg-", + "cdnProfile": "cdnp-", + "cdnEndpoint": "cdne-", + "connections": "con-", + "dnsForwardingRuleset": "dnsfrs-", + "dnsPrivateResolver": "dnspr-", + "dnsPrivateResolverInboundEndpoint": "in-", + "dnsPrivateResolverOutboundEndpoint": "out-", + "firewall": "afw-", + "firewallPolicy": "afwp-", + "expressRouteCircuit": "erc-", + "expressRouteGateway": "ergw-", + "frontDoorProfile": "afd-", + "frontDoorEndpoint": "fde-", + "frontDoorFirewallPolicy": "fdfp-", + "ipGroups": "ipg-", + "loadBalancerInternal": "lbi-", + "loadBalancerExternal": "lbe-", + "loadBalancerRule": "rule-", + "localNetworkGateway": "lgw-", + "natGateway": "ng-", + "networkInterface": "nic-", + "networkSecurityGroup": "nsg-", + "networkSecurityGroupSecurityRules": "nsgsr-", + "networkWatcher": "nw-", + "privateLink": "pl-", + "privateEndpoint": "pep-", + "publicIPAddress": "pip-", + "publicIPAddressPrefix": "ippre-", + "routeFilter": "rf-", + "routeServer": "rtserv-", + "routeTable": "rt-", + "serviceEndpointPolicy": "se-", + "trafficManagerProfile": "traf-", + "userDefinedRoute": "udr-", + "virtualNetwork": "vnet-", + "virtualNetworkGateway": "vgw-", + "virtualNetworkManager": "vnm-", + "virtualNetworkPeering": "peer-", + "virtualNetworkSubnet": "snet-", + "virtualWAN": "vwan-", + "virtualWANHub": "vhub-" + }, + "security": { + "bastion": "bas-", + "keyVault": "kv-", + "keyVaultManagedHSM": "kvmhsm-", + "managedIdentity": "id-", + "sshKey": "sshkey-", + "vpnGateway": "vpng-", + "vpnConnection": "vcn-", + "vpnSite": "vst-", + "webApplicationFirewallPolicy": "waf", + "webApplicationFirewallPolicyRuleGroup": "wafrg" + }, + "storage": { + "storSimple": "ssimp", + "backupVault": "bvault-", + "backupVaultPolicy": "bkpol-", + "fileShare": "share-", + "storageAccount": "st", + "storageSyncService": "sss-" + }, + "virtualDesktop": { + "labServicesPlan": "lp-", + "virtualDesktopHostPool": "vdpool-", + "virtualDesktopApplicationGroup": "vdag-", + "virtualDesktopWorkspace": "vdws-", + "virtualDesktopScalingPlan": "vdscaling-" + } + }, + "abbrs": "[variables('$fxv#0')]", "safePrefix": "[if(greater(length(parameters('Prefix')), 20), substring(parameters('Prefix'), 0, 20), parameters('Prefix'))]", "uniqueId": "[toLower(uniqueString(subscription().id, variables('safePrefix'), resourceGroup().location))]", "UniquePrefix": "[format('cm{0}', padLeft(take(variables('uniqueId'), 12), 12, '0'))]", @@ -70,7 +298,7 @@ "storageSkuName": "Standard_LRS", "storageContainerName": "[replace(replace(replace(replace(format('{0}cast', variables('ResourcePrefix')), '-', ''), '_', ''), '.', ''), '/', '')]", "gptModelVersion": "2024-08-06", - "azureAiServicesName": "[format('{0}-ais', variables('ResourcePrefix'))]", + "azureAiServicesName": "[format('{0}{1}', variables('abbrs').ai.aiServices, variables('ResourcePrefix'))]", "aiModelDeployments": [ { "name": "[variables('llmModel')]", @@ -131,7 +359,7 @@ { "type": "Microsoft.App/containerApps", "apiVersion": "2023-05-01", - "name": "[toLower(format('{0}Bck-ca', variables('ResourcePrefix')))]", + "name": "[toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))]", "location": "[variables('location')]", "identity": { "type": "SystemAssigned" @@ -156,7 +384,7 @@ "env": [ { "name": "COSMOSDB_ENDPOINT", - "value": "[reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}cosmos', variables('ResourcePrefix')))), '2022-09-01').outputs.endpoint.value]" + "value": "[reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}{1}databaseAccount', variables('abbrs').databases.cosmosDBDatabase, variables('ResourcePrefix')))), '2022-09-01').outputs.endpoint.value]" }, { "name": "COSMOSDB_DATABASE", @@ -246,7 +474,7 @@ "dependsOn": [ "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry')]", "[resourceId('Microsoft.Resources/deployments', toLower(format('{0}conAppsEnv', variables('ResourcePrefix'))))]", - "[resourceId('Microsoft.Resources/deployments', toLower(format('{0}cosmos', variables('ResourcePrefix'))))]", + "[resourceId('Microsoft.Resources/deployments', toLower(format('{0}{1}databaseAccount', variables('abbrs').databases.cosmosDBDatabase, variables('ResourcePrefix'))))]", "[resourceId('Microsoft.Storage/storageAccounts', variables('storageContainerName'))]" ] }, @@ -307,13 +535,13 @@ "type": "Microsoft.Authorization/roleAssignments", "apiVersion": "2022-04-01", "scope": "[format('Microsoft.Storage/storageAccounts/{0}', variables('storageContainerName'))]", - "name": "[guid(resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix')))), 'Storage Blob Data Contributor')]", + "name": "[guid(resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))), 'Storage Blob Data Contributor')]", "properties": { "roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe')]", - "principalId": "[reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix')))), '2023-05-01', 'full').identity.principalId]" + "principalId": "[reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))), '2023-05-01', 'full').identity.principalId]" }, "dependsOn": [ - "[resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix'))))]", + "[resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix'))))]", "[resourceId('Microsoft.Storage/storageAccounts', variables('storageContainerName'))]" ] }, @@ -321,14 +549,14 @@ "type": "Microsoft.Authorization/roleAssignments", "apiVersion": "2022-04-01", "scope": "[format('Microsoft.CognitiveServices/accounts/{0}', variables('azureAiServicesName'))]", - "name": "[guid(resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix')))), variables('openAiContributorRoleId'))]", + "name": "[guid(resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))), variables('openAiContributorRoleId'))]", "properties": { "roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', variables('openAiContributorRoleId'))]", - "principalId": "[reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix')))), '2023-05-01', 'full').identity.principalId]" + "principalId": "[reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))), '2023-05-01', 'full').identity.principalId]" }, "dependsOn": [ "[resourceId('Microsoft.CognitiveServices/accounts', variables('azureAiServicesName'))]", - "[resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix'))))]" + "[resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix'))))]" ] }, { @@ -349,14 +577,14 @@ { "type": "Microsoft.Authorization/roleAssignments", "apiVersion": "2022-04-01", - "scope": "[format('Microsoft.MachineLearningServices/workspaces/{0}', format('{0}-prj', variables('ResourcePrefix')))]", - "name": "[guid(toLower(format('{0}Bck-ca', variables('ResourcePrefix'))), resourceId('Microsoft.MachineLearningServices/workspaces', format('{0}-prj', variables('ResourcePrefix'))), resourceId('Microsoft.Authorization/roleDefinitions', '64702f94-c441-49e6-a78b-ef80e0188fee'))]", + "scope": "[format('Microsoft.MachineLearningServices/workspaces/{0}', format('{0}{1}', variables('abbrs').ai.aiHubProject, variables('ResourcePrefix')))]", + "name": "[guid(toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix'))), resourceId('Microsoft.MachineLearningServices/workspaces', format('{0}{1}', variables('abbrs').ai.aiHubProject, variables('ResourcePrefix'))), resourceId('Microsoft.Authorization/roleDefinitions', '64702f94-c441-49e6-a78b-ef80e0188fee'))]", "properties": { "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', '64702f94-c441-49e6-a78b-ef80e0188fee')]", - "principalId": "[reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix')))), '2023-05-01', 'full').identity.principalId]" + "principalId": "[reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))), '2023-05-01', 'full').identity.principalId]" }, "dependsOn": [ - "[resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix'))))]" + "[resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix'))))]" ] }, { @@ -370,6 +598,9 @@ }, "mode": "Incremental", "parameters": { + "miName": { + "value": "[format('{0}{1}', variables('abbrs').security.managedIdentity, variables('ResourcePrefix'))]" + }, "solutionName": { "value": "[variables('ResourcePrefix')]" }, @@ -383,8 +614,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.35.1.17967", - "templateHash": "15947855719117669243" + "version": "0.33.93.31351", + "templateHash": "4801202077166882355" } }, "parameters": { @@ -404,7 +635,6 @@ }, "miName": { "type": "string", - "defaultValue": "[format('{0}-id', parameters('solutionName'))]", "metadata": { "description": "Name" } @@ -465,6 +695,9 @@ }, "mode": "Incremental", "parameters": { + "keyvaultName": { + "value": "[format('{0}{1}', variables('abbrs').security.keyVault, variables('ResourcePrefix'))]" + }, "solutionName": { "value": "[variables('ResourcePrefix')]" }, @@ -481,8 +714,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.35.1.17967", - "templateHash": "4039532432768976599" + "version": "0.33.93.31351", + "templateHash": "3632224099881800620" } }, "parameters": { @@ -499,16 +732,16 @@ }, "managedIdentityObjectId": { "type": "string" + }, + "keyvaultName": { + "type": "string" } }, - "variables": { - "keyvaultName": "[format('{0}-kv', parameters('solutionName'))]" - }, "resources": [ { "type": "Microsoft.KeyVault/vaults", "apiVersion": "2022-07-01", - "name": "[variables('keyvaultName')]", + "name": "[parameters('keyvaultName')]", "location": "[parameters('solutionLocation')]", "properties": { "createMode": "default", @@ -559,11 +792,11 @@ "outputs": { "keyvaultName": { "type": "string", - "value": "[variables('keyvaultName')]" + "value": "[parameters('keyvaultName')]" }, "keyvaultId": { "type": "string", - "value": "[resourceId('Microsoft.KeyVault/vaults', variables('keyvaultName'))]" + "value": "[resourceId('Microsoft.KeyVault/vaults', parameters('keyvaultName'))]" } } } @@ -617,8 +850,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.35.1.17967", - "templateHash": "8013960718059965025" + "version": "0.33.93.31351", + "templateHash": "9456018511253136487" } }, "parameters": { @@ -653,25 +886,250 @@ }, "aiServicesId": { "type": "string" - }, - "storageName": { - "type": "string", - "defaultValue": "[format('{0}hubst', parameters('solutionName'))]" } }, "variables": { + "$fxv#0": { + "ai": { + "aiSearch": "srch-", + "aiServices": "aisa-", + "aiVideoIndexer": "avi-", + "machineLearningWorkspace": "mlw-", + "openAIService": "oai-", + "botService": "bot-", + "computerVision": "cv-", + "contentModerator": "cm-", + "contentSafety": "cs-", + "customVisionPrediction": "cstv-", + "customVisionTraining": "cstvt-", + "documentIntelligence": "di-", + "faceApi": "face-", + "healthInsights": "hi-", + "immersiveReader": "ir-", + "languageService": "lang-", + "speechService": "spch-", + "translator": "trsl-", + "aiHub": "aih-", + "aiHubProject": "aihp-" + }, + "analytics": { + "analysisServicesServer": "as", + "databricksWorkspace": "dbw-", + "dataExplorerCluster": "dec", + "dataExplorerClusterDatabase": "dedb", + "dataFactory": "adf-", + "digitalTwin": "dt-", + "streamAnalytics": "asa-", + "synapseAnalyticsPrivateLinkHub": "synplh-", + "synapseAnalyticsSQLDedicatedPool": "syndp", + "synapseAnalyticsSparkPool": "synsp", + "synapseAnalyticsWorkspaces": "synw", + "dataLakeStoreAccount": "dls", + "dataLakeAnalyticsAccount": "dla", + "eventHubsNamespace": "evhns-", + "eventHub": "evh-", + "eventGridDomain": "evgd-", + "eventGridSubscriptions": "evgs-", + "eventGridTopic": "evgt-", + "eventGridSystemTopic": "egst-", + "hdInsightHadoopCluster": "hadoop-", + "hdInsightHBaseCluster": "hbase-", + "hdInsightKafkaCluster": "kafka-", + "hdInsightSparkCluster": "spark-", + "hdInsightStormCluster": "storm-", + "hdInsightMLServicesCluster": "mls-", + "iotHub": "iot-", + "provisioningServices": "provs-", + "provisioningServicesCertificate": "pcert-", + "powerBIEmbedded": "pbi-", + "timeSeriesInsightsEnvironment": "tsi-" + }, + "compute": { + "appServiceEnvironment": "ase-", + "appServicePlan": "asp-", + "loadTesting": "lt-", + "availabilitySet": "avail-", + "arcEnabledServer": "arcs-", + "arcEnabledKubernetesCluster": "arck", + "batchAccounts": "ba-", + "cloudService": "cld-", + "communicationServices": "acs-", + "diskEncryptionSet": "des", + "functionApp": "func-", + "gallery": "gal", + "hostingEnvironment": "host-", + "imageTemplate": "it-", + "managedDiskOS": "osdisk", + "managedDiskData": "disk", + "notificationHubs": "ntf-", + "notificationHubsNamespace": "ntfns-", + "proximityPlacementGroup": "ppg-", + "restorePointCollection": "rpc-", + "snapshot": "snap-", + "staticWebApp": "stapp-", + "virtualMachine": "vm", + "virtualMachineScaleSet": "vmss-", + "virtualMachineMaintenanceConfiguration": "mc-", + "virtualMachineStorageAccount": "stvm", + "webApp": "app-" + }, + "containers": { + "aksCluster": "aks-", + "aksSystemNodePool": "npsystem-", + "aksUserNodePool": "np-", + "containerApp": "ca-", + "containerAppsEnvironment": "cae-", + "containerRegistry": "cr", + "containerInstance": "ci", + "serviceFabricCluster": "sf-", + "serviceFabricManagedCluster": "sfmc-" + }, + "databases": { + "cosmosDBDatabase": "cosmos-", + "cosmosDBApacheCassandra": "coscas-", + "cosmosDBMongoDB": "cosmon-", + "cosmosDBNoSQL": "cosno-", + "cosmosDBTable": "costab-", + "cosmosDBGremlin": "cosgrm-", + "cosmosDBPostgreSQL": "cospos-", + "cacheForRedis": "redis-", + "sqlDatabaseServer": "sql-", + "sqlDatabase": "sqldb-", + "sqlElasticJobAgent": "sqlja-", + "sqlElasticPool": "sqlep-", + "mariaDBServer": "maria-", + "mariaDBDatabase": "mariadb-", + "mySQLDatabase": "mysql-", + "postgreSQLDatabase": "psql-", + "sqlServerStretchDatabase": "sqlstrdb-", + "sqlManagedInstance": "sqlmi-" + }, + "developerTools": { + "appConfigurationStore": "appcs-", + "mapsAccount": "map-", + "signalR": "sigr", + "webPubSub": "wps-" + }, + "devOps": { + "managedGrafana": "amg-" + }, + "integration": { + "apiManagementService": "apim-", + "integrationAccount": "ia-", + "logicApp": "logic-", + "serviceBusNamespace": "sbns-", + "serviceBusQueue": "sbq-", + "serviceBusTopic": "sbt-", + "serviceBusTopicSubscription": "sbts-" + }, + "managementGovernance": { + "automationAccount": "aa-", + "applicationInsights": "appi-", + "monitorActionGroup": "ag-", + "monitorDataCollectionRules": "dcr-", + "monitorAlertProcessingRule": "apr-", + "blueprint": "bp-", + "blueprintAssignment": "bpa-", + "dataCollectionEndpoint": "dce-", + "logAnalyticsWorkspace": "log-", + "logAnalyticsQueryPacks": "pack-", + "managementGroup": "mg-", + "purviewInstance": "pview-", + "resourceGroup": "rg-", + "templateSpecsName": "ts-" + }, + "migration": { + "migrateProject": "migr-", + "databaseMigrationService": "dms-", + "recoveryServicesVault": "rsv-" + }, + "networking": { + "applicationGateway": "agw-", + "applicationSecurityGroup": "asg-", + "cdnProfile": "cdnp-", + "cdnEndpoint": "cdne-", + "connections": "con-", + "dnsForwardingRuleset": "dnsfrs-", + "dnsPrivateResolver": "dnspr-", + "dnsPrivateResolverInboundEndpoint": "in-", + "dnsPrivateResolverOutboundEndpoint": "out-", + "firewall": "afw-", + "firewallPolicy": "afwp-", + "expressRouteCircuit": "erc-", + "expressRouteGateway": "ergw-", + "frontDoorProfile": "afd-", + "frontDoorEndpoint": "fde-", + "frontDoorFirewallPolicy": "fdfp-", + "ipGroups": "ipg-", + "loadBalancerInternal": "lbi-", + "loadBalancerExternal": "lbe-", + "loadBalancerRule": "rule-", + "localNetworkGateway": "lgw-", + "natGateway": "ng-", + "networkInterface": "nic-", + "networkSecurityGroup": "nsg-", + "networkSecurityGroupSecurityRules": "nsgsr-", + "networkWatcher": "nw-", + "privateLink": "pl-", + "privateEndpoint": "pep-", + "publicIPAddress": "pip-", + "publicIPAddressPrefix": "ippre-", + "routeFilter": "rf-", + "routeServer": "rtserv-", + "routeTable": "rt-", + "serviceEndpointPolicy": "se-", + "trafficManagerProfile": "traf-", + "userDefinedRoute": "udr-", + "virtualNetwork": "vnet-", + "virtualNetworkGateway": "vgw-", + "virtualNetworkManager": "vnm-", + "virtualNetworkPeering": "peer-", + "virtualNetworkSubnet": "snet-", + "virtualWAN": "vwan-", + "virtualWANHub": "vhub-" + }, + "security": { + "bastion": "bas-", + "keyVault": "kv-", + "keyVaultManagedHSM": "kvmhsm-", + "managedIdentity": "id-", + "sshKey": "sshkey-", + "vpnGateway": "vpng-", + "vpnConnection": "vcn-", + "vpnSite": "vst-", + "webApplicationFirewallPolicy": "waf", + "webApplicationFirewallPolicyRuleGroup": "wafrg" + }, + "storage": { + "storSimple": "ssimp", + "backupVault": "bvault-", + "backupVaultPolicy": "bkpol-", + "fileShare": "share-", + "storageAccount": "st", + "storageSyncService": "sss-" + }, + "virtualDesktop": { + "labServicesPlan": "lp-", + "virtualDesktopHostPool": "vdpool-", + "virtualDesktopApplicationGroup": "vdag-", + "virtualDesktopWorkspace": "vdws-", + "virtualDesktopScalingPlan": "vdscaling-" + } + }, + "abbrs": "[variables('$fxv#0')]", + "storageName": "[format('{0}{1}', variables('abbrs').storage.storageAccount, parameters('solutionName'))]", "storageSkuName": "Standard_LRS", - "aiServicesName": "[format('{0}-ais', parameters('solutionName'))]", - "workspaceName": "[format('{0}-log', parameters('solutionName'))]", - "keyvaultName": "[format('{0}-kv', parameters('solutionName'))]", + "aiServicesName": "[format('{0}{1}', variables('abbrs').ai.aiServices, parameters('solutionName'))]", + "workspaceName": "[format('{0}{1}', variables('abbrs').managementGovernance.logAnalyticsWorkspace, parameters('solutionName'))]", + "keyvaultName": "[format('{0}{1}', variables('abbrs').security.keyVault, parameters('solutionName'))]", "location": "[parameters('solutionLocation')]", - "azureAiHubName": "[format('{0}-hub', parameters('solutionName'))]", + "azureAiHubName": "[format('{0}{1}', variables('abbrs').ai.aiHub, parameters('solutionName'))]", "aiHubFriendlyName": "[variables('azureAiHubName')]", "aiHubDescription": "AI Hub for KM template", - "aiProjectName": "[format('{0}-prj', parameters('solutionName'))]", + "aiProjectName": "[format('{0}{1}', variables('abbrs').ai.aiHubProject, parameters('solutionName'))]", "aiProjectFriendlyName": "[variables('aiProjectName')]", - "aiSearchName": "[format('{0}-srch', parameters('solutionName'))]", - "storageNameCleaned": "[replace(replace(replace(replace(format('{0}cast', parameters('storageName')), '-', ''), '_', ''), '.', ''), '/', '')]" + "aiSearchName": "[format('{0}{1}', variables('abbrs').ai.aiSearch, parameters('solutionName'))]", + "storageNameCleaned": "[replace(replace(replace(replace(format('{0}cast', variables('storageName')), '-', ''), '_', ''), '.', ''), '/', '')]" }, "resources": [ { @@ -1611,7 +2069,7 @@ { "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", - "name": "[toLower(format('{0}cosmos', variables('ResourcePrefix')))]", + "name": "[toLower(format('{0}{1}databaseAccount', variables('abbrs').databases.cosmosDBDatabase, variables('ResourcePrefix')))]", "properties": { "expressionEvaluationOptions": { "scope": "inner" @@ -1619,7 +2077,7 @@ "mode": "Incremental", "parameters": { "name": { - "value": "[toLower(format('{0}cosno', variables('ResourcePrefix')))]" + "value": "[toLower(format('{0}{1}databaseAccount', variables('abbrs').databases.cosmosDBDatabase, variables('ResourcePrefix')))]" }, "enableAnalyticalStorage": { "value": true @@ -5427,7 +5885,7 @@ { "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01", - "name": "[toLower(format('{0}-Fnt-ca', variables('ResourcePrefix')))]", + "name": "[toLower(format('{0}{1}containerAppFrontend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))]", "properties": { "expressionEvaluationOptions": { "scope": "inner" @@ -5448,7 +5906,7 @@ "env": [ { "name": "API_URL", - "value": "[format('https://{0}', reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix')))), '2023-05-01').configuration.ingress.fqdn)]" + "value": "[format('https://{0}', reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))), '2023-05-01').configuration.ingress.fqdn)]" } ], "image": "[format('cmsacontainerreg.azurecr.io/cmsafrontend:{0}', variables('imageVersion'))]", @@ -5476,7 +5934,7 @@ "value": "[reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}conAppsEnv', variables('ResourcePrefix')))), '2022-09-01').outputs.resourceId.value]" }, "name": { - "value": "[toLower(format('{0}Fnt', variables('ResourcePrefix')))]" + "value": "[toLower(format('{0}{1}Frontend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))]" }, "location": { "value": "[variables('location')]" @@ -6648,7 +7106,7 @@ } }, "dependsOn": [ - "[resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix'))))]", + "[resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix'))))]", "[resourceId('Microsoft.Resources/deployments', toLower(format('{0}conAppsEnv', variables('ResourcePrefix'))))]", "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_managed_identity')]" ] @@ -6683,7 +7141,7 @@ } }, "scriptContent": { - "value": "[format('az cosmosdb sql role assignment create --resource-group \"{0}\" --account-name \"{1}\" --role-definition-id \"{2}\" --scope \"{3}\" --principal-id \"{4}\"', resourceGroup().name, reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}cosmos', variables('ResourcePrefix')))), '2022-09-01').outputs.name.value, resourceId('Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions', split(format('{0}/00000000-0000-0000-0000-000000000002', toLower(format('{0}cosmos', variables('ResourcePrefix')))), '/')[0], split(format('{0}/00000000-0000-0000-0000-000000000002', toLower(format('{0}cosmos', variables('ResourcePrefix')))), '/')[1]), reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}cosmos', variables('ResourcePrefix')))), '2022-09-01').outputs.resourceId.value, reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix')))), '2023-05-01', 'full').identity.principalId)]" + "value": "[format('az cosmosdb sql role assignment create --resource-group \"{0}\" --account-name \"{1}\" --role-definition-id \"{2}\" --scope \"{3}\" --principal-id \"{4}\"', resourceGroup().name, reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}{1}databaseAccount', variables('abbrs').databases.cosmosDBDatabase, variables('ResourcePrefix')))), '2022-09-01').outputs.name.value, resourceId('Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions', split(format('{0}/00000000-0000-0000-0000-000000000002', toLower(format('{0}{1}databaseAccount', variables('abbrs').databases.cosmosDBDatabase, variables('ResourcePrefix')))), '/')[0], split(format('{0}/00000000-0000-0000-0000-000000000002', toLower(format('{0}{1}databaseAccount', variables('abbrs').databases.cosmosDBDatabase, variables('ResourcePrefix')))), '/')[1]), reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}{1}databaseAccount', variables('abbrs').databases.cosmosDBDatabase, variables('ResourcePrefix')))), '2022-09-01').outputs.resourceId.value, reference(resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))), '2023-05-01', 'full').identity.principalId)]" } }, "template": { @@ -7212,8 +7670,8 @@ } }, "dependsOn": [ - "[resourceId('Microsoft.App/containerApps', toLower(format('{0}Bck-ca', variables('ResourcePrefix'))))]", - "[resourceId('Microsoft.Resources/deployments', toLower(format('{0}cosmos', variables('ResourcePrefix'))))]", + "[resourceId('Microsoft.App/containerApps', toLower(format('{0}{1}Backend', variables('abbrs').containers.containerApp, variables('ResourcePrefix'))))]", + "[resourceId('Microsoft.Resources/deployments', toLower(format('{0}{1}databaseAccount', variables('abbrs').databases.cosmosDBDatabase, variables('ResourcePrefix'))))]", "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_managed_identity')]" ] }