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

(redshift): expose User.secret as property #17520

Closed
1 of 2 tasks
Ahmed-Hussein93 opened this issue Nov 16, 2021 · 4 comments · Fixed by #20078
Closed
1 of 2 tasks

(redshift): expose User.secret as property #17520

Ahmed-Hussein93 opened this issue Nov 16, 2021 · 4 comments · Fixed by #20078
Labels
@aws-cdk/aws-redshift Related to Amazon Redshift effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1

Comments

@Ahmed-Hussein93
Copy link
Contributor

Ahmed-Hussein93 commented Nov 16, 2021

Description

Currently there is no way to access the secret created by Redshift User construct and that make it difficult to use method addRotationMultiUser to rotate the user credentials.
https://github.com/aws/aws-cdk/blob/v1.132.0/packages/@aws-cdk/aws-redshift/lib/user.ts#L150
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-redshift.User.html

Use Case

  1. The secret needed to allow redshift cluster rotating the credentials, function addRotationMultiUser accept only secret.
  2. The secret ARN is needed by other services, for example creating IAM Policy and need to scope down the resources only to this secret.

Proposed Solution

The solution to add Property called secret that will return the secret created https://github.com/aws/aws-cdk/blob/v1.132.0/packages/@aws-cdk/aws-redshift/lib/user.ts#L150

Other information

No response

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@Ahmed-Hussein93 Ahmed-Hussein93 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 16, 2021
@github-actions github-actions bot added the @aws-cdk/aws-secretsmanager Related to AWS Secrets Manager label Nov 16, 2021
@Ahmed-Hussein93
Copy link
Contributor Author

This should be labeled @aws-cdk/aws-redshift

@njlynch njlynch changed the title How to access the secret created by User construct? (redshift): expose User.secret as property Nov 29, 2021
@njlynch njlynch added @aws-cdk/aws-redshift Related to Amazon Redshift effort/small Small work item – less than a day of effort p1 and removed @aws-cdk/aws-secretsmanager Related to AWS Secrets Manager needs-triage This issue or PR still needs to be triaged. labels Nov 29, 2021
@njlynch
Copy link
Contributor

njlynch commented Nov 29, 2021

Sure, this seems reasonable. We welcome community contributions! If you are able, we encourage you to contribute.

@njlynch njlynch removed their assignment Nov 29, 2021
Ahmed-Hussein93 added a commit to Ahmed-Hussein93/aws-cdk that referenced this issue Apr 25, 2022
Ahmed-Hussein93 added a commit to Ahmed-Hussein93/aws-cdk that referenced this issue Apr 25, 2022
Ahmed-Hussein93 added a commit to Ahmed-Hussein93/aws-cdk that referenced this issue Apr 26, 2022
@mergify mergify bot closed this as completed in #20078 Apr 27, 2022
mergify bot pushed a commit that referenced this issue Apr 27, 2022
This change will expose Redshift User.secret as property and close #17520
----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*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.

@manmartgarc
Copy link

Is there a reason why this method was not also defined in the IUser interface?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-redshift Related to Amazon Redshift effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants