turbot/steampipe-mod-terraform-aws-compliance

Control: Connections to Elasticsearch domains should be encrypted using TLS 1.2

Description

This control checks whether connections to Elasticsearch domains are required to use TLS 1.2. The check fails if the Elasticsearch domain TLSSecurityPolicy is not Policy-Min-TLS-1-2-2019-07.

Usage

Run the control in your terminal:

powerpipe control run terraform_aws_compliance.control.es_domain_encrypted_using_tls_1_2

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run terraform_aws_compliance.control.es_domain_encrypted_using_tls_1_2 --share

SQL

This control uses a named query:

select
address as resource,
case
when (attributes_std -> 'domain_endpoint_options' ->> 'tls_security_policy') = 'Policy-Min-TLS-1-2-2019-07' then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when (attributes_std -> 'domain_endpoint_options' ->> 'tls_security_policy') = 'Policy-Min-TLS-1-2-2019-07' then ' encrypted using TLS 1.2'
else ' not encrypted using TLS 1.2'
end || '.' reason
, path || ':' || start_line
from
terraform_resource
where
type = 'aws_elasticsearch_domain';

Tags