terraform-provider-opensearch
terraform-provider-opensearch copied to clipboard
[BUG] Cluster settings attempt destruction
What is the bug?
Terraform attempts to delete cluster settings that can never be deleted.
How can one reproduce the bug?
- Create a resource block for
opensearch_cluster_settings
with the minimal properties - Apply this resource block
- Remove the resource block or Terraform delete it
- 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?
Do you have any additional context?
No.
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.
[Triage] Adding @prudhvigodithi to take a look on this. Thanks.
Adding @afrodidact to please take a look. Thanks
Hey @arichtman-srt is this issue related https://github.com/opensearch-project/terraform-provider-opensearch/issues/60#issuecomment-1714462707 ?
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.