From 9e20e4128d9bd882499e2e8ab8f7159e8aa5bf3a Mon Sep 17 00:00:00 2001 From: DevOps Rob Date: Wed, 24 Aug 2022 14:03:30 +0100 Subject: [PATCH] updated usage example (#9081) * updated usage example * Docs: updated examples with base64 - removed herestring for echo instead that's more simple. * Docs: updated examples with base64 - removed herestring for echo instead that's more simple. Co-authored-by: Mehdi Ahmadi --- changelog/9081.txt | 4 ++++ website/content/api-docs/secret/transit.mdx | 2 +- website/content/docs/secrets/consul.mdx | 2 +- website/content/docs/secrets/transit/index.mdx | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 changelog/9081.txt diff --git a/changelog/9081.txt b/changelog/9081.txt new file mode 100644 index 000000000..03045e49d --- /dev/null +++ b/changelog/9081.txt @@ -0,0 +1,4 @@ + +```release-note:improvement +website/docs: changed to echo for all string examples instead of (<<<) here-string. +``` diff --git a/website/content/api-docs/secret/transit.mdx b/website/content/api-docs/secret/transit.mdx index c10a8b744..4f426b096 100644 --- a/website/content/api-docs/secret/transit.mdx +++ b/website/content/api-docs/secret/transit.mdx @@ -577,7 +577,7 @@ mechanism for this data as part of a JSON payload is to base64-encode it. Fist, encode the plaintext with base64: ```shell-session -$ base64 <<< "the quick brown fox" +$ echo "the quick brown fox" | base64 dGhlIHF1aWNrIGJyb3duIGZveAo= ``` diff --git a/website/content/docs/secrets/consul.mdx b/website/content/docs/secrets/consul.mdx index 55fb22026..0f5028001 100644 --- a/website/content/docs/secrets/consul.mdx +++ b/website/content/docs/secrets/consul.mdx @@ -131,7 +131,7 @@ management tool. Write a policy and proceed to link it to the role: ```shell-session - $ vault write consul/roles/my-role policy="$(base64 <<< 'key "" { policy = "read" }')" + $ vault write consul/roles/my-role policy="$(echo 'key "" { policy = "read" }' | base64)" Success! Data written to: consul/roles/my-role ``` diff --git a/website/content/docs/secrets/transit/index.mdx b/website/content/docs/secrets/transit/index.mdx index 0bfa8363d..9dcf37717 100644 --- a/website/content/docs/secrets/transit/index.mdx +++ b/website/content/docs/secrets/transit/index.mdx @@ -155,7 +155,7 @@ the proper permission, it can use this secrets engine. mechanism for this data as part of a JSON payload is to base64-encode it. ```text - $ vault write transit/encrypt/my-key plaintext=$(base64 <<< "my secret data") + $ vault write transit/encrypt/my-key plaintext=$(echo "my secret data" | base64) Key Value --- -----