AWS OpenSearch inaccessible

Viewed 30

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 _dashboards 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.

resource "aws_elasticsearch_domain" "opensearch" {
    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 = <<CONFIG
    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Action": "es:*",
                "Principal": "*",
                "Effect": "Allow",
                "Resource": "arn:aws:es:${var.aws_region}:${data.aws_caller_identity.current.account_id}:domain/${var.domain}/*"
            }
        ]
    }
    CONFIG

    vpc_options {
        subnet_ids = data.terraform_remote_state.common.outputs.private_subnet_ids
    }

    ebs_options {
      ebs_enabled = true
      volume_size = var.ebs_size
    }

}

Running on version OpenSearch_1.3 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.

Any suggestions welcome!

0 Answers
Related