-
Notifications
You must be signed in to change notification settings - Fork 224
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
SqlDatabaseUser: New DSC resource #1391
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1391 +/- ##
=====================================
+ Coverage 98% 98% +<1%
=====================================
Files 36 37 +1
Lines 5359 5523 +164
=====================================
+ Hits 5253 5417 +164
Misses 106 106 |
Thank you for this @pshamus! I will make sure this gets over the finish line. |
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.
Reviewed 18 of 29 files at r2.
Reviewable status: 18 of 29 files reviewed, all discussions resolved
I will fix integration tests tomorrow, then this is ready to be reviewed. |
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.
Reviewable status: 18 of 29 files reviewed, 1 unresolved discussion (waiting on @pshamus)
README.md, line 839 at r2 (raw file):
Specifies if it is allowed to re-create
Reads wrong, maybe '...resource is allowed to...'
- Updated resource description in README.md
- Updated resource description in README.md - Fix examples to use PsDscRunAsCredential (issue dsccommunity#760).
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.
Nice work! This is much more advanced than my original resource.
Reviewable status: 17 of 38 files reviewed, 2 unresolved discussions (waiting on @johlju)
README.md, line 839 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Specifies if it is allowed to re-create
Reads wrong, maybe '...resource is allowed to...'
Yeah, that sounds better.
README.md, line 818 at r3 (raw file):
* **`[String]` InstanceName** _(Key)_: Specifies the SQL instance in which the database exist. * **`[String]` DatabaseName** _(Key)_: Specifies the name of the database in
I'm curious why you chose to use DatabaseName
instead of Database
as the property name. I used Database
to try and be consistent with other resources, like the SqlDatabaseRole I updated.
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.
Reviewable status: 17 of 38 files reviewed, 1 unresolved discussion (waiting on @johlju and @pshamus)
README.md, line 818 at r3 (raw file):
Previously, pshamus (Paul Shamus) wrote…
I'm curious why you chose to use
DatabaseName
instead ofDatabase
as the property name. I usedDatabase
to try and be consistent with other resources, like the SqlDatabaseRole I updated.
I had two thoughts around that, first that the other properties in the same resource ends with *Name
, so to be consequent with them. Also since it is the name (a string) we should provide in that property, not a database object or something else. Using 'DatabaseName' made it more clear by just reading the name of the property that is should be the name of the database.
We should really ha e a naming standard and fixing that throughout. 🙂
@pshamus Thank you! Yeah, I looked into what one could add for type of users to a database and realized that we would need to do a breaking change to add more user types, so I thought I just make sure it worked out of the box or at least making it less chance that the keys needed to be changed. 😁 Your code helped a lot, and made it a lot easier fixing this! So thank you! 😃 |
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.
Well nicely done! I had a simple use case and didn't need the extra work but this is excellent.
Reviewable status: 17 of 38 files reviewed, 1 unresolved discussion (waiting on @johlju and @pshamus)
README.md, line 818 at r3 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
I had two thoughts around that, first that the other properties in the same resource ends with
*Name
, so to be consequent with them. Also since it is the name (a string) we should provide in that property, not a database object or something else. Using 'DatabaseName' made it more clear by just reading the name of the property that is should be the name of the database.We should really ha e a naming standard and fixing that throughout. 🙂
Makes sense. I originally used DatabaseName for SqlDatabaseRole but switched it because I was following the convention of other resources. Carry on!
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.
Reviewed 7 of 29 files at r2, 5 of 11 files at r3, 2 of 3 files at r4, 4 of 8 files at r5.
Reviewable status: 34 of 39 files reviewed, all discussions resolved
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.
Reviewed 1 of 29 files at r2, 4 of 8 files at r5.
Reviewable status: complete! all files reviewed, all discussions resolved
Pull Request (PR) description
e.g. re-mapping of orphaned logins or a different login. Supports
creating a user with or without login name, and database users mapped
to a certificate or asymmetric key.
$null
for the collation propertywhen the database does not exist (issue SqlDatabase: Get-TargetResource returns a collation even when the database does not exist #1395).
is not part of the configuration (issue SqlDatabase: Enforces collation even if the parameter is not specified in the configuration #1396).
PsDscRunAsCredential
(issue SqlDatabase: Bug in example 1-CreateDatabase.ps1 #760).This Pull Request (PR) fixes the following issues
Task list
Entry should say what was changed, and how that affects users (if applicable).
and comment-based help.
This change is