-
Notifications
You must be signed in to change notification settings - Fork 2
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
Optionally allow specifying 0:n target apps for domain service #39
Conversation
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.
I'm approving, but I don't think the trade-off between the single/plural variable options is clear from the documentation strings. As it is, they say that the singular version has primacy, but I think that should be reversed... I think if you say that the singular one is deprecated and the plural one is new and supported going forward, then it's more obvious that the deprecated single method is a subset of what you can do with the new plural method. (It doesn't change the backward compatibility test that you have at main.tf:4; folks not ready to use the new var will still have a non-null value for the singular variable so nothing will break for them... though we should see if there's a way to warn them about the deprecation if they're using it).
I'm not yet convinced that this should be a deprecation. I think specifying 0 or 1 app is the obvious benefit, and specifying more than 1 is a very niche behavior that I'm not convinced anyone is actually using. The docs say it's for load balancing, but 99% of cases load balancing would be done via horizontal scaling of a single app, not by adding additional apps to your route. Given that, I don't love forcing everyone to remember that they have to pass that option as an array moving forward. |
Co-authored-by: Bret Mogilefsky <[email protected]>
Right, I was going to suggest that the default behavior and documented example would just be to pass an array, even if it just has the one app in it. If you don't agree, then it's just a matter of taste. I'm not overseeing any projects using this module, so I certainly defer to you! |
I think that's what I'd do if I was writing the module from scratch today, but since it's niche behavior and we have existing users I think I'll stick with supporting the singular version as preferred. We can always revisit that decision in the future and deprecate/remove at that point. |
Sounds good to me! |
Closes #12
Created this as a draft to get feedback on while also testing the upgrade path with a real app.