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

Support Global ParameterStore path for all stages #299

Closed
codezninja opened this issue Sep 16, 2020 · 5 comments · Fixed by #302
Closed

Support Global ParameterStore path for all stages #299

codezninja opened this issue Sep 16, 2020 · 5 comments · Fixed by #302
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@codezninja
Copy link
Contributor

codezninja commented Sep 16, 2020

So instead of duplicating certain values for each environment stage example NewRelic, Datadog, Pagerduty api keys. It might be beneficial to add a Global ParameterStore option when the plugin is initiated.

Example

ParameterStoreBuildWrapperPlugin.globalParameter('<path1>')
                                .globalParameter('<path2>')
                                .init()
@kmanning kmanning added the enhancement New feature or request label Sep 16, 2020
@kmanning kmanning added this to the v5.12 milestone Sep 16, 2020
@kmanning
Copy link
Collaborator

kmanning commented Sep 16, 2020

Neat, I could see that being a useful feature. To clarify, <path1>, <path2> would be exact parameters, and the values of those exact parameters would be added across every environment, yes? Ie: they would NOT be a path, and we would NOT recursively add the values at that path.

@codezninja
Copy link
Contributor Author

Ahh great question. So I wanted to support both exact and recursive. So lets say take NewRelic for example. They have 4-6 different keys. Lets take the 4 most common ones.

  1. REST API Key
  2. License Key
  3. Personal API Key
  4. Personal Admin API Key

Let say in parameter store you have those values stored like so

/new_relic/rest_api_key
/new_relic/license_key
/new_relic/api_key
/new_relic/admin_api_key

I would like to support both these scenarios

Exact

ParameterStoreBuildWrapperPlugin.globalParameter('/new_relic/rest_api_key')
                                .globalParameter('/new_relic/admin_api_key')
                                .init()

Recursive

ParameterStoreBuildWrapperPlugin.globalParameter('/new_relic/', recursive: true)
                                .globalParameter('/datadog/api_key')
                                .init()

@codezninja
Copy link
Contributor Author

I wanted to expose naming option as well. So we can leverage that as well from the plugin

@codezninja codezninja self-assigned this Sep 16, 2020
@kmanning
Copy link
Collaborator

Can you clarify what you mean by exposing the naming function, and how that might work with this new feature?

@codezninja
Copy link
Contributor Author

So ParameterStoreWrapper has a bunch of options so I'm thinking we support

ParameterStoreBuildWrapperPlugin.globalParameter('/new_relic/', [ recursive: true, naming: 'relative' ] )
                                .init()

We can pass an array of options as a second argument

@kmanning kmanning modified the milestones: v5.12, v5.13 Sep 16, 2020
@codezninja codezninja modified the milestones: v5.13, v5.12 Sep 16, 2020
@kmanning kmanning linked a pull request Sep 24, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants