opensearch-project / terraform-provider-opensearch

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

[BUG] Cluster settings attempt destruction #53

Open arichtman-srt opened 1 year ago

arichtman-srt commented 1 year ago

What is the bug?

Terraform attempts to delete cluster settings that can never be deleted.

How can one reproduce the bug?

  1. Create a resource block for opensearch_cluster_settings with the minimal properties
  2. Apply this resource block
  3. Remove the resource block or Terraform delete it
  4. Destruction fails

What is the expected behavior?

I'm no OpenSearch wizard but I'm pretty sure a cluster can't function without these. So they were probably there before we even created the resource block and can probably never be deleted. Given they're indestructible, perhaps the provider could throw a warning and simply remove it from state?

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.3.9
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v5.7.0
+ provider registry.terraform.io/opensearch-project/opensearch v1.0.0

Your version of Terraform is out of date! The latest version
is 1.5.2. You can update by downloading from https://www.terraform.io/downloads.html

Do you have any screenshots?

image

image

Do you have any additional context?

No.

arichtman-srt commented 1 year ago

I mean if you think about it the create action should never be possible, only import. But I've no idea if the provider system allows for that.

peterzhuamazon commented 1 year ago

[Triage] Adding @prudhvigodithi to take a look on this. Thanks.

prudhvigodithi commented 11 months ago

Adding @afrodidact to please take a look. Thanks

prudhvigodithi commented 11 months ago

Hey @arichtman-srt is this issue related https://github.com/opensearch-project/terraform-provider-opensearch/issues/60#issuecomment-1714462707 ?

arichtman-srt commented 11 months ago

Looks to be related but I don't know enough about the implementation of providers to say if it's linked in the code base or not.