Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(docdb): It should be possible to change the secretName for the created secret #17572

Closed
1 of 2 tasks
markussiebert opened this issue Nov 18, 2021 · 1 comment · Fixed by #17574
Closed
1 of 2 tasks
Labels
@aws-cdk/aws-docdb Related to Amazon DocumentDB effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on. p1

Comments

@markussiebert
Copy link
Contributor

markussiebert commented Nov 18, 2021

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
@markussiebert markussiebert added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 18, 2021
@github-actions github-actions bot added the @aws-cdk/aws-docdb Related to Amazon DocumentDB label Nov 18, 2021
@skinny85 skinny85 removed their assignment Nov 18, 2021
@skinny85 skinny85 added effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1 and removed needs-triage This issue or PR still needs to be triaged. labels Nov 18, 2021
@mergify mergify bot closed this as completed in #17574 Nov 22, 2021
mergify bot pushed a commit that referenced this issue Nov 22, 2021
fixes: #17572
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Feb 21, 2022
…17574)

fixes: aws#17572
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-docdb Related to Amazon DocumentDB effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants