π§ Azure PostgreSQL Single Server log_connections Parameter is not set to ON - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/azure/postgresql-database/single-server-log-connections-parameter/prod.logic.yaml - Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
- π Azure PostgreSQL Server
- π Azure PostgreSQL Server - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2026-02-10T22:33:34.799142040Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| π’ | test1 | βοΈ 99 | βοΈ isDisappeared(CA10Z1__disappearanceTime__c) | βοΈ null |
| π’ | test2 | βοΈ 399 | βοΈ extract('caJsonFrom__configurations__c').jsonQueryText('[? name == \'log_connections\'].value | [0]') == 'on' | βοΈ null |
| π’ | test3 | βοΈ 299 | βοΈ extract('caJsonFrom__configurations__c').jsonQueryText('[? name == \'log_connections\'].value | [0]') == 'off' | βοΈ null |
| π’ | test4 | βοΈ 400 | βοΈ otherwise | βοΈ null |
| π’ | test5 | βοΈ 201 | βοΈ CA10Z1__configurations__c.delegatedTo(CA10Z1__configurations__c).isEmpty() | βοΈ null |
| π’ | test6 | βοΈ 199 | βοΈ extract('CA10Z1__deploymentMode__c') != 'Single' | βοΈ null |
Generation Bundleβ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/azure/postgresql-database/single-server-log-connections-parameter/policy.yaml | 157C6A50F7424A854077944580F65083 |
| Open | /ce/ca/azure/postgresql-database/single-server-log-connections-parameter/prod.logic.yaml | 8747E256E6DEAE332C475609317F1B0A |
| Open | /ce/ca/azure/postgresql-database/single-server-log-connections-parameter/test-data.json | 87B5DDB4D4DDB402924C4B927686B3C7 |
| Open | /types/CA10Z1__CaAzurePostgreSqlServer__c/object.extracts.yaml | 57EE11B2A1C370B47B2D4FE4AF22C8D0 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/azure/postgresql-database/single-server-log-connections-parameter/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/azure/postgresql-database/single-server-log-connections-parameter/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/azure/postgresql-database/single-server-log-connections-parameter/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/azure/postgresql-database/single-server-log-connections-parameter/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/azure/postgresql-database/single-server-log-connections-parameter/prod.logic.yaml
Contentβ
---
inputType: "CA10Z1__CaAzurePostgreSqlServer__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10Z1__CaAzurePostgreSqlServer__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "This is not the single server deployment mode."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10Z1__deploymentMode__c"
right:
TEXT: "Single"
- status: "INCOMPLIANT"
currentStateMessage: "PostgreSQL Server log_connections configuration is not enabled."
remediationMessage: "Enable log_connections."
check:
IS_EQUAL:
left:
JSON_QUERY_TEXT:
arg:
EXTRACT: "caJsonFrom__configurations__c"
expression: "[? name == 'log_connections'].value | [0]"
undeterminedIf:
evaluationError: "The JSON query has failed."
resultTypeMismatch: "The JSON query did not return text type."
right:
TEXT: "off"
- status: "COMPLIANT"
currentStateMessage: "PostgreSQL Server log_connections configuration is enabled."
check:
IS_EQUAL:
left:
JSON_QUERY_TEXT:
arg:
EXTRACT: "caJsonFrom__configurations__c"
expression: "[? name == 'log_connections'].value | [0]"
undeterminedIf:
evaluationError: "The JSON query has failed."
resultTypeMismatch: "The JSON query did not return text type."
right:
TEXT: "on"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected value in the field."