-
Notifications
You must be signed in to change notification settings - Fork 134
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
Add support for AWS "OpenSearch"? #218
Comments
It seems that the olivere/elastic library intends to support both. |
Hi @TonyLovesDevOps, thanks for opening an issue. For (1) for now, I would suggest that compatibility mode is used until we either add support explicitly in the provider for opensearch or there are new features that are opensearch specific and we add support for them. We should document that as the expected process for the time being. Update: looks like the compatibility mode can be enabled via the AWS API: hashicorp/terraform-provider-aws#20853, folks could use that as well. For (2), this sounds like an authentication issue, can you confirm that you have network access and the correct credentials available to the provider from the location where it's running? Can you try setting |
For (1), I had to add this block to my lifecycle {
ignore_changes = [ elasticsearch_version, advanced_options ]
} For (2) I'm not sure what was going on, but I "modified" the Access Policy for the domain in the AWS console and saved the exact same policy that was there before, and now everything appears to be working! 🎉 I also made sure I had the latest version (currently |
An example of features that aren't supported would be data_streams, the index_template resource bombs out if a data_stream is specified (which the cluster supports on opensearch_1.0). . │ Error: elastic: Error 400 (Bad Request): unknown key [data_stream] in the template [type=parse_exception] |
Hi @ngamber, can you please share the underlying elasticsearch versions and the resource definition that you're using? To my knowledge datastreams were only included in XPack until ES v7.10 and so may be included in Opensearch, which forked off of ES v7.10, but not in any opendistro version which is based on earlier versions of ES. |
I'm using 2.0.0-beta.2 and Opensearch-1.0. Following the opensearch docs, I've tried adding one to an index template with the previous error.
example template (https://opensearch.org/docs/latest/opensearch/data-streams/) |
actual tf policy:
|
+1 |
Hi @phillbaker, terraform has added the OpenSearch support in aws provider, could you please fix below issue facing in Elasticsearch provider:
FYI: hashicorp/terraform-provider-aws#20853 (comment) CC: @lakshmi-enjeti |
AWS has officially renamed AWS Elasticsearch to OpenSearch after forking Elasticsearch to OpenSearch and Kibana to OpenSearch Dashboards at opensearch.org, because lawyers and 💰.
There are at least two immediate issues with this provider supporting OpenSearch:
version.number: "1.0.0"
from the default endpoint even though it's really ES7.10.2
under the hood so the provider returnsError: ElasticSearch is older than 5.0.0!
when trying to apply changes. This can be worked around by enabling compatibility mode so the domain returns7.10
as its version;Error: no URLs found: no Elasticsearch node available
during a plan operation.Here's a repro for the first problem:
Expected Behavior
Successful apply.
Actual Behavior
Error: ElasticSearch is older than 5.0.0!
returned.The text was updated successfully, but these errors were encountered: