3

Context:

Projen is an awesome tool to generate and manage (JSII-built) AWS CDK projects.

Background:

Previously I have managed CDK dependencies with RenovateBot's group:aws-cdkMonorepo preset. This will result in RenovateBot creating a single Github Pull Request for AWS CDK depedency updates.

Question:

With Projen, one controls the CDK version in .projenrc.js:

const { AwsCdkConstructLibrary } = require('projen');

const project = new AwsCdkConstructLibrary({
  authorName: "Example",
  authorAddress: "contact@example.com",
  cdkVersion: "1.64.0",
  name: "@example/project",
  repository: "https://github.com/example/project.git",
});

project.synth();

So how can one manage that cdkVersion value with tooling such as DependaBot or RenovateBot?

Since keeping one's CDK constructs up-to-date with current CDK version is critial and with multiple CDK constructs doing it by hand will be painful.

Ari P
  • 31
  • 4
  • Hey Ari! I have no answer to that, just want to comment on your last paragraph. I read that over and over again, that ppl (think they have to) re-publish their constructs when new CDK versions pop up. I have never done that and I have never had issues with my constructs in newer versions. For instance cdk-iam-floyd depends on cdk `^1.30.0` and I haven't heard any complaints. I myself use this package with CDK 1.64.0. – udondan Sep 27 '20 at 17:19

1 Answers1

0

The central version management depends on your requirement. If you are using a centralized construct library it is a must-have. For managing the dependencies in centrally in a single configuration, you need to add the following snippet in the .projenrc.js

cdkDependecies:[
'@aws-cdk/core'
]

Now, whenever you run projen the cdk app would be managed centrally and use the latest version.

Dharmvir Tiwari
  • 886
  • 3
  • 12
  • 25