Skip to content

Commit

Permalink
take paths as string. a restrictions from terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
justmiles committed Nov 13, 2017
1 parent 730c631 commit bc56f28
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@
> echo '{"path":"/dev/grafana"}' | get-ssm-params
{"ApplicationParameters":"[]"}
```
or

```
> echo '{"paths":["/dev/default","/dev/grafana"]}' | get-ssm-params
{"ApplicationParameters":"[]"}
```
or

```
> echo '{"paths":"/dev/default /dev/grafana"}' | get-ssm-params
{"ApplicationParameters":"[]"}
```

## Development
Expand Down
2 changes: 2 additions & 0 deletions index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ process.stdin.on 'end', ->
returnApplicationParameters [res]

if parsedData.paths?
if typeof parsedData.paths == 'string'
parsedData.paths = parsedData.paths.split(' ')
async.mapSeries parsedData.paths, ((path, cb) ->
getAllParameters path, null, null, cb
), (err, res) ->
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "get-ssm-params",
"version": "0.0.3",
"version": "0.0.4",
"description": "",
"main": "index.coffee",
"bin": "build/index.js",
Expand Down

0 comments on commit bc56f28

Please sign in to comment.