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): add Kafka versions 3.1.1, 3.2.0, and and 3.3.1 #23918

Merged
merged 14 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from 13 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
15 changes: 15 additions & 0 deletions packages/@aws-cdk/aws-msk/lib/cluster-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ export class KafkaVersion {
*/
public static readonly V2_8_1 = KafkaVersion.of('2.8.1');

/**
* Kafka version 3.1.1
*/
public static readonly V3_1_1 = KafkaVersion.of('3.1.1');

/**
* Kafka version 3.2.0
*/
public static readonly V3_2_0 = KafkaVersion.of('3.2.0');

/**
* Kafka version 3.3.1
*/
public static readonly V3_3_1 = KafkaVersion.of('3.3.1');

/**
* Custom cluster version
* @param version custom version number
Expand Down
34 changes: 34 additions & 0 deletions packages/@aws-cdk/aws-msk/test/cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,40 @@ describe('MSK Cluster', () => {
vpc = new ec2.Vpc(stack, 'Vpc');
});

test.each([
[msk.KafkaVersion.V1_1_1, '1.1.1'],
[msk.KafkaVersion.V2_2_1, '2.2.1'],
[msk.KafkaVersion.V2_3_1, '2.3.1'],
[msk.KafkaVersion.V2_4_1_1, '2.4.1.1'],
[msk.KafkaVersion.V2_5_1, '2.5.1'],
[msk.KafkaVersion.V2_6_0, '2.6.0'],
[msk.KafkaVersion.V2_6_1, '2.6.1'],
[msk.KafkaVersion.V2_6_2, '2.6.2'],
[msk.KafkaVersion.V2_6_3, '2.6.3'],
[msk.KafkaVersion.V2_7_0, '2.7.0'],
[msk.KafkaVersion.V2_7_1, '2.7.1'],
[msk.KafkaVersion.V2_7_2, '2.7.2'],
[msk.KafkaVersion.V2_8_0, '2.8.0'],
[msk.KafkaVersion.V2_8_1, '2.8.1'],
[msk.KafkaVersion.V3_1_1, '3.1.1'],
[msk.KafkaVersion.V3_2_0, '3.2.0'],
[msk.KafkaVersion.V3_3_1, '3.3.1'],
],
)('created with expected Kafka version %j', (parameter, result) => {
new msk.Cluster(stack, 'Cluster', {
clusterName: 'cluster',
kafkaVersion: parameter,
vpc,
});

Template.fromStack(stack).hasResource(
'AWS::MSK::Cluster', {},
);
Template.fromStack(stack).hasResourceProperties('AWS::MSK::Cluster', {
KafkaVersion: result,
});
});

test('created with default properties', () => {
new msk.Cluster(stack, 'Cluster', {
clusterName: 'cluster',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"version": "22.0.0",
"version": "30.0.0",
"files": {
"278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4": {
"1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28": {
"source": {
"path": "asset.278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.bundle",
"path": "asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.zip",
"objectKey": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"a05397c3727c3e7f038b83dffd978e425efd93679403b58df9e637d090313b4d": {
"e05a31925a856f753d012d462f51a3f4b884235b0fe9c3cea1b63e4c95fcd2c4": {
"source": {
"path": "MskLoggingDefaultTestDeployAssertC2F074AF.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "a05397c3727c3e7f038b83dffd978e425efd93679403b58df9e637d090313b4d.json",
"objectKey": "e05a31925a856f753d012d462f51a3f4b884235b0fe9c3cea1b63e4c95fcd2c4.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
},
"flattenResponse": "false",
"salt": "1673270420990"
"salt": "1677027448917"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
Expand Down Expand Up @@ -100,6 +100,15 @@
]
}
]
},
{
"Action": [
"kafka:GetBootstrapBrokers"
],
"Effect": "Allow",
"Resource": [
"*"
]
}
]
}
Expand All @@ -115,7 +124,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.zip"
"S3Key": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip"
},
"Timeout": 120,
"Handler": "index.handler",
Expand Down
Loading