opensearch-project / terraform-provider-opensearch

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

[FEATURE] Upgrade Provider to Use Native Terraform Schema #161

Closed jmurillo9 closed 3 months ago

jmurillo9 commented 4 months ago

Is your feature request related to a problem?

What solution would you like?

What alternatives have you considered?

As of right now, I have to rely on the templatefile function to render a JSON blob that works with the resource in question so that I can deploy things at scale. While I've gotten by so far, it's made the complexity of the code that much more complex and having to deal with a lot of nested objects.

prudhvigodithi commented 3 months ago

[Triage] Hey @jmurillo9 thanks and I agree we should transform the terraform schema of key:value pairs as much as possible but sometimes relying on templatefile or JSON blob is better for cases where we dont have to worry about adding/modifying key:value based on the OpenSearch resource changes, with this the terraform resource will not break if there is an update from OpenSearch resource. I'm open for discussion if we have to go half and half based on the scenarios. We can also discuss this in OpenSearch public slack https://opensearch.org/slack.html.

Adding @rblcoder @bbarani

jmurillo9 commented 3 months ago

Thank you for reviewing this @prudhvigodithi and the explanation. That makes sense. I suppose I didn't realize how frequent the OpenSearch resource itself would be actually changing.

prudhvigodithi commented 3 months ago

Thanks @jmurillo9, the change depends on the release, but OpenSearch follows strict SemVer so any breaking change would be in major release. For the OpenSearch terraform provider we already have the branching https://github.com/opensearch-project/terraform-provider-opensearch?tab=readme-ov-file#version-and-branching https://github.com/opensearch-project/terraform-provider-opensearch/blob/main/COMPATIBILITY.md where we can update the provider accordingly ( with add/remove/modify key:value pairs) and release it. WDYT @jmurillo9 ?