Control: Content Delivery Network custom domains should use at least TLS 1.2 version
Description
This control checks that the Content Delivery Network custom domains uses at least TLS 1.2 version. This control is non-compliant if Content Delivery Network custom domains uses older TLS version.
Usage
Run the control in your terminal:
powerpipe control run terraform_azure_compliance.control.cdn_endpoint_custom_domain_uses_latest_tls_version
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_azure_compliance.control.cdn_endpoint_custom_domain_uses_latest_tls_version --share
SQL
This control uses a named query:
select address as resource, case when (attributes_std -> 'cdn_managed_https' ->> 'tls_version') in ('None', 'TLS10') then 'alarm' when (attributes_std -> 'user_managed_https' ->> 'tls_version') in ('None', 'TLS10') then 'alarm' else 'ok' end status, split_part(address, '.', 2) || case when (attributes_std -> 'cdn_managed_https' ->> 'tls_version') in ('None', 'TLS10') then ' not using the latest version of TLS encryption' when (attributes_std -> 'user_managed_https' ->> 'tls_version') in ('None', 'TLS10') then ' not using the latest version of TLS encryption' else ' using the latest version of TLS encryption' end || '.' reason , path || ':' || start_linefrom terraform_resourcewhere type = 'azurerm_cdn_endpoint_custom_domain';