-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new resource to manage SLM policies #22
Conversation
If
|
It is not a problem to remove the block if it creates a better user experience.
Could you, please, share more info on this? What errors have you encountered while testing this resource? Or do you mean there are some open issues in the terraform plugin SDK regarding the blocks we might need to be aware of? |
Sure @olksdr , here's an example bug we have on the cloud provider, where multiple It's a bug with That's why I'd like to avoid blocks when we can, seems like TF isn't quite mature with those. |
@Kushmaro I still do not see how the linked issue with
Have you looked into the workarounds proposed in hashicorp/terraform-plugin-sdk#195 with Are there any issues in any resources related to using blocks in the |
@olksdr it's not directly related, it's just an exemplifier of blocks misbehaving with In any case, from a UX perspective, the argument still holds that there's no value in having a dedicated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I think a good argument is that it models the current request body being sent to Elasticsearch. Having it flattened opens up the potential for naming conflicts. What do we do if the config or retention blocks ever get a parameter that has the same name? I would personally vote that we should add the config back to protect ourselves from any conflicts in the future. |
IMHO API clients (SDKs, UIs, CLIs) should be concerned with simplifying UX for the customers using them. In the same way that the UI doesn't expose itself in the same exact manner that the API is written, so shouldn't the terraform provider. It should abstract some of the complexity. If in the future there would be another "indices" setting that is not "config.indices" (i.e not nested) I'd argue that the API design is a bit flawed. We can tackle such issues when we encounter them. If we prep for any worst-case scenarios, we just increase the complexity of use in the present time, just for sake of avoiding unwanted, yet to happen, futures. |
Add new SLM resource, which will allow to create and update the snapshot lifecycle policies.
closes #21