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

feat(msk): support for Kafka version 3.8.x and add deprecated labels to legacy versions #33553

Merged
merged 4 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/@aws-cdk/aws-msk-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The following example creates an MSK Cluster.
declare const vpc: ec2.Vpc;
const cluster = new msk.Cluster(this, 'Cluster', {
clusterName: 'myCluster',
kafkaVersion: msk.KafkaVersion.V2_8_1,
kafkaVersion: msk.KafkaVersion.V3_8_X,
vpc,
});
```
Expand All @@ -36,7 +36,7 @@ To control who can access the Cluster, use the `.connections` attribute. For a l
declare const vpc: ec2.Vpc;
const cluster = new msk.Cluster(this, 'Cluster', {
clusterName: 'myCluster',
kafkaVersion: msk.KafkaVersion.V2_8_1,
kafkaVersion: msk.KafkaVersion.V3_8_X,
vpc,
});

Expand Down Expand Up @@ -88,7 +88,7 @@ import * as acmpca from 'aws-cdk-lib/aws-acmpca';
declare const vpc: ec2.Vpc;
const cluster = new msk.Cluster(this, 'Cluster', {
clusterName: 'myCluster',
kafkaVersion: msk.KafkaVersion.V2_8_1,
kafkaVersion: msk.KafkaVersion.V3_8_X,
vpc,
encryptionInTransit: {
clientBroker: msk.ClientBrokerEncryption.TLS,
Expand All @@ -113,7 +113,7 @@ Enable client authentication with [SASL/SCRAM](https://docs.aws.amazon.com/msk/l
declare const vpc: ec2.Vpc;
const cluster = new msk.Cluster(this, 'cluster', {
clusterName: 'myCluster',
kafkaVersion: msk.KafkaVersion.V2_8_1,
kafkaVersion: msk.KafkaVersion.V3_8_X,
vpc,
encryptionInTransit: {
clientBroker: msk.ClientBrokerEncryption.TLS,
Expand All @@ -132,7 +132,7 @@ Enable client authentication with [IAM](https://docs.aws.amazon.com/msk/latest/d
declare const vpc: ec2.Vpc;
const cluster = new msk.Cluster(this, 'cluster', {
clusterName: 'myCluster',
kafkaVersion: msk.KafkaVersion.V2_8_1,
kafkaVersion: msk.KafkaVersion.V3_8_X,
vpc,
encryptionInTransit: {
clientBroker: msk.ClientBrokerEncryption.TLS,
Expand All @@ -155,7 +155,7 @@ import * as acmpca from 'aws-cdk-lib/aws-acmpca';
declare const vpc: ec2.Vpc;
const cluster = new msk.Cluster(this, 'Cluster', {
clusterName: 'myCluster',
kafkaVersion: msk.KafkaVersion.V2_8_1,
kafkaVersion: msk.KafkaVersion.V3_8_X,
vpc,
encryptionInTransit: {
clientBroker: msk.ClientBrokerEncryption.TLS,
Expand Down Expand Up @@ -186,7 +186,7 @@ declare const vpc: ec2.Vpc;
declare const bucket: s3.IBucket;
const cluster = new msk.Cluster(this, 'cluster', {
clusterName: 'myCluster',
kafkaVersion: msk.KafkaVersion.V2_8_1,
kafkaVersion: msk.KafkaVersion.V3_8_X,
vpc,
logging: {
s3: {
Expand Down
41 changes: 41 additions & 0 deletions packages/@aws-cdk/aws-msk-alpha/lib/cluster-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,71 +72,99 @@ export class KafkaVersion {

/**
* Kafka version 2.6.0
*
* @deprecated use the latest runtime instead
*/
public static readonly V2_6_0 = KafkaVersion.of('2.6.0');

/**
* Kafka version 2.6.1
*
* @deprecated use the latest runtime instead
*/
public static readonly V2_6_1 = KafkaVersion.of('2.6.1');

/**
* Kafka version 2.6.2
*
* @deprecated use the latest runtime instead
*/
public static readonly V2_6_2 = KafkaVersion.of('2.6.2');

/**
* Kafka version 2.6.3
*
* @deprecated use the latest runtime instead
*/
public static readonly V2_6_3 = KafkaVersion.of('2.6.3');

/**
* Kafka version 2.7.0
*
* @deprecated use the latest runtime instead
*/
public static readonly V2_7_0 = KafkaVersion.of('2.7.0');

/**
* Kafka version 2.7.1
*
* @deprecated use the latest runtime instead
*/
public static readonly V2_7_1 = KafkaVersion.of('2.7.1');

/**
* Kafka version 2.7.2
*
* @deprecated use the latest runtime instead
*/
public static readonly V2_7_2 = KafkaVersion.of('2.7.2');

/**
* Kafka version 2.8.0
*
* @deprecated use the latest runtime instead
*/
public static readonly V2_8_0 = KafkaVersion.of('2.8.0');

/**
* Kafka version 2.8.1
*
* @deprecated use the latest runtime instead
*/
public static readonly V2_8_1 = KafkaVersion.of('2.8.1');

/**
* AWS MSK Kafka version 2.8.2.tiered
*
* @deprecated use the latest runtime instead
*/
public static readonly V2_8_2_TIERED = KafkaVersion.of('2.8.2.tiered', { tieredStorage: true });

/**
* Kafka version 3.1.1
*
* @deprecated use the latest runtime instead
*/
public static readonly V3_1_1 = KafkaVersion.of('3.1.1');

/**
* Kafka version 3.2.0
*
* @deprecated use the latest runtime instead
*/
public static readonly V3_2_0 = KafkaVersion.of('3.2.0');

/**
* Kafka version 3.3.1
*
* @deprecated use the latest runtime instead
*/
public static readonly V3_3_1 = KafkaVersion.of('3.3.1');

/**
* Kafka version 3.3.2
*
* @deprecated use the latest runtime instead
*/
public static readonly V3_3_2 = KafkaVersion.of('3.3.2');

Expand Down Expand Up @@ -169,6 +197,19 @@ export class KafkaVersion {
*/
public static readonly V3_7_X_KRAFT = KafkaVersion.of('3.7.x.kraft', { tieredStorage: true });

/**
* Kafka version 3.8.x with ZooKeeper metadata mode support
*
* @see https://docs.aws.amazon.com/msk/latest/developerguide/metadata-management.html#msk-get-connection-string
*/
public static readonly V3_8_X = KafkaVersion.of('3.8.x', { tieredStorage: true });

/**
* Kafka version 3.8.x with KRaft (Apache Kafka Raft) metadata mode support
*
* @see https://docs.aws.amazon.com/msk/latest/developerguide/metadata-management.html#kraft-intro
*/
public static readonly V3_8_X_KRAFT = KafkaVersion.of('3.8.x.kraft', { tieredStorage: true });
/**
* Custom cluster version
* @param version custom version number
Expand Down
2 changes: 2 additions & 0 deletions packages/@aws-cdk/aws-msk-alpha/test/cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ describe('MSK Cluster', () => {
[msk.KafkaVersion.V3_6_0, '3.6.0'],
[msk.KafkaVersion.V3_7_X, '3.7.x'],
[msk.KafkaVersion.V3_7_X_KRAFT, '3.7.x.kraft'],
[msk.KafkaVersion.V3_8_X, '3.8.x'],
[msk.KafkaVersion.V3_8_X_KRAFT, '3.8.x.kraft'],
],
)('created with expected Kafka version %j', (parameter, result) => {
new msk.Cluster(stack, 'Cluster', {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading