output "workspace_id" { description = "The workspace containing the activity log and the read records." value = azurerm_log_analytics_workspace.insider.id } output "verify" { description = "How to prove each alert fires." value = <<-EOT Exports can take up to 90 minutes to start after the first apply. Run these drills after that. az storage account keys list --account-name # keys-or-sas emails once the entry reaches the workspace, usually within 20 minutes az keyvault set-policy --name --upn --key-permissions get # decrypt-rights follows Create and then delete a diagnostic setting on a test resource # insider-diagnostic-setting-written, insider-diagnostic-setting-deleted, and 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 # logging-weakened for the lock, insider-rule-access-removed for the assignment ${local.reads ? "Download more than ${var.bulk_read_gigabytes} GB from a sensitive account within an hour, signed in with Entra ID: insider-bulk-read names you after one of its 15-minute runs." : "Set sensitive_storage_account_ids to record blob reads and alert on bulk downloads."} Each scheduled alert's description names its saved query in the workspace, under the category Insider data theft. EOT }