Skip to content

RDS: add support for creating Proxy endpoints #14186

@aalam-tu

Description

@aalam-tu

I have created a rds cluster:
image

I am trying to create a rds proxy with both reader and read/write endpoints using AWS CDK

Reproduction Steps

I have created a rds proxy using:

    this.rdsCluster = new DatabaseCluster(this, clusterName, {
      clusterIdentifier: clusterName,
      engine: clusterEngine,
      credentials: {
        username: ResourcePropsConstants.RDS_MASTER_USER,
        excludeCharacters: ';',
      },
      instanceProps: {
        instanceType: new InstanceType(RdsUtils.determineInstanceSize(envName)),
        vpc: this.iVpc,
        vpcSubnets: {
          subnetType: SubnetType.PRIVATE,
        },
        securityGroups: [this.iRdsSG],
      },
      storageEncrypted: true,
      backup: {
        retention: Duration.days(RdsUtils.determineRetentionPeriod(envName)),
      },
      parameterGroup: this.parameterGroup,
      deletionProtection: isHigherEnv,
    });
    
    this.rdsProxy = this.rdsCluster.addProxy(dbProxyName, {
      dbProxyName,
      borrowTimeout: Duration.minutes(3),
      maxConnectionsPercent: 85,
      maxIdleConnectionsPercent: 10,
      idleClientTimeout: Duration.minutes(15),
      requireTLS: true,
      secrets: [this.rdsSecret],
      securityGroups: [this.iRdsProxySG],
      vpcSubnets: {
        subnetType: SubnetType.PRIVATE,
      },
      vpc: this.iVpc,
    });

What did you expect to happen?

I am expecting two endpoints to be created in the proxy - one with Read/Write and the other with Read target role. When I manually create a proxy using AWS Console a proxy is created with two endpoints

What actually happened?

Only one endpoint was created with Read/Write target role

Environment

  • **CDK CLI Version :1.66
  • Framework Version:
  • Node.js Version:
  • OS :
  • Language (Version): -- Typescript

Other


This is 🐛 Bug Report

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-rdsRelated to Amazon Relational Databaseeffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.feature/coverage-gapGaps in CloudFormation coverage by L2 constructsp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions