Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vector search enabled MemoryDB cluster via terraform module #7

Closed
filipecosta90 opened this issue Apr 10, 2024 · 7 comments
Closed

Comments

@filipecosta90
Copy link

via aws-cli we can create the cluster with vector search enabeld by passing the parameter group default.memorydb-redis7.search.preview, as stated in:

To create a vector search enabled MemoryDB cluster, you can use the MemoryDB [create-cluster](https://docs.aws.amazon.com/cli/latest/reference/memorydb/create-cluster.html) command by passing an immutable parameter group default.memorydb-redis7.search.preview to enable the preview mode for vector search capabilities.

However, when I do that via terraform:


module "memory_db" {
  source = "terraform-aws-modules/memory-db/aws"


  engine_version            = "7.1"
  node_type                    = "db.r7g.2xlarge"
  num_shards                 = 1
  
  # Parameter group
  create_parameter_group = false
  parameter_group_family = "default.memorydb-redis7.search.preview"
 (...)
 (...)
}

it's not enabled.
I've confirmed it:

-ERR Command not enabled, instance needs to be configured for Public Preview for Vector Similarity Search
@jeferramirez
Copy link

I have the same problem, can anyone help us, please?

@bryantbiggs
Copy link
Member

bryantbiggs commented May 29, 2024

I don't think you are following the docs correctly, I think you need to do:

module "memory_db" {
  source = "terraform-aws-modules/memory-db/aws"


  engine_version = "7.1"
  node_type      = "db.r7g.2xlarge"
  num_shards     = 1
  
  # Parameter group
  create_parameter_group = false
  parameter_group_name   = "default.memorydb-redis7.search.preview"
  ...
}

@jeferramirez
Copy link

jeferramirez commented May 29, 2024

I don't think you are following the docs correctly, I think you need to do:

module "memory_db" {
  source = "terraform-aws-modules/memory-db/aws"


  engine_version = "7.1"
  node_type      = "db.r7g.2xlarge"
  num_shards     = 1
  
  # Parameter group
  create_parameter_group = false
  parameter_group_name   = "default.memorydb-redis7.search.preview "
  ...
}

I'm getting this error from terraform apply : InvalidParameterValueException: Parameter Group ID specified is not a valid identifier. Identifiers must begin with a letter; must contain only ASCII letters, digits, dots and hyphens; and must not end with a dot or hyphen or contain two consecutive dots or hyphens.

my code:

module "memory_db" {
  source = "terraform-aws-modules/memory-db/aws"


  engine_version = "7.1"
  node_type      = "db.t4g.medium"
  num_shards     = 1
  parameter_group_family = "memorydb_redis7"

  # Parameter group
  create_parameter_group = false
  parameter_group_name   = "default.memorydb-redis7.search.preview "
  ...
}

@bryantbiggs
Copy link
Member

oh, there was an extra whitespace character in the snippet I provided - corrected

@bryantbiggs
Copy link
Member

also, you shouldn't need parameter_group_family = "memorydb_redis7" - thats only used if you are creating a parameter group

@jeferramirez
Copy link

oh, there was an extra whitespace character in the snippet I provided - corrected

Thank you so much this approach works

@bryantbiggs
Copy link
Member

awesome! closing this out then, thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants