Skip to main content

🧠 Google Cloud SQL Server Instance user options Database Flag is configured - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• Google Cloud SQL InstanceCA10__CaGoogleSqlInstance__c28121

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:47:37.194386889Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒a8ED0βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒a8E40βœ”οΈ 199βœ”οΈ not(extract('CA10__databaseVersion__c').contains('SQLSERVER'))βœ”οΈ null
🟒a8ED9βœ”οΈ 201βœ”οΈ CA10__databaseFlagsJson__c.asJson().isEmpty()βœ”οΈ null
🟒a8E49βœ”οΈ 299βœ”οΈ extract('caExtract_databaseFlags_user_options_flagValue__c') == 'null'βœ”οΈ null
🟒a8E4999βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/google/sql/sqlserver-instance-user-options-flag/policy.yamlFF03E7C5FCF2167FE2E19BA5B9DD54EB
Open/ce/ca/google/sql/sqlserver-instance-user-options-flag/prod.logic.yamlCFCDE0A4DC66471B4D5DC0D916CC220B
Open/types/CA10__CaGoogleSqlInstance__c/object.extracts.yamlCF5DA82560FA69E6A48E44B5BF123F0B
Open/ce/ca/google/sql/sqlserver-instance-user-options-flag/test-data.jsonC8AE6C1A0008DBA08568AD6F97D62E68

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/google/sql/sqlserver-instance-user-options-flag/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/google/sql/sqlserver-instance-user-options-flag/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/google/sql/sqlserver-instance-user-options-flag/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/google/sql/sqlserver-instance-user-options-flag/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/google/sql/sqlserver-instance-user-options-flag/prod.logic.yaml

Content​

Open File

---

inputType: "CA10__CaGoogleSqlInstance__c"
testData:
- file: test-data.json
importExtracts:
- file: /types/CA10__CaGoogleSqlInstance__c/object.extracts.yaml
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "This is not a SQL Server database instance."
check:
NOT:
arg:
CONTAINS:
arg:
EXTRACT: "CA10__databaseVersion__c"
substring:
TEXT: "SQLSERVER"
- status: "COMPLIANT"
currentStateMessage: "user options database flag is not listed."
check:
IS_EQUAL:
left:
EXTRACT: "caExtract_databaseFlags_user_options_flagValue__c"
right:
TEXT: "null"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "user options database flag should not be configured."
remediationMessage: "Clear the user options database flag for every SQL Server Instance."