Giter Club home page Giter Club logo

dotssm's People

Contributors

adrienbaron avatar dependabot[bot] avatar ranisputnik avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

adrienbaron

dotssm's Issues

Support fetching individual parameters by name

While our primary use case is gathering all of an applications config all at once, it is certainly useful to do a simpler fetch by name. We should consider supporting the individual parameter use case also.

Allow hardcoded config values in addition to local ssm file

For testing purposes it might be useful to be able to create getConfig stubs without having to create a local file in the filesystem. My thoughts for how that API works are something like the following:

import { withStub } from 'dot-ssm'
const getConfig = withStub({ some: { namespace: { name: 'Hello, tests' }}})
const config = await getConfig('/some/namespace')
console.log(config) // { "/name": "Hello, tests" } 

The value passed to the withStub method has the exact same constraints of the .ssm.json file and functions in exactly the same way (except it is not loaded from the filesystem).

Replace Terraform with Pulumi

Currently the Terraform state for acceptance tests lives on my machine and is ignored. It would be better to have a remote state solution so we could apply acceptance test infrastructure in CI before running the acceptance tests.

While this could easily be done with Terraform I've wanted to experiment with Pulumi for a while, plus it would be nice to have the whole repo written in Typescript.

Publishing to Github package repository always fails

Github Package doc

Note: GitHub Package Registry only supports scoped NPM packages. Scoped packages have names with the format of @owner/name. Scoped packages always begin with an @ symbol. You may need to update the name in your package.json to use the scoped name. For example, "name": "@codertocat/hello-world-npm".

Currently this package is not scoped. To publish to Github either it needs to be, or we should remove this step from the release workflow (I think removing it for now is the better option).

Support paginating through SSM results

It seems like the maximum number of results that the getParametersByPath SSM function can return is 10. Setting "MaxResults" to anything higher results in the following:

ValidationException: 1 validation error detected: Value '100000' at 'maxResults' 
failed to satisfy constraint: Member must have value less than or equal to 10

We should check for a NextToken in the response and continue pulling results until no NextToken is present.

Support different SSM separators

Currently we assume that groups of parameters in SSM share a common prefix, eg:

/mydomain/someapp/foo
/mydomain/someapp/bar
/mydomain/otherapp/greeting

One other baked in assumption is that a "namespace" for a given group is delineated using the / character. I don't see any reason why we couldn't also support other naming strategies eg:

mydomain.someapp.foo
mydomain.someapp.bar
mydomain.otherapp.greeting

Currently that assumption is used to make creating the .ssm.json file nice and simple. We assume a slash separator whenever we see a nested object, eg:

{
  "foo": {
    "bar": "Something"
  }
}

Becomes /foo/bar in SSM.

If we instead made the .ssm.json file format "dumber" and made it simply:

{
  "/foo/bar": "Something",
  "/foo/baz": "Something else"
}

Then we can remove all of this magic.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.