create Secret with namy generated password/keys with CDK

0

Hi team,

I want to create a secret via CDK that contains 2 passwords (API keys)

secretName = ApiKeys

keys/values =

  • key: password1, value: auto-generated password (current)

  • key: password2, value: auto-generated password (previous)

the CDK syntax I found allows only to create a secret with one secret inside it, is there a way to create a secret in a secret manager with many generated secrets inside it? any snippet code would be helpful.

Thank you.

1回答
0

Here is a example of secrets creation using SAM. You can potentially update line 113 for SecretString in this file to create multiple KVs.

Hope that helps.

AWS
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ