output "workspace_id" { description = "The workspace containing the call records and the activity log." value = azurerm_log_analytics_workspace.ai.id } output "verify" { description = "How to prove the record and each alert work." value = <<-EOT Exports can take up to 90 minutes to start after the first apply. Run these drills after that. az cognitiveservices account keys list --name --resource-group # ai-keys-fetched emails once the entry reaches the workspace, usually within 20 minutes Make one model call to a named account. It can take up to two hours to show in the saved query ai-calls-by-caller, with your object ID if you signed in with Entra ID. Set tokens_per_hour = 1, apply, and make a call to a named account # ai-tokens- emails after a later 15-minute check; set it back Create and then delete a diagnostic setting on a test resource # ai-diagnostic-setting-written, ai-diagnostic-setting-deleted, and ai-logging-weakened follow Remove the lock with terraform destroy -target=azurerm_management_lock.security (module.standard.azurerm_management_lock.security in Hardened), delete one rule's Log Analytics Reader assignment on the workspace, then apply again # ai-logging-weakened for the lock, ai-rule-access-removed for the assignment ${var.key_access_policy_effect == "Deny" ? "Create a test AI account with keys on: Azure refuses it with 403 Forbidden." : var.key_access_policy_effect == "Audit" ? "In Policy, Compliance, the assignment ai-key-access-disabled lists the accounts that still accept keys once its first evaluation finishes." : "key_access_policy_effect is Disabled, so nothing reports accounts that accept keys."} Each scheduled alert's description names its saved query in the workspace, under the category AI model logging. EOT }