Skip to main content

Template Parameters Reference

Overview

The main Bicep template (azure_template/main.bicep) accepts parameters that control which resources are deployed and how they are configured. Parameters are organized into logical groups.

Core Parameters

Environment & Location

ParameterTypeRequiredDefaultDescription
environmentstringYes-Environment name. Allowed: dev, staging, prod
locationstringYes-Azure region for core infrastructure
projectPrefixstringNo''Project prefix (e.g., k12, tap). Used in resource names
projectNamestringNoaitoolsBase name for all resources
tagsobjectNo{}Additional tags to apply to all resources

Resource Group

ParameterTypeRequiredDefaultDescription
resourceGroupNamestringNoAuto-generatedOverride the resource group name

Default naming formula:

{ENVIRONMENT}-{projectPrefix?}-{projectName}-rg

Module Toggles

Control which components are deployed. All default to true unless noted.

ParameterTypeDefaultDescription
deployContainerRegistrybooltrueDeploy Azure Container Registry
deployAppServicebooltrueDeploy App Service and App Service Plan
deployFunctionAppbooltrueDeploy Function App (container-based)
deploySqlServerbooltrueDeploy Azure SQL Server and Database
deployKeyVaultbooltrueDeploy Key Vault
deployAiFoundrybooltrueDeploy Azure AI model endpoints via Azure AI Services accounts
deployContentSafetybooltrueDeploy Content Safety
deployFormRecognizerbooltrueDeploy Form Recognizer (Document Intelligence)
deployApimboolfalseDeploy API Management (usually shared)
deployAiSearchboolfalseDeploy Azure AI Search
deployAppInsightsbooltrueDeploy Application Insights
deployStorageAccountbooltrueDeploy Storage Account

Container Registry Configuration

ParameterTypeDefaultAllowed ValuesDescription
acrSkustringBasicBasic, Standard, PremiumACR SKU tier
note

Private Endpoints: ACR does not use Private Endpoints in this template. Only Premium SKU supports Private Endpoints, but ACR does not store sensitive business data.

App Service Configuration

ParameterTypeDefaultAllowed ValuesDescription
appServicePlanSkustringB1See SKU table belowApp Service Plan SKU
appServicePlanCapacityint11-30Number of instances
dockerImagestring''-Docker image for App Service
functionAppDockerImagestring''-Docker image for Function App
deploymentSlotNamesarray[]Slot names such as ['staging', 'rollback']Deployment slots to create for App Service, Function App, Ingestion Server, Ingestion Function App, and Widget
note

deploymentSlotNames replaces the older single-slot toggle. In staging and prod, the environment parameter files now provision both staging and rollback slots. dev and test leave this as [].

App Service Plan SKU Options

SKUTiervCPURAMDescription
F1FreeShared1 GBDevelopment only, no scaling
B1Basic11.75 GBDev/test workloads
B2Basic23.5 GBDev/test workloads
B3Basic47 GBDev/test workloads
S1Standard11.75 GBProduction, auto-scale
S2Standard23.5 GBProduction, auto-scale
S3Standard47 GBProduction, auto-scale
P1v2PremiumV213.5 GBHigh-performance
P2v2PremiumV227 GBHigh-performance
P3v2PremiumV2414 GBHigh-performance
P0v3PremiumV314 GBCost-effective Premium
P1v3PremiumV328 GBLatest gen, best value
P2v3PremiumV3416 GBLatest gen, best value
P3v3PremiumV3832 GBLatest gen, best value

SQL Server Configuration

ParameterTypeDefaultDescription
sqlAdminLoginstringsqladminSQL Server administrator login
sqlAdminPasswordsecureStringRequiredSQL Server administrator password
sqlDatabaseSkustringBasicDatabase SKU tier

The GitHub Actions infra deployment script only generates a SQL admin password when it is creating the SQL Server for the first time. For an existing SQL Server, reapply must resolve the current password from SQL_ADMIN_PASSWORD or sql-admin-password; if none is available, deployment stops rather than silently rotating credentials. Older vaults that only have the retired azure-sql-password secret should copy that value to sql-admin-password once before infrastructure reapply.

SQL Database SKU Options

SKUTierDTUsMax SizeDescription
BasicBasic52 GBDev workloads
S0Standard10250 GBLight production
S1Standard20250 GBStandard production
S2Standard50250 GBStandard production
S3Standard100250 GBStandard production
S4Standard200250 GBHigh transaction
S6Standard400250 GBHigh transaction
S7Standard800250 GBHigh transaction
S9Standard1600250 GBHigh transaction
S12Standard3000250 GBHigh transaction
P1Premium1251 TBPremium performance
P2Premium2501 TBPremium performance
P4Premium5001 TBPremium performance
P6Premium10001 TBPremium performance
P11Premium17504 TBEnterprise scale
P15Premium40004 TBEnterprise scale

AI Services Configuration

ParameterTypeDefaultDescription
aiFoundryLocationstringswedencentralLocation for AI Foundry (best model quota). Set to '' to use main location
aiFoundrySkustringS0AI Foundry SKU (only S0 available)
contentSafetySkustringS0Content Safety SKU: F0 (free) or S0
formRecognizerSkustringS0Form Recognizer SKU: F0 (free) or S0
warning

AI Foundry Location: Sweden Central (swedencentral) has the best quota availability for the latest models. Consider using this region for AI services even if the main infrastructure is elsewhere.

Key Vault Configuration

ParameterTypeDefaultAllowed ValuesDescription
keyVaultSkustringstandardstandard, premiumKey Vault SKU
keyVaultSecretsOfficerObjectIdsarray[]Azure AD user object IDs to grant Key Vault Secrets Officer on the environment vault
note

RBAC Authorization: Key Vault is configured with RBAC authorization by default (not access policies). The managed identity is assigned the Key Vault Secrets User role.

note

Deployment profiles can keep this human-readable by supplying keyVaultSecretsOfficerLogins; the deploy scripts resolve those logins to object IDs before invoking the template.

Networking Configuration

ParameterTypeDefaultDescription
enableVnetbooltrueEnable Virtual Network deployment (free - recommended)
enablePrivateEndpointsboolfalseEnable Private Endpoints (~$40/month)
vnetAddressPrefixstring10.0.0.0/16VNet address space
enableServiceEndpointsbooltrueEnable Service Endpoints (free, requires VNet)
allowedIpAddressesarray[]IP addresses allowed through firewalls
note

VNets are free! They provide security benefits via Service Endpoints at no cost and are enabled by default in all environments. Only Private Endpoints add cost (~$40/month).

Networking Combinations

VNetPrivate EndpointsService EndpointsMonthly CostUse Case
truefalsetrue$0Recommended: Free security with Service Endpoints
truetruetrue+$40Full isolation with Private Endpoints (staging/prod)
falsefalsefalse$0Not recommended - public access only

Environment Parameter Files

Pre-configured parameter files are available in azure_template/environments/:

dev.bicepparam

using '../main.bicep'

param environment = 'dev'
param location = 'eastus2'
param projectName = 'aitools'

// Minimal SKUs for cost savings
param acrSku = 'Basic'
param appServicePlanSku = 'B1'
param sqlDatabaseSku = 'Basic'
param contentSafetySku = 'S0' // Pay-per-use, free tier covers dev usage
param formRecognizerSku = 'S0' // Pay-per-use, free tier covers dev usage

// VNet enabled (free), no Private Endpoints in dev
param enableVnet = true // Free - provides Service Endpoints security
param enablePrivateEndpoints = false
param deploymentSlotNames = []

// SQL password (use Key Vault reference in real deployments)
param sqlAdminPassword = '<your-password>'
note

Why S0 instead of F0? The S0 tier for Content Safety and Form Recognizer is pay-per-use with generous free tiers that cover typical development usage. F0 has restrictive rate limits (1 request/second) that can break development workflows, while S0 allows higher throughput and only charges if you exceed the free tier.

staging.bicepparam

using '../main.bicep'

param environment = 'staging'
param location = 'eastus2'
param projectName = 'aitools'

// Production-style networking with staging compute
param acrSku = 'Basic'
param appServicePlanSku = 'P0v3'
param sqlDatabaseSku = 'Basic'
param contentSafetySku = 'S0'
param formRecognizerSku = 'S0'

// Enable VNet, Service Endpoints, and network lockdown
param enableVnet = true
param enablePrivateEndpoints = false
param enableServiceEndpoints = true
param enableNetworkLockdown = true
param enableAppAccessRestrictions = true
param deploymentSlotNames = [
'staging'
'rollback'
]

// APIM is deployed separately (Consumption tier)

param sqlAdminPassword = '<your-password>'

prod.bicepparam

using '../main.bicep'

param environment = 'prod'
param location = 'eastus2'
param projectName = 'aitools'

// Production SKUs (cost-optimized)
param acrSku = 'Basic'
param appServicePlanSku = 'P0v3'
param appServicePlanCapacity = 1
param sqlDatabaseSku = 'Basic'
param contentSafetySku = 'S0'
param formRecognizerSku = 'S0'

// Service endpoints + deny-by-default lockdown
param enableVnet = true
param enablePrivateEndpoints = false
param enableServiceEndpoints = true
param enableNetworkLockdown = true
param enableAppAccessRestrictions = true
param deploymentSlotNames = [
'staging'
'rollback'
]

// APIM is deployed separately (Consumption tier)

param sqlAdminPassword = '<your-password>'

Deployment Commands

Deploy to Dev

az deployment sub create \
--location eastus2 \
--template-file azure_template/main.bicep \
--parameters azure_template/environments/dev.bicepparam

Deploy to Staging

az deployment sub create \
--location eastus2 \
--template-file azure_template/main.bicep \
--parameters azure_template/environments/staging.bicepparam

Deploy to Prod

az deployment sub create \
--location eastus2 \
--template-file azure_template/main.bicep \
--parameters azure_template/environments/prod.bicepparam

What-If (Preview Changes)

az deployment sub what-if \
--location eastus2 \
--template-file azure_template/main.bicep \
--parameters azure_template/environments/dev.bicepparam

Output Values

The template outputs key values for integration:

OutputDescription
resourceGroupNameName of the created resource group
resourceGroupIdResource ID of the resource group
identityIdUser-Assigned Managed Identity resource ID
identityPrincipalIdPrincipal ID for RBAC assignments
identityClientIdClient ID for SDK authentication
containerRegistryNameACR name
containerRegistryLoginServerACR login server URL
storageAccountNameStorage Account name
sqlServerFqdnSQL Server fully qualified domain name
sqlDatabaseNameSQL Database name
aiFoundryEndpointAI Foundry endpoint URL
contentSafetyEndpointContent Safety endpoint URL
formRecognizerEndpointForm Recognizer endpoint URL
appServiceHostnameApp Service default hostname
functionAppHostnameFunction App default hostname
keyVaultUriKey Vault URI