Project: KICS (Provisioning / Security & Compliance)
File: b9c524a4-fe76-4021-a6a2-cb978fb4fde1.md

title: RDS Instance Events Not Logged hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: b9c524a4-fe76-4021-a6a2-cb978fb4fde1 Query name: RDS Instance Events Not Logged Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Observability URL: All RDS Instance events trackers should be 'true'<br> ```tf title="Positive test num. 1 - tf file" hl_lines="15" resource "alicloudlogaudit" "example" { display_name = "tf-audit-test" aliuid = "12345678" variable_map = { "actiontrail_enabled" = "true", "actiontrail_ttl" = "180", "actiontrailtienabled" = "true", "ossaccessenabled" = "true", "ossaccessttl" = "7", "osssyncenabled" = "true", "osssyncttl" = "180", "ossaccessti_enabled" = "true", "ossmeteringenabled" = "true", "ossmeteringttl" = "180", "rds_enabled" = "false", "rdsauditcollection_policy" = "", "rds_ttl" = "180", "rdstienabled" = "true", "rdsslowenabled" = "true", "rdsslowcollection_policy" = "", "rdsslowttl" = "180", "rdsperfenabled" = "true", "rdsperfcollection_policy" = "", "rdsperfttl" = "180", "vpcflowenabled" = "true", "vpcflowttl" = "7", "vpcflowcollection_policy" = "", "vpcsyncenabled" = "true", "vpcsyncttl" = "180", "polardb_enabled" = "true", "polardbauditcollection_policy" = "", "polardb_ttl" = "180", "polardbtienabled" = "true", "polardbslowenabled" = "true", "polardbslowcollection_policy" = "", "polardbslowttl" = "180", "polardbperfenabled" = "true", "polardbperfcollection_policy" = "", "polardbperfttl" = "180", "drdsauditenabled" = "true", "drdsauditcollection_policy" = "", "drdsauditttl" = "7", "drdssyncenabled" = "true", "drdssyncttl" = "180", "drdsauditti_enabled" = "true", "slbaccessenabled" = "true", "slbaccesscollection_policy" = "", "slbaccessttl" = "7", "slbsyncenabled" = "true", "slbsyncttl" = "180", "slbaccessti_enabled" = "true", "bastion_enabled" = "true", "bastion_ttl" = "180", "bastiontienabled" = "true", "waf_enabled" = "true", "waf_ttl" = "180", "waftienabled" = "true", "cloudfirewall_enabled" = "true", "cloudfirewall_ttl" = "180", "cloudfirewalltienabled" = "true", "ddoscooaccess_enabled" = "true", "ddoscooaccess_ttl" = "180", "ddoscooaccesstienabled" = "true", "ddosbgpaccess_enabled" = "true", "ddosbgpaccess_ttl" = "180", "ddosdipaccess_enabled" = "true", "ddosdipaccess_ttl" = "180", "ddosdipaccesstienabled" = "true", "sascrackenabled" = "true", "sasdnsenabled" = "true", "sashttpenabled" = "true", "saslocaldns_enabled" = "true", "sasloginenabled" = "true", "sasnetworkenabled" = "true", "sasprocessenabled" = "true", "sassecurityalert_enabled" = "true", "sassecurityhc_enabled" = "true", "sassecurityvul_enabled" = "true", "sassessionenabled" = "true", "sassnapshotaccount_enabled" = "true", "sassnapshotport_enabled" = "true", "sassnapshotprocess_enabled" = "true", "sas_ttl" = "180", "sastienabled" = "true", "apigateway_enabled" = "true", "apigateway_ttl" = "180", "apigatewaytienabled" = "true", "nas_enabled" = "true", "nas_ttl" = "180", "nastienabled" = "true", "appconnect_enabled" = "true", "appconnect_ttl" = "180", "cps_enabled" = "true", "cps_ttl" = "180", "cpstienabled" = "true", "k8sauditenabled" = "true", "k8sauditcollection_policy" = "", "k8sauditttl" = "180", "k8seventenabled" = "true", "k8seventcollection_policy" = "", "k8seventttl" = "180", "k8singressenabled" = "true", "k8singresscollection_policy" = "", "k8singressttl" = "180" "appconnecttienabled":"false" } } ``` ```tf title="Positive test

2 - tf file" hl_lines="4" resource "alicloudlogaudit" "example" { display_name = "tf-audit-test" aliuid = "12345678" variable_map = { "actiontrail_enabled" = "true", "actiontrail_ttl" = "180", "actiontrailtienabled" = "true", "ossaccessenabled" = "true", "ossaccessttl" = "7", "osssyncenabled" = "true", "osssyncttl" = "180", "ossaccessti_enabled" = "true", "ossmeteringenabled" = "true", "ossmeteringttl" = "180", "rdsauditcollection_policy" = "", "rds_ttl" = "180", "rdstienabled" = "true", "rdsslowenabled" = "true", "rdsslowcollection_policy" = "", "rdsslowttl" = "180", "rdsperfenabled" = "true", "rdsperfcollection_policy" = "", "rdsperfttl" = "180", "vpcflowenabled" = "true", "vpcflowttl" = "7", "vpcflowcollection_policy" = "", "vpcsyncenabled" = "true", "vpcsyncttl" = "180", "polardb_enabled" = "true", "polardbauditcollection_policy" = "", "polardb_ttl" = "180", "polardbtienabled" = "true", "polardbslowenabled" = "true", "polardbslowcollection_policy" = "", "polardbslowttl" = "180", "polardbperfenabled" = "true", "polardbperfcollection_policy" = "", "polardbperfttl" = "180", "drdsauditenabled" = "true", "drdsauditcollection_policy" = "", "drdsauditttl" = "7", "drdssyncenabled" = "true", "drdssyncttl" = "180", "drdsauditti_enabled" = "true", "slbaccessenabled" = "true", "slbaccesscollection_policy" = "", "slbaccessttl" = "7", "slbsyncenabled" = "true", "slbsyncttl" = "180", "slbaccessti_enabled" = "true", "bastion_enabled" = "true", "bastion_ttl" = "180", "bastiontienabled" = "true", "waf_enabled" = "true", "waf_ttl" = "180", "waftienabled" = "true", "cloudfirewall_enabled" = "true", "cloudfirewall_ttl" = "180", "cloudfirewalltienabled" = "true", "ddoscooaccess_enabled" = "true", "ddoscooaccess_ttl" = "180", "ddoscooaccesstienabled" = "true", "ddosbgpaccess_enabled" = "true", "ddosbgpaccess_ttl" = "180", "ddosdipaccess_enabled" = "true", "ddosdipaccess_ttl" = "180", "ddosdipaccesstienabled" = "true", "sascrackenabled" = "true", "sasdnsenabled" = "true", "sashttpenabled" = "true", "saslocaldns_enabled" = "true", "sasloginenabled" = "true", "sasnetworkenabled" = "true", "sasprocessenabled" = "true", "sassecurityalert_enabled" = "true", "sassecurityhc_enabled" = "true", "sassecurityvul_enabled" = "true", "sassessionenabled" = "true", "sassnapshotaccount_enabled" = "true", "sassnapshotport_enabled" = "true", "sassnapshotprocess_enabled" = "true", "sas_ttl" = "180", "sastienabled" = "true", "apigateway_enabled" = "true", "apigateway_ttl" = "180", "apigatewaytienabled" = "true", "nas_enabled" = "true", "nas_ttl" = "180", "nastienabled" = "true", "appconnect_enabled" = "true", "appconnect_ttl" = "180", "cps_enabled" = "true", "cps_ttl" = "180", "cpstienabled" = "true", "k8sauditenabled" = "true", "k8sauditcollection_policy" = "", "k8sauditttl" = "180", "k8seventenabled" = "true", "k8seventcollection_policy" = "", "k8seventttl" = "180", "k8singressenabled" = "true", "k8singresscollection_policy" = "", "k8singressttl" = "180" } } ``` ```tf title="Negative test num. 1 - tf file" resource "alicloudlogaudit" "example" { display_name = "tf-audit-test" aliuid = "12345678" variable_map = { "actiontrail_enabled" = "true", "actiontrail_ttl" = "180", "actiontrailtienabled" = "true", "ossaccessenabled" = "true", "ossaccessttl" = "7", "osssyncenabled" = "true", "osssyncttl" = "180", "ossaccessti_enabled" = "true", "ossmeteringenabled" = "true", "ossmeteringttl" = "180", "rds_enabled" = "true", "rdsauditcollection_policy" = "", "rds_ttl" = "180", "rdstienabled" = "true", "rdsslowenabled" = "true", "rdsslowcollection_policy" = "", "rdsslowttl" = "180", "rdsperfenabled" = "true", "rdsperfcollection_policy" = "", "rdsperfttl" = "180", "vpcflowenabled" = "true", "vpcflowttl" = "7", "vpcflowcollection_policy" = "", "vpcsyncenabled" = "true", "vpcsyncttl" = "180", "polardb_enabled" = "true", "polardbauditcollection_policy" = "", "polardb_ttl" = "180", "polardbtienabled" = "true", "polardbslowenabled" = "true", "polardbslowcollection_policy" = "", "polardbslowttl" = "180", "polardbperfenabled" = "true", "polardbperfcollection_policy" = "", "polardbperfttl" = "180", "drdsauditenabled" = "true", "drdsauditcollection_policy" = "", "drdsauditttl" = "7", "drdssyncenabled" = "true", "drdssyncttl" = "180", "drdsauditti_enabled" = "true", "slbaccessenabled" = "true", "slbaccesscollection_policy" = "", "slbaccessttl" = "7", "slbsyncenabled" = "true", "slbsyncttl" = "180", "slbaccessti_enabled" = "true", "bastion_enabled" = "true", "bastion_ttl" = "180", "bastiontienabled" = "true", "waf_enabled" = "true", "waf_ttl" = "180", "waftienabled" = "true", "cloudfirewall_enabled" = "true", "cloudfirewall_ttl" = "180", "cloudfirewalltienabled" = "true", "ddoscooaccess_enabled" = "true", "ddoscooaccess_ttl" = "180", "ddoscooaccesstienabled" = "true", "ddosbgpaccess_enabled" = "true", "ddosbgpaccess_ttl" = "180", "ddosdipaccess_enabled" = "true", "ddosdipaccess_ttl" = "180", "ddosdipaccesstienabled" = "true", "sascrackenabled" = "true", "sasdnsenabled" = "true", "sashttpenabled" = "true", "saslocaldns_enabled" = "true", "sasloginenabled" = "true", "sasnetworkenabled" = "true", "sasprocessenabled" = "true", "sassecurityalert_enabled" = "true", "sassecurityhc_enabled" = "true", "sassecurityvul_enabled" = "true", "sassessionenabled" = "true", "sassnapshotaccount_enabled" = "true", "sassnapshotport_enabled" = "true", "sassnapshotprocess_enabled" = "true", "sas_ttl" = "180", "sastienabled" = "true", "apigateway_enabled" = "true", "apigateway_ttl" = "180", "apigatewaytienabled" = "true", "nas_enabled" = "true", "nas_ttl" = "180", "nastienabled" = "true", "appconnect_enabled" = "true",