HIGH
Source
Trivy
ID
AVD-AWS-0048

Elasticsearch domain isn’t encrypted at rest. 

You should ensure your Elasticsearch data is encrypted at rest to help prevent sensitive information from being read by unauthorised users.

Impact 

Follow the appropriate remediation steps below to resolve the issue.

Enable ElasticSearch domain encryption

1
2
3
4
5
6
Resources:
  GoodExample:
    Type: AWS::OpenSearchService::Domain
    Properties:
      EncryptionAtRestOptions:
        Enabled: true
1
2
3
4
5
6
Resources:
  GoodExample:
    Type: AWS::Elasticsearch::Domain
    Properties:
      EncryptionAtRestOptions:
        Enabled: true

Enable ElasticSearch domain encryption

1
2
3
4
5
resource "aws_elasticsearch_domain" "good_example" {
  encrypt_at_rest {
    enabled = true
  }
}