Closed jmurillo9 closed 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
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.
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 ?
Is your feature request related to a problem?
The majority of the
resources
available in the2.2.0
provider require you to use an heredoc syntax where you have to put an entire JSON blob to provision the resource in question. It would be amazing if we could update the schema of all the resources so that they following the standard Terraform schema of key:value pairs.The audit_config resource is already setup correctly.
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.