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): rotation function name exceed 64 chars #16108

Closed
wchaws opened this issue Aug 18, 2021 · 2 comments
Closed

(secretsmanager): rotation function name exceed 64 chars #16108

wchaws opened this issue Aug 18, 2021 · 2 comments
Labels
@aws-cdk/aws-secretsmanager Related to AWS Secrets Manager bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/small Small work item – less than a day of effort p2

Comments

@wchaws
Copy link
Contributor

wchaws commented Aug 18, 2021

CDK fails to deploy the rotation application stack successfully. This bug is similar to #7885.

A workaround is to give rdsSecret.addRotationSchedule id a shorter name.

image

Reproduction Steps

import {Credentials, DatabaseSecret} from "@aws-cdk/aws-rds";
// ...
const rdsSecret = new DatabaseSecret(
    this,
    'rdsSecret',
    {
        username: props.adminUserName,
        secretName: props.rdsSecretName
    }
);
rdsSecret.addRotationSchedule('RotationSchedule', {
    hostedRotation: secretsmanager.HostedRotation.mysqlSingleUser(),
    automaticallyAfter: cdk.Duration.days(90)
});

What did you expect to happen?

Deploy stack successfully.

What actually happened?

Deploy Failed.

Environment

  • CDK CLI Version : 1.115.0 (build f0ca40f)
  • Framework Version: 1.115.0 (build f0ca40f)
  • Node.js Version: v14.17.0
  • OS : macOS 10.15.7 (19H1323) Darwin 19.6.0
  • Language (Version): TypeScript

Other


This is 🐛 Bug Report

@wchaws wchaws added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 18, 2021
@github-actions github-actions bot added the @aws-cdk/aws-secretsmanager Related to AWS Secrets Manager label Aug 18, 2021
@njlynch njlynch added effort/small Small work item – less than a day of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Aug 24, 2021
@njlynch njlynch removed their assignment Aug 24, 2021
@njlynch
Copy link
Contributor

njlynch commented Aug 24, 2021

Thanks for the bug report!

With no name provided, CloudFormation will autogenerate a name based on the logical ID of the resource; in this case, with longer ID names (due to long stack/construct IDs), the autogenerated name will fail. We could detect that no name is provided, and in that case generate a name (and trim it down to size). Ideally, this would be done in such a way that it was backwards-compatible (no name change for existing stacks).

Given there's an easy-enough workaround now (providing a name to mysqlSingleUser()), I'm going to mark this as a p2.
We use +1s to help prioritize our work, and are happy to revaluate this issue based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for reprioritization.

@github-actions
Copy link

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Aug 24, 2022
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. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

No branches or pull requests

2 participants