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

(secretsmanager): RDS_DB_CLUSTER/INSTANCE is not available as an attachment type #14059

Closed
quixoticmonk opened this issue Apr 8, 2021 · 4 comments
Labels
@aws-cdk/aws-secretsmanager Related to AWS Secrets Manager bug This issue is a bug. effort/small Small work item – less than a day of effort jsii This issue originates in jsii, or this feature must be implemented in jsii. p2

Comments

@quixoticmonk
Copy link

Description of the bug:

Python documentation for SecretAttachmentTargetProps refers to using "AttachmentTargetType" as target_type object value. The available values are

  • CLUSTER
  • REDSHIFT_CLUSTER
  • DOCDB_DB_CLUSTER

CLUSTER is marked as deprecated and is recommended to use RDS_DB_CLUSTER which is unavailable in the selections.

Screen Shot 2021-04-08 at 2 34 30 PM
Screen Shot 2021-04-08 at 2 34 50 PM

Reproduction Steps

  • Create a DatabaseSecret entity
  • Attempt to attach a cluster endpoint with the secret created
  • Reference the SecretAttachmentTargetProps which has a target_type argument.
  • Try to bring up the available selections of the target type from secretsmanager.AttachmentTargetType

What did you expect to happen?

Expected the recommended selection to be present as the targettype

What actually happened?

The deprecated value is present , but the recommended value is not.

Environment

  • CDK CLI Version : 1.96.0
  • Node.js Version: 10.24
  • OS : Linux ( Cloud9)
  • Language (Version): Python 3.9

This is 🐛 Bug Report

@quixoticmonk quixoticmonk added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 8, 2021
@github-actions github-actions bot added the @aws-cdk/aws-secretsmanager Related to AWS Secrets Manager label Apr 8, 2021
@njlynch
Copy link
Contributor

njlynch commented Apr 9, 2021

Thanks for the bug report, @quixoticmonk .

This looks to be an issue with our underlying multi-language framework, jsii. I've filed a bug there (aws/jsii#2782) to track the fix.

In the meantime, it's worth noting I think you don't actually need to reference this prop directly. To attach the db secret to your cluster should be as simple as this:

_db_secret.attach(_cluster)

The RDS Cluster class implements the ISecretAttachmentTarget interface, so you don't need to hand-craft the target yourself.

@njlynch njlynch added effort/small Small work item – less than a day of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Apr 9, 2021
@quixoticmonk
Copy link
Author

quixoticmonk commented Apr 9, 2021

Aah. Thank you. Confirming that the attach with cluster ref works.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Apr 10, 2021
@njlynch njlynch added the jsii This issue originates in jsii, or this feature must be implemented in jsii. label Sep 10, 2021
@peterwoodworth
Copy link
Contributor

Closing in favor of #16443

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-secretsmanager Related to AWS Secrets Manager bug This issue is a bug. effort/small Small work item – less than a day of effort jsii This issue originates in jsii, or this feature must be implemented in jsii. p2
Projects
None yet
Development

No branches or pull requests

3 participants