opensearch-project / terraform-provider-opensearch

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

[BUG] opensearch_cluster_settings unable to apply cluster_max_shards_per_node #59

Closed arichtman-srt closed 1 year ago

arichtman-srt commented 1 year ago

What is the bug?

opensearch_cluster_settings unable to apply cluster_max_shards_per_node

How can one reproduce the bug?

image

What is the expected behavior?

Terraform is able to apply the changes, cluster query show the updated value.

What is your host/environment?

$ uname -a && terraform -version
Darwin bne-nb-ariel 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun  8 22:21:34 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8112 arm64 arm Darwin
Terraform v1.5.3
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v4.62.0
+ provider registry.terraform.io/hashicorp/external v2.3.1
+ provider registry.terraform.io/hashicorp/local v2.4.0
+ provider registry.terraform.io/hashicorp/null v3.2.1
+ provider registry.terraform.io/hashicorp/random v3.5.1
+ provider registry.terraform.io/opensearch-project/opensearch v1.0.0
+ provider registry.terraform.io/phillbaker/elasticsearch v2.0.4

Do you have any screenshots?

All using the same user as the Terraform provider configuration

  1. Query the cluster for max shards
  2. Inspect the json payload file
  3. Send the request
  4. Query the cluster for max shards to confirm

image

Do you have any additional context?

prudhvigodithi commented 1 year ago

[Untriage] Hey @arichtman-srt, from your screenshot it was changed from 1000 to 1001, so you are trying to change to 999? AFAIK OpenSearch rejects any request that creates more shards than this limit allows, can you confirm if this is coming from OpenSearch or actual issue with the provider? Adding @phillbaker @bbarani

arichtman-srt commented 1 year ago

I'm unable to replicate the error, thanks for your time and sorry!