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

aws_docdb - CfnDBInstance #31722

Closed
1 task
bsnyder74 opened this issue Oct 10, 2024 · 2 comments
Closed
1 task

aws_docdb - CfnDBInstance #31722

bsnyder74 opened this issue Oct 10, 2024 · 2 comments
Assignees
Labels
@aws-cdk/aws-docdb Related to Amazon DocumentDB bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@bsnyder74
Copy link

bsnyder74 commented Oct 10, 2024

Describe the bug

Documented Construct Property caCertificateIdentifier does not exist for the CfnDBInstance & CfnDBInstanceProps in the aws-cdk-lib\aws_docdb type. CDK version 2.161.1 and 2.162.0 tested, likely other versions will see this too.

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_docdb.CfnDBInstance.html#construct-props

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

Synth renders a template with a valid resource using the documented properties without error.

Current Behavior

Error:
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
infrastructure/lib/docdb-cluster.ts:88:7 - error TS2345: Argument of type '{ dbInstanceIdentifier: string; dbInstanceClass: string; availabilityZone: string; enablePerformanceInsights: false; preferredMaintenanceWindow: string; autoMinorVersionUpgrade: true; dbClusterIdentifier: string; caCertificateIdentifier: string; certificateRotationRestart: boolean; }' is not assignable to parameter of type 'CfnDBInstanceProps'.
Object literal may only specify known properties, and 'caCertificateIdentifier' does not exist in type 'CfnDBInstanceProps'.

caCertificateIdentifier: 'rds-ca-rsa4096-g1'

Reproduction Steps

Steps to reproduce:

  • Add a caCertificateIdentifier property to the CfnDBInstance construct to the type, as documented.
  • Run cdk synth (or any cdk command that will validate the code).

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.161.1

Framework Version

No response

Node.js Version

v18.18.0

OS

MacOS 15.0.1

Language

TypeScript

Language Version

No response

Other information

No response

@bsnyder74 bsnyder74 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 10, 2024
@github-actions github-actions bot added the @aws-cdk/aws-docdb Related to Amazon DocumentDB label Oct 10, 2024
@ashishdhingra ashishdhingra self-assigned this Oct 11, 2024
@ashishdhingra ashishdhingra added p2 investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 11, 2024
@ashishdhingra
Copy link
Contributor

@bsnyder74 Good morning. Somehow, I'm unable to reproduce the issue using CDK version 2.161.1 (build 0a606c9). Below code (as an example):

import * as cdk from 'aws-cdk-lib';
import * as docdb from 'aws-cdk-lib/aws-docdb';

export class CdktestStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const docDBInstance = new docdb.CfnDBInstance(this, 'MyDocDB', {
      dbInstanceClass: 'test',
      dbClusterIdentifier: 'test',
      caCertificateIdentifier: 'test'
    });
  }
}

synthesizes successfully to CFN template:

Resources:
  MyDocDB:
    Type: AWS::DocDB::DBInstance
    Properties:
      CACertificateIdentifier: test
      DBClusterIdentifier: test
      DBInstanceClass: test
    Metadata:
      aws:cdk:path: CdktestStack/MyDocDB
  CDKMetadata:
    Type: AWS::CDK::Metadata
    Properties:
      Analytics: v2:deflate64:H4sIAAAAAAAA/yXFvQ5AMBAA4Gext0dFxIzFygNIXU9SP9fEFYN4d4Nv+XIwpQGT2Fs0ulVvfoJniBZXZW8ZXUA3QTNzW3cs0TKSambuScJ5IL2KgyNYJL1MBXkGRbKI9/o4OfqdoP//APYAJH1lAAAA
    Metadata:
      aws:cdk:path: CdktestStack/CDKMetadata/Default
Parameters:
  BootstrapVersion:
    Type: AWS::SSM::Parameter::Value<String>
    Default: /cdk-bootstrap/hnb659fds/version
    Description: Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]

I'm unsure what is missing at your end. Could you please check the aws-cdk-lib version in your package.json?

Thanks,
Ashish

@ashishdhingra ashishdhingra added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Oct 11, 2024
Copy link

This issue has not received a response in a while. 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 Oct 13, 2024
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 bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants