Control: Check if Cloud SQL instances have SSL turned on
Usage
Run the control in your terminal:
powerpipe control run gcp_compliance.control.require_ssl_sql
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_compliance.control.require_ssl_sql --share
SQL
This control uses a named query:
select self_link resource, case when ip_configuration -> 'requireSsl' is null then 'alarm' else 'ok' end as status, case when ip_configuration -> 'requireSsl' is null then title || ' does not enforce SSL connections.' else title || ' enforces SSL connections.' end as reason , location as location, project as projectfrom gcp_sql_database_instance;