Skip to content

Commit 91bb18d

Browse files
feat(azkv): Skipping key-version will get latest key
This is a supported behaviour for Azure Key Vault, and is very helpful when it comes to doing rotation of those keys, as updated versions will automatically get fetched by sops for new files with no changes to the config in the repo. This brings AZKV in line with sops' AWS/GCP integrations, which do not require you to specify a key version. Thank you to felixfontein for some RST syntax help. Converted from getsops/sops@eb23541 Co-authored-by: Drum Ogilvie <me@daogilvie.com> Co-authored-by: Felix Fontein <felix@fontein.de> Signed-off-by: Drum Ogilvie <me@daogilvie.com> Signed-off-by: Felix Fontein <felix@fontein.de>
1 parent 59a0c2c commit 91bb18d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

content/en/docs/_index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,13 @@ identifier for a key. This has the following form:
397397
https://${VAULT_URL}/keys/${KEY_NAME}/${KEY_VERSION}
398398
```
399399
400+
You can omit the version, and have just a trailing slash, and this will use
401+
whatever the latest version of the key is:
402+
403+
```
404+
https://${VAULT_URL}/keys/${KEY_NAME}/
405+
```
406+
400407
To create a Key Vault and assign your service principal permissions on
401408
it from the commandline:
402409
@@ -421,6 +428,15 @@ Now you can encrypt a file using:
421428
``` sh
422429
$ sops encrypt --azure-kv https://sops.vault.azure.net/keys/sops-key/some-string test.yaml > test.enc.yaml
423430
```
431+
<<<<<<< HEAD
432+
=======
433+
434+
or, without the version::
435+
436+
``` sh
437+
$ sops encrypt --azure-kv https://sops.vault.azure.net/keys/sops-key/ test.yaml > test.enc.yaml
438+
```
439+
>>>>>>> 26388ac (feat(azkv): Skipping key-version will get latest key)
424440
425441
And decrypt it using:
426442

0 commit comments

Comments
 (0)