cyberlabrs / terraform-aws-opensearch

Terraform module to provision an OpenSearch cluster with SAML and Cognito authentication.
Apache License 2.0
31 stars 13 forks source link

Failed to create opensearch domain when multiple subnets specified #12

Closed kumarnmanoj closed 1 year ago

kumarnmanoj commented 1 year ago

Scenario

Need to create opensearch cluster inside a vpc. We have multiple subnets dedicated for Opensearch. Version Used = 0.0.16 Aws provider version = 4.60.0

Configuration used

   name                                           = "app-logs"
  advanced_security_options_enabled              = true
  default_policy_for_fine_grained_access_control = true
  internal_user_database_enabled                 = true
  inside_vpc                                     = true
  vpc                                            = vpc_id
  subnet_ids                                     = [private_subnets]
  allowed_cidrs                                  = [vpc_cidr_block]
  instance_type                                  = "t3.medium.search"
  node_to_node_encryption                        = true
  encrypt_at_rest                                = {
    enabled = true
  }
  volume_size = 100

Output

 ╷
│ Error: creating OpenSearch Domain: ValidationException: You must specify exactly one subnet.
│ 
│   with aws_opensearch_domain.opensearch,
│   on main.tf line 66, in resource "aws_opensearch_domain" "opensearch":
│   66: resource "aws_opensearch_domain" "opensearch" {
│ 
kumarnmanoj commented 1 year ago

Closing the issue. This is the duplicate of - https://github.com/cyberlabrs/terraform-aws-opensearch/issues/7