You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+72-3
Original file line number
Diff line number
Diff line change
@@ -208,7 +208,43 @@ If you omit `--in` Teller will take `stdin`, and if you omit `--out` Teller will
208
208
209
209
You can detect _secret drift_ by comparing values from different providers against each other. It might be that you want to pin a set of keys in different providers to always be the same value; when they aren't -- that means you have a drift.
210
210
211
-
For this, you first need to label values as `source` and couple with the appropriate sink as `sink` (use same label for both to couple them). Then, source keys will be compared against other keys in your configuration:
211
+
In most cases, keys in providers would be similar which we call _mirrored_ providers. Example:
212
+
213
+
```
214
+
Provider1:
215
+
MG_PASS=foo***
216
+
217
+
Provider2:
218
+
MG_PASS=foo*** # Both keys are called MG_PASS
219
+
```
220
+
221
+
To detected mirror drifts, we use `teller mirror-drift`.
As always, the specific provider definitions are in your `teller.yml` file.
233
+
## :beetle: Detect secrets and value drift (non-mirrored providers)
234
+
235
+
Some times you want to check drift between two providers, and two unrelated keys. For example:
236
+
237
+
```
238
+
Provider1:
239
+
MG_PASS=foo***
240
+
241
+
Provider2:
242
+
MAILGUN_PASS=foo***
243
+
```
244
+
245
+
This poses a challenge. We need some way to "wire" the keys `MG_PASS` and `MAILGUN_PASS` and declare a relationship of source (`MG_PASS`) and destination, or sink (`MAILGUN_PASS`).
246
+
247
+
For this, you can label mappings as `source` and couple with the appropriate sink as `sink` (use same label value forboth to wire them together). Then, source values will be compared against sink valuesin your configuration:
212
248
213
249
```yaml
214
250
providers:
@@ -259,9 +295,42 @@ Will get you, assuming `FOO_BAR=Spock`:
259
295
Hello, Spock!
260
296
```
261
297
262
-
## :bike: Multi-write, rotation & sync
298
+
## :arrows_counterclockwise: Copy/sync data between providers
299
+
300
+
In cases where you want to sync between providers, you can do that with `teller copy`.
301
+
302
+
303
+
**Specific mapping key sync**
304
+
305
+
```bash
306
+
$ teller copy --from dotenv1 --to dotenv2,heroku1
307
+
```
308
+
309
+
This will:
310
+
311
+
1. Grab all mapped values from source (`dotenv1`)
312
+
2. For each target provider, find the matching mapped key, and copy the value from source into it
0 commit comments