Control: PostgreSQL Servers should use at least TLS 1.2 version
Description
This control checks that the PostgreSQL server uses at least TLS 1.2 version. This control is non-compliant if PostgreSQL server uses older TLS version.
Usage
Run the control in your terminal:
powerpipe control run terraform_azure_compliance.control.postgres_db_server_latest_tls_versionSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_azure_compliance.control.postgres_db_server_latest_tls_version --shareSQL
This control uses a named query:
select  address as resource,  case    when (attributes_std ->> 'ssl_minimal_tls_version_enforced') is null or (attributes_std ->> 'ssl_minimal_tls_version_enforced') = 'TLS1_2' then 'ok'    else 'alarm'  end status,  split_part(address, '.', 2) || case    when  (attributes_std ->> 'ssl_minimal_tls_version_enforced') is null or (attributes_std ->> 'ssl_minimal_tls_version_enforced') = 'TLS1_2' then ' using the latest version of TLS encryption'    else ' not using the latest version of TLS encryption'  end || '.' reason    , path || ':' || start_linefrom  terraform_resourcewhere  type = 'azurerm_postgresql_server';