This folder contains Infrastructure as Code for provisioning the Azure resource used by this repo: an Azure AI Services / AI Foundry account configured for Content Understanding.
The templates deploy:
kind = "AIServices"S0Notes:
- The Bicep deployment targets an existing resource group.
- The Terraform deployment creates both the resource group and the AI Services account.
- These templates provision the resource, but they do not create the required model deployments automatically.
Before deploying, make sure you have:
az loginThe Bicep files are in infra\bicep.
infra\bicep\main.bicepparamresourceName = globally unique Azure AI Services resource namelocation = supported Content Understanding regioncustomSubDomainName if you do not want it to match resourceNameaz deployment group create --resource-group <resource-group-name> --template-file .\infra\bicep\main.bicep --parameters .\infra\bicep\main.bicepparam
After deployment, note the endpoint output. It will be in this format:
https://<custom-subdomain>.cognitiveservices.azure.com
The Terraform files are in infra\terraform.
cd .\infra\terraform
terraform init
terraform plan -var="resource_name=my-foundry-resource" -var="resource_group_name=rg-content-understanding" -var="location=eastus"
terraform apply -var="resource_name=my-foundry-resource" -var="resource_group_name=rg-content-understanding" -var="location=eastus"
Terraform outputs include:
endpointresource_idresource_nameNote:
variables.tfcurrently validateslocationagainsteastus,eastus2,westus,westus3, andwesteurope. If you want to use another supported Content Understanding region, update that validation block first.
az cognitiveservices account show --resource-group <resource-group-name> --name <resource-name> --query properties.endpoint -o tsv
az cognitiveservices account keys list --resource-group <resource-group-name> --name <resource-name>
.env in the repo root. You can start from .env.template:copy .env.template .env
Then set:
CONTENTUNDERSTANDING_ENDPOINT=https://<your-resource-name>.cognitiveservices.azure.com
CONTENTUNDERSTANDING_KEY=<your-api-key>
gpt-4.1gpt-4.1-minitext-embedding-3-largeContent Understanding supports these regions:
eastuseastus2westuswestus3westeuropenortheuropeswedencentraluksouthsouthcentralussoutheastasiaaustraliaeastjapaneast