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

[BUG] Not able to create opensearch index via terraform in AWS cloud, seems there is issue with provider Version 2.3.1 #220

Open
AvneeshB opened this issue Oct 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@AvneeshB
Copy link

What is the bug?

terrafrom: OpenSearch index throws error below.

[BUG] Error: HEAD HealthCheck failed: This is usually due to network or permission issues. The underlying error isn't accessible, please debug by disabling health checks.

Files:
provider.tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "> 5.48"
}
opensearch = {
source = "opensearch-project/opensearch"
version = "
> 2.3.1"
}
}
}

Main.tf
resource "opensearch_index" "kb" {
name = "bedrock-name_of _index"
number_of_shards = "2"
number_of_replicas = "0"
index_knn = true

mappings = <<-EOF
{
"properties": {
"bedrock-knowledge-base-default-vector": {
"type": "knn_vector",
"dimension": 1536,
"method": {
"name": "hnsw",
"engine": "faiss",
"parameters": {
"m": 16,
"ef_construction": 512,
"ef_search": 512
},
"space_type": "l2"
}
},
"AMAZON_BEDROCK_METADATA": {
"type": "text",
"index": "false"
},
"AMAZON_BEDROCK_TEXT_CHUNK": {
"type": "text",
"index": "true"
}
}
}
EOF
force_destroy = true
}

How can one reproduce the bug?

Plan + apply an index using v2.3.1 of the opensearch provider

What is the expected behavior?

Should be able to create index in AWS OpenSearch.

What is your host/environment?

Terraform Cloud

Do you have any screenshots?

No

Do you have any additional context?

trying to create knowledge base in aws bedrock with the help of below link. getting stuck 2 places. One is OpenSearch index creation.

https://dev.to/aws-builders/how-to-manage-an-amazon-bedrock-knowledge-base-using-terraform-2688

@Divyaasm
Copy link

Hi @AvneeshB , can you please try again with this example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📦 Backlog
Development

No branches or pull requests

3 participants