terraform-provider-opensearch icon indicating copy to clipboard operation
terraform-provider-opensearch copied to clipboard

[BUG] Cluster settings attempt destruction

Open arichtman-srt opened this issue 1 year ago • 5 comments

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 avatar Jul 12 '23 05:07 arichtman-srt

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.

arichtman-srt avatar Jul 13 '23 00:07 arichtman-srt

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

peterzhuamazon avatar Jul 18 '23 19:07 peterzhuamazon

Adding @afrodidact to please take a look. Thanks

prudhvigodithi avatar Oct 07 '23 17:10 prudhvigodithi

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

prudhvigodithi avatar Oct 08 '23 00:10 prudhvigodithi

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.

arichtman-srt avatar Oct 08 '23 23:10 arichtman-srt