From 6a89de3b3dff240e20cd0668106359596ff4867e Mon Sep 17 00:00:00 2001 From: Ian Maddaus Date: Mon, 20 Nov 2023 15:42:24 -0500 Subject: [PATCH] linting Signed-off-by: Ian Maddaus --- content/infra_language/secrets.md | 40 +++++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/content/infra_language/secrets.md b/content/infra_language/secrets.md index b5f8a24ecb..92189c058b 100644 --- a/content/infra_language/secrets.md +++ b/content/infra_language/secrets.md @@ -27,13 +27,15 @@ Use the following syntax to fetch secrets: secret(name: '', version: '', service: , config: {key: value}) ``` + + Replace the following: `` : The identifier or name for this secret. -`VERSION` -: The secret version. If a service supports versions and you don't provide a version, the Secrets Management Integration helper fetches the latest version. +`` +The secret version. If a service supports versions and you don't provide a version, the Secrets Management Integration helper fetches the latest version. Secret versions supported with: @@ -53,6 +55,8 @@ Replace the following: `config` : Use `config` to set key/value settings passed to a secrets manager. For example, to set the AWS region that a secret is stored in with AWS Secrets Manager, add `config: {region: 'us-west-2'}`. + + ### Set defaults You can set a default service and service configuration and then the Secrets Management Integration helper will use those settings every time you request a secret. @@ -81,6 +85,22 @@ with_secret_service() do end ``` +Define a default secret service and then fetch secrets with different configs: + +```ruby +default_secret_service() + +with_secret_config(key: "") do + secret_1 = secret(name: "") + secret_2 = secret(name: "") +end + +with_secret_config(key: "") do + secret_3 = secret(name: "") + secret_4 = secret(name: "") +end +``` + ## Examples ### Akeyless Vault @@ -130,22 +150,6 @@ Fetch a specific version of an Azure Key Vault secret: secret(name: '', version: 'v1', service: :azure_key_vault) ``` -Define a default secret service and then fetch multiple secrets from different client IDs: - -```ruby -default_secret_service(:azure_key_vault) - -with_secret_config(client_id: "") do - secret_1 = secret(name: "") - secret_2 = secret(name: "") -end - -with_secret_config(client_id: "") do - secret_3 = secret(name: "") - secret_4 = secret(name: "") -end -``` - ### HashiCorp Vault Fetch secrets from HashiCorp Vault using AWS IAM: