Created
March 23, 2022 18:49
-
-
Save fourgates/c1ff4b95f106ff6403969f6bf84d73dd to your computer and use it in GitHub Desktop.
creating a secret using the AWS CDK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first, lets generate a secret to be used as credentials for our database | |
const databaseCredentialsSecret = new secretsManager.Secret(this, `${env}-DBCredentialsSecret`, { | |
secretName: `${env}-rds-credentials`, | |
generateSecretString: { | |
secretStringTemplate: JSON.stringify({ | |
username: 'postgres', | |
}), | |
excludePunctuation: true, | |
includeSpace: false, | |
generateStringKey: 'password' | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment