Skip to content

Commit e2ab2c7

Browse files
committed
Prefer proper code blocks.
Signed-off-by: Felix Fontein <felix@fontein.de>
1 parent 9b64e23 commit e2ab2c7

1 file changed

Lines changed: 25 additions & 11 deletions

File tree

content/en/docs/_index.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,12 @@ environment variable as a comma separated list. The default order is
196196
If you want to test **SOPS** without having to do a bunch of setup, you
197197
can use the example files and pgp key provided with the repository:
198198

199-
$ git clone https://github.com/getsops/sops.git
200-
$ cd sops
201-
$ gpg --import pgp/sops_functional_tests_key.asc
202-
$ sops edit example.yaml
199+
``` sh
200+
$ git clone https://github.com/getsops/sops.git
201+
$ cd sops
202+
$ gpg --import pgp/sops_functional_tests_key.asc
203+
$ sops edit example.yaml
204+
```
203205

204206
This last step will decrypt `example.yaml` using the test private key.
205207

@@ -304,11 +306,15 @@ projects/my-project/locations/global/keyRings/sops/cryptoKeys/sops-key ENCRYPT_D
304306
305307
Now you can encrypt a file using:
306308
307-
$ sops encrypt --gcp-kms projects/my-project/locations/global/keyRings/sops/cryptoKeys/sops-key test.yaml > test.enc.yaml
309+
``` sh
310+
$ sops encrypt --gcp-kms projects/my-project/locations/global/keyRings/sops/cryptoKeys/sops-key test.yaml > test.enc.yaml
311+
```
308312
309313
And decrypt it using:
310314
311-
$ sops decrypt test.enc.yaml
315+
``` sh
316+
$ sops decrypt test.enc.yaml
317+
```
312318
313319
## Encrypting using Azure Key Vault
314320
@@ -358,7 +364,9 @@ is the client secret.
358364
Encrypting/decrypting with Azure Key Vault requires the resource
359365
identifier for a key. This has the following form:
360366
361-
https://${VAULT_URL}/keys/${KEY_NAME}/${KEY_VERSION}
367+
```
368+
https://${VAULT_URL}/keys/${KEY_NAME}/${KEY_VERSION}
369+
```
362370
363371
To create a Key Vault and assign your service principal permissions on
364372
it from the commandline:
@@ -381,11 +389,15 @@ https://sops.vault.azure.net/keys/sops-key/some-string
381389
382390
Now you can encrypt a file using:
383391
384-
$ sops encrypt --azure-kv https://sops.vault.azure.net/keys/sops-key/some-string test.yaml > test.enc.yaml
392+
``` sh
393+
$ sops encrypt --azure-kv https://sops.vault.azure.net/keys/sops-key/some-string test.yaml > test.enc.yaml
394+
```
385395
386396
And decrypt it using:
387397
388-
$ sops decrypt test.enc.yaml
398+
``` sh
399+
$ sops decrypt test.enc.yaml
400+
```
389401
390402
## Encrypting and decrypting from other programs
391403
@@ -661,8 +673,10 @@ example policy is shown below.
661673
You can specify a role in the `--kms` flag and `SOPS_KMS_ARN` variable
662674
by appending it to the ARN of the master key, separated by a **+** sign:
663675
664-
<KMS ARN>+<ROLE ARN>
665-
arn:aws:kms:us-west-2:927034868273:key/fe86dd69-4132-404c-ab86-4269956b4500+arn:aws:iam::927034868273:role/sops-dev-xyz
676+
```
677+
<KMS ARN>+<ROLE ARN>
678+
arn:aws:kms:us-west-2:927034868273:key/fe86dd69-4132-404c-ab86-4269956b4500+arn:aws:iam::927034868273:role/sops-dev-xyz
679+
```
666680
667681
## AWS KMS Encryption Context
668682

0 commit comments

Comments
 (0)