Skip to content

Conversation

@y-trobinso
Copy link

This patch uses curly brace notation instead of the ARRAY keyword for Redshift group member specification. The default is also now updated to '{}' accordingly.

This should simplify the amount of typing required for specifying group members, as well as making error messages in group specification easier to understand.

let :params do
{
:groupmembers => ['testuser1', 'testuser2'],
:groupmembers => "{\"testuser1\", \"testuser2\"}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I much preferred the prior API. Is it possible to expose the previous API to the caller (array of names) and then do the escaping / formatting yourself inside postgresql::server::dbgroup?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a set of regexp rules to convert puppet arrays to psql arrays.

…uppet array to be passed as input. This makes the following assumptions:

1. A valid puppet array is passed in as input (input is trusted, not supplied by an external party)
2. Users do not contain special characters (such as commas or double quotes)
3. Array syntax from puppet is consistent with its runbook, in re, no square brackets, items appear in the array without surrounding quotes
Copy link
Member

@danielpops danielpops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship It!

@y-trobinso y-trobinso merged commit 294356f into master Aug 1, 2017
@y-trobinso y-trobinso deleted the y-trobinso_fix_dbgroup_array_format branch August 1, 2017 00:09
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

Successfully merging this pull request may close these issues.

3 participants