# hashicorp-settings

> Downloads settings from consul/vault and saves them to a file

Latest version **2.1.0** (published 2017-03-23) · jet.com license · 0 weekly downloads

## Install

```sh
npm install hashicorp-settings
pnpm add hashicorp-settings
yarn add hashicorp-settings
bun add hashicorp-settings
```

Provides the command `hashicorp-settings`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2017-03-23 |
| First published | 2017-03-23 |
| Weekly downloads | 0 |
| License | jet.com |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | nicholas.antonov@jet.com |
| Maintainers | nicholasantonov |

## Links

- npm: https://www.npmjs.com/package/hashicorp-settings
- npm.io page: https://npm.io/package/hashicorp-settings

## Recent versions

- 2.1.0 (latest) — 2017-03-23

## README

# Hashicorp Configuration Tool

This tool reads several values from hashicorp consul/vault,
and outputs them to one of several output formats, depending
on the given settings file and cli arguments

## Settings file

The settings file should be a valid JSON file
with a `settings` property. This should be an
array of objects, each with a path to get from
consul/vault, and a key which will be the
key for that value in the output

### Example

```
{
    "settings": [
        {
            "path": "secret/batman/web/foo/abc",
            "key": "alphabet"
        },
        {
            "path": "secret/batman/web/foo/hello",
            "key": "classic"
        },
        {
            "path": "secret/batman/web/bar/baz",
            "key": "bar-key"
        }
    ]
}
```

## Vault Caveat

This tool aims to be isomorphic between its operations
with consul and vault, however, the services have a difference
in that in consul, a path resolves to a value, and in vault, a
path resolves to a key value store. To get around this, when
working with vault, the path actually retrieved from vault is
the path up until the last seperator (`/`). The last token in the
path is then used as the key to grab from that key value.

In the above example, the first example grabs `secret/batman/web/foo`
from vault, then stores the key `abc` from that vk store in the `alphabet`
key in the output

## CLI documentation

run `hashicorp-configuration write -h`

## TODO

* Throw different errors for 404s/auth fails for vault/consul
* Fix flow config to handle dependencies correctly

---
_Source: https://npm.io/package/hashicorp-settings · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
