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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠