== How to fix it in AWS OpenSearch

=== Code examples

==== Noncompliant code example

[source,terraform,diff-id=21,diff-type=noncompliant]
----
resource "aws_elasticsearch_domain" "example" {
  domain_name = "example"
  domain_endpoint_options {
    enforce_https = true
    tls_security_policy = "Policy-Min-TLS-1-0-2019-07" # Noncompliant
  }
}
----

==== Compliant solution

[source,terraform,diff-id=21,diff-type=compliant]
----
resource "aws_elasticsearch_domain" "example" {
  domain_name = "example"
  domain_endpoint_options {
    enforce_https = true
    tls_security_policy = "Policy-Min-TLS-1-2-2019-07"
  }
}
----

=== How does this work?

include::../../common/fix/fix.adoc[]
