Control: Ensure that the 'log_disconnections' database flag for Cloud SQL PostgreSQL instance is set to 'on'
Description
Enabling the log_disconnections setting logs the end of each session, including the session duration.
Usage
Run the control in your terminal:
powerpipe control run gcp_compliance.control.sql_instance_postgresql_log_disconnections_database_flag_on
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_compliance.control.sql_instance_postgresql_log_disconnections_database_flag_on --share
SQL
This control uses a named query:
sql_instance_postgresql_log_disconnections_database_flag_on