π§ Azure Diagnostic Setting for Azure Key Vault is not enabled - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/azure/monitor/diagnostic-setting-for-azure-key-vault/prod.logic.yaml - Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
Test Results π’β
Generated at: 2026-05-02T12:04:56.813057554Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| π’ | kv-001 | βοΈ 199 | βοΈ CA10__resource__r.CA10__Azure_Diagnostic_Settings__r.has(COMPLIANT) | βοΈ null |
| π’ | kv-002 | βοΈ 199 | βοΈ CA10__resource__r.CA10__Azure_Diagnostic_Settings__r.has(COMPLIANT) | βοΈ null |
| π’ | kv-003 | βοΈ 200 | βοΈ otherwise | βοΈ null |
| π’ | kv-004 | βοΈ 200 | βοΈ otherwise | βοΈ null |
| π’ | kv-005 | βοΈ 200 | βοΈ otherwise | βοΈ null |
Generation Bundleβ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/azure/monitor/diagnostic-setting-for-azure-key-vault/policy.yaml | F90784BBD162DCC62707A3B189BCDA08 |
| Open | /ce/ca/azure/monitor/diagnostic-setting-for-azure-key-vault/prod.logic.yaml | DF71D3FBCEC2DF921ACA5A17E1C999E3 |
| Open | /ce/ca/azure/monitor/diagnostic-setting-for-azure-key-vault/test-data.json | EDA4B9EF8E3FBE2E393CE4EFA232D776 |
| Open | /types/CA10__CaAzureDiagnosticSetting__c/object.extracts.yaml | 4AADFEBE59E43127A2529B2F0DB31297 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/azure/monitor/diagnostic-setting-for-azure-key-vault/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/azure/monitor/diagnostic-setting-for-azure-key-vault/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/azure/monitor/diagnostic-setting-for-azure-key-vault/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/azure/monitor/diagnostic-setting-for-azure-key-vault/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/azure/monitor/diagnostic-setting-for-azure-key-vault/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAzureKeyVault__c"
testData:
- file: "test-data.json"
conditions:
- status: "COMPLIANT"
currentStateMessage: "Key Vault diagnostic logging is enabled and sent to a destination."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__resource__r.CA10__Azure_Diagnostic_Settings__r"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "Key Vault diagnostic logging is not enabled and sent to a destination."
remediationMessage: "Enable Key Vault diagnostic logging and configure a log destination."
relatedLists:
- relationshipName: "CA10__resource__r.CA10__Azure_Diagnostic_Settings__r"
importExtracts:
- file: "/types/CA10__CaAzureDiagnosticSetting__c/object.extracts.yaml"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "Key Vault diagnostic logging is not enabled for the required log categories."
remediationMessage: "Enable the audit and allLogs category groups, or the legacy AuditEvent category."
check:
NOT:
arg:
OR:
args:
- JSON_QUERY_BOOLEAN:
arg:
EXTRACT: "caJsonFrom__logsJson__c"
expression: "contains([? category == `AuditEvent`].enabled, `true`)"
undeterminedIf:
evaluationError: "The JSON query has failed."
resultTypeMismatch: "The JSON query did not return boolean type."
- AND:
args:
- JSON_QUERY_BOOLEAN:
arg:
EXTRACT: "caJsonFrom__logsJson__c"
expression: "contains([? categoryGroup == `audit`].enabled, `true`)"
undeterminedIf:
evaluationError: "The JSON query has failed."
resultTypeMismatch: "The JSON query did not return boolean type."
- JSON_QUERY_BOOLEAN:
arg:
EXTRACT: "caJsonFrom__logsJson__c"
expression: "contains([? categoryGroup == `allLogs`].enabled, `true`)"
undeterminedIf:
evaluationError: "The JSON query has failed."
resultTypeMismatch: "The JSON query did not return boolean type."
- status: "INCOMPLIANT"
currentStateMessage: "Key Vault diagnostic logging does not have a log destination."
remediationMessage: "Configure a Log Analytics workspace, storage account, or event hub destination."
check:
AND:
args:
- IS_EMPTY:
arg:
EXTRACT: "CA10__workspaceId__c"
- IS_EMPTY:
arg:
EXTRACT: "CA10__storageAccountId__c"
- IS_EMPTY:
arg:
EXTRACT: "CA10__eventHubAuthorizationRuleId__c"
otherwise:
status: "COMPLIANT"
currentStateMessage: "This Key Vault diagnostic setting enables the required logs and has a configured destination."