turbot/terraform_gcp_compliance

Query: sql_instance_require_ssl_enabled

Usage

powerpipe query terraform_gcp_compliance.query.sql_instance_require_ssl_enabled

Steampipe Tables

SQL

select
address as resource,
case
when (attributes_std -> 'settings' -> 'ip_configuration' ->> 'require_ssl')::boolean then 'ok' else 'alarm'
end as status,
split_part(address, '.', 2) || case
when (attributes_std -> 'settings') is null then ' ''settings'' is not defined'
when (attributes_std -> 'settings' -> 'ip_configuration') is null then ' ''settings.ip_configuration'' is not defined'
when (attributes_std -> 'settings' -> 'ip_configuration' ->> 'require_ssl') is null
then ' ''settings.ip_configuration.require_ssl'' is not defined'
when (attributes_std -> 'settings' -> 'ip_configuration' ->> 'require_ssl')::boolean then ' enforces SSL connections'
else ' does not enforce SSL connections'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'google_sql_database_instance';

Controls

The query is being used by the following controls: