-
Notifications
You must be signed in to change notification settings - Fork 4.4k
(docdb): It should be possible to change the secretName for the created secret #17572
Copy link
Copy link
Closed
Closed
Copy link
Labels
@aws-cdk/aws-docdbRelated to Amazon DocumentDBRelated to Amazon DocumentDBeffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.p1
Description
Description
At the moment, a secret will be created for the docdb if only the username is specified. This is fine, but it would be nice, if it's possible to change the secretname.
Use Case
We grant our projects IAM permissions to read/write secrets on paths on secretsmanager. The autogenerated names don't match on the paths we allow them to access.
Proposed Solution
Add a property
export interface Login {
/**
* The name of the secret that will be created
* @default undefined
*/
readonly secretName?: string;
...and change this accordingly
// Create the secret manager secret if no password is specified
let secret: DatabaseSecret | undefined;
if (!props.masterUser.password) {
secret = new DatabaseSecret(this, 'Secret', {
username: props.masterUser.username,
encryptionKey: props.masterUser.kmsKey,
excludeCharacters: props.masterUser.excludeCharacters,
secretName: props.masterUser.secretName, //added
});
}Other information
that's it
Acknowledge
- I may be able to implement this feature request
- This feature might incur a breaking change
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-docdbRelated to Amazon DocumentDBRelated to Amazon DocumentDBeffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.p1