So I’m about to “push” a module out into the wild, but it can be a single module with multiple resources or multiple modules depending on how I slice things. From a “formality” perspective I’m curious as to guidelines as to when to split and when to combine things.
What was written:
With some guidance from Don Jones in another thread, I wrote a DSC Module/Resource that will compare the local configuration certificate thumbprint against the local computer store (with filters so the admin can define what the “best” cert to use is), and if the two don’t match it copies the public key of the cert to a UNC path for build-bots (or whatever you like to call those boxes you generate the mofs on) to leverage.
The other resource isn’t a DSC resource at all: its a function that takes in the configurationdata hashtable and modifies the nodes by adding thumbprint and cert path information to each node if a matching certificate is found in said path. In other words you can run it against your configuration data before piping it into your configuration … this way you can literally push the proper settings and sign passwords with the appropriate cert.
So the function and DSC resource are pretty tightly coupled… but they really have very separate uses (only one is for the target nodes). In this scenario would you generally recommend two modules be made? Or error on the side of putting them as separate resources in the same module because they are so closely related?