-
Notifications
You must be signed in to change notification settings - Fork 3
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
Improve: TF users #29
Comments
I think @hacklschorsch is partly correct: this complexity is not currently required (as explained in the header of the file). If the content of the file is confusing, the least I can do is to add some comments (adding more "LoC" though).
Maybe we could go down to 30 lines by removing the comments and compacting some expressions w/o changing the code. Though, I bet the
User's definition usually requires an identifier (1 line) AND some attributes like an ssh key (more lines).
OpenToFu works with resources we need to call by name and these requires 2 additional lines to wrap around those attributes.
Partly explained above and also because the resources we create here at the end are NOT the users (not yet, hence the first comment:
If we are referring to
Not entirely true! There is one comment:
Which surely can be improved: the goal is to collect all ssh keys from all the users (hence I will improve the comments first and leave the possible removal of the flexibility it offers (e.g.: re-use of the user's data for other resource or rotation of the ssh keys) for later. |
The code in this repository should be of exemplary quality.
Let's start with something simple.
https://github.com/tahoe-lafs/infrastructure/blob/67392a2a35512ffd175d05448484b280c8791f77/tf/core/users.tf sports 44 lines to define two users.
I am asking myself: If all it does is to define two users, why does it have more than two lines? Or four lines? It has 22 x as many lines. Why?
It also includes two undocumented utility functions with no mention why we have them or what they're good for.
Let's clean this file up!
The text was updated successfully, but these errors were encountered: