Skip to content
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 a DSC Authoring document detailing design pattern for Single Instance resources #133

Closed
PlagueHO opened this issue Jan 15, 2016 · 4 comments

Comments

@PlagueHO
Copy link
Member

At the moment there is no recommended design pattern for authoring DSC Resources where only a single instance can be used on a node. A method has been documented (here)[http://blogs.msdn.com/b/powershell/archive/2015/06/23/want-to-write-a-dsc-resource-where-only-a-single-instance-can-be-configured.aspx]

Could I suggest a new document is created /dsc/AuthoringResourceSingleInstance.md that contains the information @TravisEz13 provided in his blog article?

@ghost
Copy link

ghost commented Apr 5, 2016

@PlagueHO @TravisEz13, I have a new topic in my working branch on this:
https://github.com/PowerShell/PowerShell-Docs/blob/esles-working/dsc/singleInstance.md

Would you be willing to take a look at the topic and let me know what you think before I publish it live?

I didn't include the class-based example, as I thought it was out-of-scope for this particular topic, but I'm considering using xTimeZone as a script vs. class resource example for another topic.

Thanks!!

@PlagueHO
Copy link
Member Author

PlagueHO commented Apr 5, 2016

@eslesar:
Looking pretty good to me - couple of things:

  • Resource typo (spelled "Resoource").
  • It is probably fairly obvious, but could we add some detail as to why/what happens when a resource is not unique? E.g. (addition in bold).
    "Because of this, a configuration such as the one above would compile and run without warning. This would cause the configuration to be repeatedly applied to the node, cycling the timezone back and forth."
  • Some of the { and } need to be on new lines in the "Updated script:" so that it matches the DSC resource style guidelines (although this really is me being a bit too nit picky and is because the original DSC Resource doesn't meet them 😄 ). I'll submit a PR to update the xTimezone resource.

Other than those minor points the doc look great to me.

@ghost
Copy link

ghost commented Apr 5, 2016

Thanks for the input, @PlagueHO! Changes made and issue addressed with #271

@ghost ghost closed this as completed Apr 5, 2016
@PlagueHO
Copy link
Member Author

PlagueHO commented Apr 5, 2016

@eslesar - nice! Thank you very much 👍 I've submitted a PR to the xTimezone repo to ensure the code adheres to the styleguidelines. Once accepted I'll pop a PR through to update the code samples in this document. Thanks again.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant