Core Azure Modules

Essential building blocks for enterprise AI deployments: compute, data, networking, security, and monitoring.

18 production-ready modules with specifications, best practices, and sample Bicep deployment scripts.

Module Categories

🤖 AI Services
Language models, search, and foundry platforms
💾 Data & Storage
Databases, data lakes, and NoSQL solutions
🔒 Security & Access
Identity, secrets, and network isolation
📊 Operations
Monitoring, logging, and networking

23 Core Modules

🤖
Azure OpenAI
GPT-4, embeddings, DALL-E
🔒
AI Search
Vector + semantic search
⚙️
Azure AI Foundry
Hub, Prompt flow, Evaluations
🌐
API Management
GenAI gateway, caching, policies
🔒
Key Vault
Secrets & certificates
🌍
Cosmos DB
Multi-model database
📊
Microsoft Fabric
OneLake, Real-Time Intelligence
📦
Container Registry
Docker image store
🌐
Virtual Network
Hub-spoke topology
🔑
Private Link
Network isolation
🛡️
Azure Firewall
Network security
👤
Entra ID
Identity & RBAC
Container Apps
Managed containers
Functions
Serverless compute
📈
Azure Monitor
Logs, metrics, alerts
📬
Event Grid
Event routing
🗄️
SQL Managed Instance
Managed SQL Server
🔒
Azure Bastion
Secure remote access
🖥️
Azure Virtual Desktop
Secure cloud desktops
☸️
Azure Kubernetes Service
Managed Kubernetes
🌐
App Service
Web apps and APIs
🚀
Data Factory
Data integration pipelines
🚀
Service Bus
Reliable messaging

Sample Spec Kit – Bicep Deployment

Infrastructure as Code example deploying a complete AI workload with the core modules.

@description('Deploy core AI workload')
param location string = resourceGroup().location
param projectName string = 'ai-app'
param environment string = 'prod'

// Key Vault for secrets
resource keyVault 'Microsoft.KeyVault/vaults@2024-04-01-preview' = {
  name: 'kv-${projectName}-${environment}'
  location: location
  properties: {
    tenantId: subscription().tenantId
    sku: { family: 'A', name: 'standard' }
    accessPolicies: []
    enablePurgeProtection: true
    enableSoftDelete: true
  }
}

// Virtual Network
resource vnet 'Microsoft.Network/virtualNetworks@2023-11-01' = {
  name: 'vnet-${projectName}'
  location: location
  properties: {
    addressSpace: { addressPrefixes: ['10.0.0.0/16'] }
    subnets: [
      {
        name: 'subnet-apps'
        properties: { addressPrefix: '10.0.1.0/24' }
      }
      {
        name: 'subnet-pe'
        properties: { addressPrefix: '10.0.2.0/24' }
      }
    ]
  }
}

// Container Registry
resource acr 'Microsoft.ContainerRegistry/registries@2023-07-01' = {
  name: 'acr${projectName}${environment}'
  location: location
  sku: { name: 'Basic' }
  properties: {
    adminUserEnabled: false
    publicNetworkAccess: 'Enabled'
  }
}

// Cosmos DB for chat history
resource cosmosDb 'Microsoft.DocumentDB/databaseAccounts@2023-11-15' = {
  name: 'cosmos-${projectName}-${environment}'
  location: location
  kind: 'GlobalDocumentDB'
  properties: {
    databaseAccountOfferType: 'Standard'
    consistencyPolicy: {
      defaultConsistencyLevel: 'Session'
      maxIntervalInSeconds: 10
      maxStalenessPrefix: 200
    }
    locations: [{ locationName: location, failoverPriority: 0 }]
  }
}

// Log Analytics Workspace
resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
  name: 'laws-${projectName}'
  location: location
  properties: {
    sku: { name: 'PerGB2018' }
    retentionInDays: 30
  }
}

// Azure Monitor Alert
resource alertRule 'Microsoft.Insights/metricAlerts@2018-03-01' = {
  name: 'alert-cpu-${projectName}'
  location: 'global'
  properties: {
    description: 'Alert when CPU exceeds 80%'
    severity: 2
    enabled: true
    scopes: []
    evaluationFrequency: 'PT5M'
    windowSize: 'PT15M'
    criteria: {
      'odata.type': 'Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria'
      allOf: [
        {
          name: 'CPU'
          metricName: 'Percentage CPU'
          operator: 'GreaterThan'
          threshold: 80
          timeAggregation: 'Average'
        }
      ]
    }
  }
}

// Container Apps Environment
resource containerAppEnv 'Microsoft.App/managedEnvironments@2023-11-02-preview' = {
  name: 'cae-${projectName}'
  location: location
  properties: {
    vnetConfiguration: {
      infrastructureSubnetId: '${vnet.id}/subnets/subnet-apps'
    }
    appLogsConfiguration: {
      destination: 'log-analytics'
      logAnalyticsConfiguration: {
        customerId: reference(logAnalytics.id).customerId
        sharedKey: listKeys(logAnalytics.id, '2023-09-01').primarySharedKey
      }
    }
  }
}

// Container App
resource containerApp 'Microsoft.App/containerApps@2023-11-02-preview' = {
  name: 'app-${projectName}'
  location: location
  properties: {
    managedEnvironmentId: containerAppEnv.id
    configuration: {
      ingress: {
        external: true
        targetPort: 8000
        transport: 'http'
      }
      registries: [
        {
          server: acr.properties.loginServer
          username: 'managed-identity'
          passwordSecretRef: 'acr-password'
        }
      ]
    }
    template: {
      containers: [
        {
          name: 'api'
          image: '${acr.properties.loginServer}/ai-api:latest'
          resources: {
            cpu: json('0.5')
            memory: '1Gi'
          }
          env: [
            {
              name: 'KEY_VAULT_URL'
              value: keyVault.properties.vaultUri
            }
            {
              name: 'COSMOSDB_ENDPOINT'
              value: cosmosDb.properties.documentEndpoint
            }
          ]
        }
      ]
      scale: {
        minReplicas: 2
        maxReplicas: 10
        rules: [
          {
            name: 'http-rule'
            http: {
              metadata: { concurrentRequests: '100' }
            }
          }
        ]
      }
    }
  }
}

output keyVaultId string = keyVault.id
output containerAppFqdn string = containerApp.properties.configuration.ingress.fqdn
output cosmosDbEndpoint string = cosmosDb.properties.documentEndpoint

This Bicep template demonstrates core module deployment using Spec-Driven Development principles. Each resource definition is the "specification" for its infrastructure.

Next Steps

Explore Patterns

See how these modules combine into 10 complete AI architecture patterns.

View Patterns
Spec-Driven Development

Learn how to write executable specifications for your architecture.

Learn SDD