-
Notifications
You must be signed in to change notification settings - Fork 60
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
[BUG] opensearch_index behavior when trying to delete an index via Terraform #85
Comments
Hey @jlustin I assume you are using the latest version of the provider https://registry.terraform.io/providers/opensearch-project/opensearch/2.0.0 |
@prudhvigodithi I would like to work on this |
Thanks assigned to your @premkirank. |
I am starting on this issue from now. Had been working on some minor bugs etc to get a hang of the repo. Sorry for the delay |
@jlustin I have been able to follow along until step 2 and been able to verify what you have said. I am not able to understand step 3 i.e deleting an index module. How can I delete an index module, is there some API for this? |
Hey @jlustin as per the discussion here #83 (comment), the index should not get deleted when configured an alias using the provider? Can you please confirm if you are using the latest version? Thanks |
@premkirank Thanks for the update. For step 3, I just meant deleting the config of the index from the files |
@prudhvigodithi This was initially produced when using |
Hi both, I'm using v2.1.0 now and seeing the same behavior as initially described. @prudhvigodithi This is the output when I try modifying the alias of an index via the provider; the index would get replaced: |
@jlustin could you just provide a sample for this file after deleting the config. It will help make it clear. |
HI @premkirank : can you please start by the first step (Set aliases for the index. The index will get destroyed and recreated.) |
HI @premkirank @prudhvigodithi Is there any update on the above bug when it will be fixed? Adding an alias to the existing index the index gets deleted :( |
Hey @anuborah thanks for sharing your thoughts, I agree this bug has to be fixed, we can looking for some contributors, is it possible for you to fix this bug by creating a PR? I'm happy to help and troubleshoot here. We can talk more in this slack channel as well https://opensearch.slack.com/archives/C051ZNQ16KG. |
I have a PR open for this bug #212, we can now update the
Example output when the index is created with no aliases
Example terraform apply output when the index is created and aliases is added
Thanks |
Hey @jlustin the index cannot be deleted if the documents are present thats the behavior of the OpenSearch and nothing to do with the terraform provider. |
Closing this issue since the terraform provider 2.3.1 is released with |
What is the bug?
Hi, I am currently looking at ways to delete an index and the behavior I am seeing when modifying a opensearch_index resource is very confusing.
aliases
of an existing index, the index gets destroyed then recreated by Terraform, logs saying that the index must be replaced, in which case the index is destroyed and recreated. However, when modifying other attributes such asnumber_of_replicas
orrefresh_interval
, the index gets updated in place and the index is kept.force_destroy
totrue
or flicking it fromfalse
totrue
, Terraform indicates in the plan that the index is changed, but does not actually destroy the index.Provider configuration not present
. This also happens whether I delete the targeted index manually from the OS dashboard or not; so if I delete the index manually and do not remove the module, the index will get recreated, and if I remove the module, I get that error. I am able to get through this stage by doing astate rm
on the module, but this does not actually delete the index either.How can one reproduce the bug?
Create an index without
aliases
norforce_destroy
:aliases
for the index. The index will get destroyed and recreated.force_destroy
totrue
. Nothing happens to the index.What is the expected behavior?
What is your host/environment?
Do you have any additional context?
Context = I am seeing this behavior when trying to delete an index.
What would be the correct way to achieve deleting an index that was created using the terraform provider? Is this supported somehow?
The text was updated successfully, but these errors were encountered: