using './main.bicep'

/*
 * Production Environment Configuration
 * Optimized for high availability and performance
 */

// Basic Configuration
param environmentName = 'citadel-prod'
param location = 'swedencentral'
param apicLocation = 'swedencentral'
param resourceGroupName = ''  // Auto-generated based on environmentName
param tags = {
  'azd-env-name': 'citadel-prod'
  SecurityControl: 'Required'
  Environment: 'Production'
  CostCenter: 'Platform'
  Criticality: 'High'
}

// Production-grade SKUs
param apimSku = 'PremiumV2'
param apimSkuUnits = 2

// Higher capacity for production workloads
param cosmosDbRUs = 3000
param eventHubCapacityUnits = 5

// Enable monitoring dashboards
param createAppInsightsDashboards = true

// Enable all production features
param enableAPICenter = true
param enableAIGatewayPiiRedaction = true
param enableAIModelInference = true
// Azure Managed Redis (AMR)
param enableManagedRedis = true
param redisPublicNetworkAccess = 'Disabled'
param redisSkuName = 'Balanced_B10'
param redisSkuCapacity = 2
param enableDocumentIntelligence = true
param enableAzureAISearch = true
param enableOpenAIRealtime = true

// Enable Entra ID authentication for production
param entraAuth = true
param entraTenantId = ''  // Set via environment variable or override
param entraClientId = ''  // Set via environment variable or override
param entraAudience = ''  // Set via environment variable or override

// Secure network configuration
param apimNetworkType = 'Internal'
param apimV2UsePrivateEndpoint = true
param apimV2PublicNetworkAccess = false
param cosmosDbPublicAccess = 'Disabled'
param eventHubNetworkAccess = 'Disabled'
param keyVaultExternalNetworkAccess = 'Disabled'

// Key Vault SKU (premium recommended for production for HSM support)
param keyVaultSkuName = 'premium'

// Enable Azure Monitor Private Link Scope
param useAzureMonitorPrivateLinkScope = true

// Log Analytics Configuration (use existing workspace if available)
param useExistingLogAnalytics = false
param existingLogAnalyticsName = ''  // Set to existing workspace name if reusing
param existingLogAnalyticsRG = ''  // Set to existing workspace resource group
param existingLogAnalyticsSubscriptionId = ''  // Set if workspace is in different subscription

// Production AI Foundry configuration
param aiFoundryInstances = [
  {
    name: ''
    location: 'eastus'
    customSubDomainName: ''
    defaultProjectName: 'production-project'
  }
  {
    name: ''
    location: 'westus'
    customSubDomainName: ''
    defaultProjectName: 'production-project'
  }
]

param aiFoundryModelsConfig = [
  {
    name: 'gpt-4o'
    publisher: 'OpenAI'
    version: '2024-11-20'
    sku: 'GlobalStandard'
    capacity: 200
    retirementDate: '2026-09-30'
    aiserviceIndex: 0
  }
  {
    name: 'gpt-4o-mini'
    publisher: 'OpenAI'
    version: '2024-07-18'
    sku: 'GlobalStandard'
    capacity: 200
    retirementDate: '2026-09-30'
    aiserviceIndex: 0
  }
  {
    name: 'gpt-4o'
    publisher: 'OpenAI'
    version: '2024-11-20'
    sku: 'GlobalStandard'
    capacity: 200
    retirementDate: '2026-09-30'
    aiserviceIndex: 1
  }
]
