title: AWS OpenSearch inaccessible
body: <p>I recently tried to create an OpenSearch domain via terraform within our VPC, however we are unable to access it (from within the vpc), with the error being that the site cannot be reached when trying to access <code>_dashboards</code> on our URL. This was tested via a ping on an SSH session into the VPC, as well as a peered server which has access to the private subnet infra.</p>
  <pre><code>resource &quot;aws_elasticsearch_domain&quot; &quot;opensearch&quot; {
      domain_name           = var.domain
      elasticsearch_version = var.os_version
  
      cluster_config {
          instance_type = var.instance_type
          instance_count = var.instance_count
          zone_awareness_enabled = true
      }
  
      node_to_node_encryption {
          enabled = true
      }
  
      access_policies = &lt;&lt;CONFIG
      {
          &quot;Version&quot;: &quot;2012-10-17&quot;,
          &quot;Statement&quot;: [
              {
                  &quot;Action&quot;: &quot;es:*&quot;,
                  &quot;Principal&quot;: &quot;*&quot;,
                  &quot;Effect&quot;: &quot;Allow&quot;,
                  &quot;Resource&quot;: &quot;arn:aws:es:${var.aws_region}:${data.aws_caller_identity.current.account_id}:domain/${var.domain}/*&quot;
              }
          ]
      }
      CONFIG
  
      vpc_options {
          subnet_ids = data.terraform_remote_state.common.outputs.private_subnet_ids
      }
  
      ebs_options {
        ebs_enabled = true
        volume_size = var.ebs_size
      }
  
  }
  </code></pre>
  <p>Running on version <code>OpenSearch_1.3</code> incase it's relevant. Uses default security groups (all in, all out) within the VPC, so that shouldn't be an issue when inside the VPC.</p>
  <p>Any suggestions welcome!</p>