opensearch-project / terraform-provider-opensearch

https://registry.terraform.io/providers/opensearch-project/opensearch
Apache License 2.0
74 stars 57 forks source link

Support Opensearch Serverless #90

Closed samjgalbraith closed 10 months ago

samjgalbraith commented 11 months ago

Is your feature request related to a problem?

When I try to create a simple resource such as an index in an Opensearch Serverless collection using the Opensearch terraform provider, the apply fails and simply outputs 'Error: EOF'. I do not get the same errors when trying an Opensearch 2 non-serverless domain. I'm not familiar in depth with Golang or the provider but it looks to me like the code is doing a health check and a version check on the collection, which are not succeeding. I can see using Postman that Opensearch Serverless doesn't appear to support the URLs used to return the Opensearch healtcheck or version on the non-serverless implementation - so some accommodation of this difference may be required in the provider somehow.

What solution would you like?

A provider which works for Opensearch Serverless Collections, given the resource you want to manage is supported in the Serverless variety.

What alternatives have you considered?

Not using Terraform to manage resources within the collection.

Do you have any additional context?

I found using healthcheck = false skipped one of the issues, but the provider still appeared to be blocked by the version check failing. I tried using the explicit version on the provider hoping that it would mean it would also skip the version check, but I couldn't find a version string that didn't cause errors about the supported version. This is my provider block

provider "opensearch" {
  aws_profile = var.aws_profile
  aws_signature_service = "aoss"
  url = aws_opensearchserverless_collection.collection.collection_endpoint
  healthcheck = false
}
prudhvigodithi commented 11 months ago

[Untriage] Hey @samjgalbraith thanks for creating this support issue, please take a look and see if you can contribute to this enhancement, also adding @rblcoder @afrodidact @premkirank. Thank you