phillbaker / terraform-provider-elasticsearch

An elasticsearch provider for terraform
https://registry.terraform.io/providers/phillbaker/elasticsearch
Mozilla Public License 2.0
304 stars 134 forks source link

OpenSearch: version detection doesn't work #322

Closed albgus closed 1 year ago

albgus commented 1 year ago

Attempting to use this provider with an OpenSearch cluster produces the following error: Error: ElasticSearch version 2.3.0 is older than 6.0.0 and is not supported, flavor: 0.

It appears the provider doesn't properly detect that it's an OpenSearch cluster with a different version scheme.

Workaround: Set elasticsearch_version = "7.10.2"

Terraform version:

Terraform v1.3.2
on darwin_amd64
+ provider registry.terraform.io/phillbaker/elasticsearch v2.0.6
phillbaker commented 1 year ago

This is intentional. It is due to this line: https://github.com/phillbaker/terraform-provider-elasticsearch/blob/1ff79e7de71161651f5fe64d73366aab778ea663/es/provider.go#L478.

We don't have testing support yet for OpenSearch 2.x and it does have breaking api features, so the provider hasn't incorporated support for it. This provider won't include support for opensearch 2.x, that will be done in https://github.com/opensearch-project/terraform-provider-opensearch