File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
16011612Symmetrically, SOPS can unset a specific part of a YAML or JSON document, by providing
You can’t perform that action at this time.
0 commit comments