Skip to content

Commit e53a000

Browse files
committed
Document getsops/sops#1876 and --value-stdin.
Converted from getsops/sops@d9be059 Signed-off-by: Felix Fontein <felix@fontein.de>
1 parent 9775459 commit e53a000

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

content/en/docs/_index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,6 +1596,17 @@ The value must be formatted as json.
15961596
$ sops set ~/git/svc/sops/example.yaml '["an_array"][1]' '{"uid1":null,"uid2":1000,"uid3":["bob"]}'
15971597
```
15981598
1599+
You can also provide the value from a file or stdin:
1600+
1601+
``` sh
1602+
# Provide the value from a file
1603+
$ echo '{"uid1":null,"uid2":1000,"uid3":["bob"]}' > /tmp/example-value
1604+
$ sops set ~/git/svc/sops/example.yaml --value-file '["an_array"][1]' /tmp/example-value
1605+
1606+
# Provide the value from stdin
1607+
$ echo '{"uid1":null,"uid2":1000,"uid3":["bob"]}' | sops set ~/git/svc/sops/example.yaml --value-stdin '["an_array"][1]'
1608+
```
1609+
15991610
## Unset a sub-part in a document tree
16001611
16011612
Symmetrically, SOPS can unset a specific part of a YAML or JSON document, by providing

0 commit comments

Comments
 (0)