From 8cf141aa2ba425f040f86d008ee412e4a6e39e53 Mon Sep 17 00:00:00 2001 From: "Robert Barnes (DevOps Rob)" Date: Tue, 26 May 2020 20:54:34 +0100 Subject: [PATCH 1/3] updated usage example --- website/pages/docs/secrets/transit/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/docs/secrets/transit/index.mdx b/website/pages/docs/secrets/transit/index.mdx index 0fae68c818ec..2741e1dc2a6f 100644 --- a/website/pages/docs/secrets/transit/index.mdx +++ b/website/pages/docs/secrets/transit/index.mdx @@ -142,7 +142,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 --- ----- From 9a6bc06d6a2d7d9522acb27d39fb775a1359c6df Mon Sep 17 00:00:00 2001 From: Mehdi Ahmadi Date: Mon, 22 Aug 2022 19:53:35 +0200 Subject: [PATCH 2/3] Docs: updated examples with base64 - removed herestring for echo instead that's more simple. --- website/content/api-docs/secret/transit.mdx | 2 +- website/content/docs/secrets/consul.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/content/api-docs/secret/transit.mdx b/website/content/api-docs/secret/transit.mdx index c10a8b744576..4f426b0965f0 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 55fb22026e31..0f5028001244 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 ``` From 9c66590755de36460e3a807015ac78a14f8b715b Mon Sep 17 00:00:00 2001 From: Mehdi Ahmadi Date: Mon, 22 Aug 2022 20:02:49 +0200 Subject: [PATCH 3/3] Docs: updated examples with base64 - removed herestring for echo instead that's more simple. --- changelog/9081.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog/9081.txt diff --git a/changelog/9081.txt b/changelog/9081.txt new file mode 100644 index 000000000000..03045e49dfff --- /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. +```