Open arianvp opened 10 months ago
Thanks @arianvp can you please contribute with the fix? Thanks
[Untriage] Adding @premkirank @afrodidact
@prudhvigodithi I would like to work on this
Thanks @premkirank
Thanks for your PR @premkirank. @arianvp the idea for using Provider 2.x is for OpenSearch version 2.x series, did you try with https://registry.terraform.io/providers/opensearch-project/opensearch/1.0.0 for 1.x series of OpenSearch
More info on compatibility: https://github.com/opensearch-project/terraform-provider-opensearch#compatibility, https://github.com/opensearch-project/terraform-provider-opensearch/tree/1.x#compatibility
@prudhvigodithi I'm facing the same issue described above after upgrading to OpenSearch 2.x, I cannot update the opensearch_index_template
resources that were created using provider version 1.0.0. When I upgrade to provider version 2.0.0, the plan says that the new resources will be created.
Hey @sharathganga may I please know what is the OpenSearch cluster version you are using when used 1.0.0
and 2.x
, also can you share the full config file?
Adding @rblcoder @bbarani
@prudhvigodithi I'm using AWS Opensearch version 2.11. The index templates were created when I was using AWS Opensearch 1.3 and provider 1.0.0. After upgrading the cluster 2.11, I cannot update the index template settings using the same provider version 1.0.0.
Upgraded the provider to the latest version 2.2.0 and the terraform plan shows that the index templates will be recreated using the new _index_template
endpoint.
Adding @rblcoder
I had a call with @rblcoder and the behaviour is expected. The _template
is legacy and looks like they replaced by the composable templates. For information about composable templates please check
https://opensearch.org/docs/2.11/im-plugin/index-templates/,
https://opster.com/guides/opensearch/opensearch-data-architecture/index-templating-in-opensearch-how-to-use-composable-templates/
Also the go client olivere/elastic
used routes the requests to _index_templates
@rblcoder @bbarani @peterzhuamazon @gaiksaya please add your thoughts as well.
Tagging index-management owners to please provide some insights on _template
and _index_template
@bowenlan-amzn @getsaurabh02 @lezzago @amsiglan @AWSHurneyt
Thank you
Exact commit in olivere/elastic
that depreciated the _template
.
I have posted a question in the OpenSearch Community https://forum.opensearch.org/t/differences-between-legacy-template-and-index-template/17831
This introduces a nasty bug!
opensearch_index_template
is supposed to call_template
not_index_template
. Now this doesn't behave as documented. The documentation states thatopensearch_composable_index_template
calls_index_template
and you should useopensearch_index_template
onopensearch <2.0
but now both resources use the same endpoint._Originally posted by @arianvp in https://github.com/opensearch-project/terraform-provider-opensearch/pull/62#discussion_r1370749318_