Skip to content

(aws-appsync): rdsDataSource expects databaseCluster instead of serverlessCluster #12567

@monholm

Description

@monholm

Creating seperate issues for #12503 to improve strucure.

When trying to add a rdsDataSource to appsync, addRdsDataSource and RdsDataSource expects a DatabaseCluster instead of a ServerlessCluster, which is the one used by AppSync.

Reproduction Steps

const api = new GraphqlApi(stack, 'api', {
  name: 'graphqlApi',
  schema: Schema.fromAsset('./testSchema.graphql'),
});

const serverless = new ServerlessCluster(stack, 'cluster', {
  engine: DatabaseClusterEngine.AURORA_MYSQL,
  vpc: new Vpc(stack, 'vpc'),
});

api.addRdsDataSource('rdsDS', serverless, serverless.secret!);

What did you expect to happen?

addRdsDataSource to expect ServerlessCluster.

What actually happened?

It expects a DatabaseCluster.

Environment

  • CDK CLI Version: 1.84.0
  • Framework Version: 1.84.0
  • Node.js Version: 14.5.4
  • OS: MacOS 10.15.7
  • Language (Version): TypeScript (3.9.7)

This is 🐛 Bug Report

Metadata

Metadata

Labels

@aws-cdk/aws-appsyncRelated to AWS AppSyncbugThis issue is a bug.effort/smallSmall work item – less than a day of effortp2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions