output "vault_name" { description = "The vault." value = azurerm_key_vault.secrets.name } output "verify" { description = "Checks." value = <<-EOT A diagnostic setting can take up to 90 minutes to start sending after the first apply. Run these drills after that. From an address outside allowed_ip_ranges: az keyvault secret list --vault-name ${azurerm_key_vault.secrets.name} # refused by the firewall As an identity with no role: az keyvault secret show --vault-name ${azurerm_key_vault.secrets.name} --name # Forbidden; ${var.name}-refused fires As an officer, set a test secret: ${var.name}-changed fires. Create and then delete a diagnostic setting on a test resource # ${var.name}-diagnostic-setting-written and ${var.name}-diagnostic-setting-deleted follow terraform destroy -target='azurerm_management_lock.alert_path["workspace"]' (module.standard. in front in Hardened), then apply again # ${var.name}-lock-deleted fires, and the lock returns az keyvault key rotation-policy show --vault-name ${azurerm_key_vault.secrets.name} --name cmk # rotate after P90D EOT }