https://github.com/sgmac/vault-mv
copy or move secrets in Vault
https://github.com/sgmac/vault-mv
go golang vault
Last synced: 5 months ago
JSON representation
copy or move secrets in Vault
- Host: GitHub
- URL: https://github.com/sgmac/vault-mv
- Owner: sgmac
- Created: 2020-01-14T21:04:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-14T21:07:00.000Z (over 6 years ago)
- Last Synced: 2024-06-20T03:32:40.104Z (about 2 years ago)
- Topics: go, golang, vault
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vault-mv
Simple tool to copy/move secrets in Vault.
## Install
```
$ git clone https://github.com/sgmac/vault-mv
$ go build
```
## Usage
Create a token and export *VAULT_TOKEN*
`$ vault token create -policy=YOUR_POLICY`
Copying secrets from one environment to a new one.
```
$ vault-mv secret/stg secret/ent
copying secret/stg/app/provider/aws to secret/ent/app/provider/aws
copying secret/stg/app/provider/gcp to secret/ent/app/provider/gcp
copying secret/stg/password to secret/ent/password
copying secret/stg/redis_url to secret/ent/redis_url
copying secret/stg/username to secret/ent/username
```
If the flag preserve data is disabled `-p=false`, the data is moved (source is deleted).