Control: NoSQL tables with stale data should be reviewed
Description
If the data has not changed recently and has become stale, the table should be reviewed.
Usage
Run the control in your terminal:
powerpipe control run oci_thrifty.control.nosql_table_stale_dataSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run oci_thrifty.control.nosql_table_stale_data --shareSteampipe Tables
SQL
select a.id as resource, case when date_part('day', now()-(time_updated::timestamptz)) > $1 then 'alarm' else 'ok' end as status, a.title || ' was changed ' || date_part('day', now()-(time_updated::timestamptz)) || ' day(s) ago.' as reason, coalesce(c.name, 'root') as compartment , a.regionfrom oci_nosql_table as a left join oci_identity_compartment as c on c.id = a.compartment_id;
Params
| Args | Name | Default | Description | Variable |
|---|---|---|---|---|
| $1 | nosql_table_stale_data_max_days | | The maximum number of days table data can be unchanged before it is considered stale. |