Skip to content

Commit 1b2014e

Browse files
feat(msk): add Kafka version 3.3.2 (#24440)
Add support for the MSK Kafka version 3.3.2. The new version was announced on Mar 02 2023, the link to the announcement is in the linked issue. Closes #24432 . ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 553be48 commit 1b2014e

File tree

13 files changed

+406
-274
lines changed

13 files changed

+406
-274
lines changed

packages/@aws-cdk/aws-msk/lib/cluster-version.ts

+4
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ export class KafkaVersion {
8787
*/
8888
public static readonly V3_3_1 = KafkaVersion.of('3.3.1');
8989

90+
/**
91+
* Kafka version 3.3.2
92+
*/
93+
public static readonly V3_3_2 = KafkaVersion.of('3.3.2');
9094
/**
9195
* Custom cluster version
9296
* @param version custom version number

packages/@aws-cdk/aws-msk/test/cluster.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ describe('MSK Cluster', () => {
4040
[msk.KafkaVersion.V3_1_1, '3.1.1'],
4141
[msk.KafkaVersion.V3_2_0, '3.2.0'],
4242
[msk.KafkaVersion.V3_3_1, '3.3.1'],
43+
[msk.KafkaVersion.V3_3_2, '3.3.2'],
4344
],
4445
)('created with expected Kafka version %j', (parameter, result) => {
4546
new msk.Cluster(stack, 'Cluster', {

packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.assets.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
2-
"version": "30.0.0",
2+
"version": "30.1.0",
33
"files": {
4-
"1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28": {
4+
"73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4": {
55
"source": {
6-
"path": "asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle",
6+
"path": "asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle",
77
"packaging": "zip"
88
},
99
"destinations": {
1010
"current_account-current_region": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12-
"objectKey": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip",
12+
"objectKey": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip",
1313
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1414
}
1515
}
1616
},
17-
"e05a31925a856f753d012d462f51a3f4b884235b0fe9c3cea1b63e4c95fcd2c4": {
17+
"26ebb083b5aa4c4938dd01e52996de45327a2629e9d6d262659c6f011a7b21a1": {
1818
"source": {
1919
"path": "MskLoggingDefaultTestDeployAssertC2F074AF.template.json",
2020
"packaging": "file"
2121
},
2222
"destinations": {
2323
"current_account-current_region": {
2424
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25-
"objectKey": "e05a31925a856f753d012d462f51a3f4b884235b0fe9c3cea1b63e4c95fcd2c4.json",
25+
"objectKey": "26ebb083b5aa4c4938dd01e52996de45327a2629e9d6d262659c6f011a7b21a1.json",
2626
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
2727
}
2828
}

packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.template.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232
},
3333
"flattenResponse": "false",
34-
"salt": "1677027448917"
34+
"salt": "1677835197710"
3535
},
3636
"UpdateReplacePolicy": "Delete",
3737
"DeletionPolicy": "Delete"
@@ -124,7 +124,7 @@
124124
"S3Bucket": {
125125
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
126126
},
127-
"S3Key": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip"
127+
"S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip"
128128
},
129129
"Timeout": 120,
130130
"Handler": "index.handler",
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var __create = Object.create;
23
var __defProp = Object.defineProperty;
34
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;

packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/asset.a268caa53756f51bda8ad5f499be4ed8484a81b314811806fbb66f874837c476/index.js

-253
This file was deleted.

packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/aws-cdk-msk-integ.assets.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "30.0.0",
2+
"version": "30.1.0",
33
"files": {
44
"33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c": {
55
"source": {
@@ -27,15 +27,15 @@
2727
}
2828
}
2929
},
30-
"5c5b94db03f045cf89b28c56612a2b112fa3d83037d4f96122b61ebcfaaa1383": {
30+
"a9b33d873aac9026db60e46ffd1764d09d46440f81b1ffd7fdb395e54501d620": {
3131
"source": {
3232
"path": "aws-cdk-msk-integ.template.json",
3333
"packaging": "file"
3434
},
3535
"destinations": {
3636
"current_account-current_region": {
3737
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
38-
"objectKey": "5c5b94db03f045cf89b28c56612a2b112fa3d83037d4f96122b61ebcfaaa1383.json",
38+
"objectKey": "a9b33d873aac9026db60e46ffd1764d09d46440f81b1ffd7fdb395e54501d620.json",
3939
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
4040
}
4141
}

packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/aws-cdk-msk-integ.template.json

+144
Original file line numberDiff line numberDiff line change
@@ -1592,6 +1592,142 @@
15921592
}
15931593
]
15941594
}
1595+
},
1596+
"ClusterV332SecurityGroupDDA33760": {
1597+
"Type": "AWS::EC2::SecurityGroup",
1598+
"Properties": {
1599+
"GroupDescription": "MSK security group",
1600+
"SecurityGroupEgress": [
1601+
{
1602+
"CidrIp": "0.0.0.0/0",
1603+
"Description": "Allow all outbound traffic by default",
1604+
"IpProtocol": "-1"
1605+
}
1606+
],
1607+
"VpcId": {
1608+
"Ref": "VPCB9E5F0B4"
1609+
}
1610+
}
1611+
},
1612+
"ClusterV332929A761F": {
1613+
"Type": "AWS::MSK::Cluster",
1614+
"Properties": {
1615+
"BrokerNodeGroupInfo": {
1616+
"ClientSubnets": [
1617+
{
1618+
"Ref": "VPCPrivateSubnet1Subnet8BCA10E0"
1619+
},
1620+
{
1621+
"Ref": "VPCPrivateSubnet2SubnetCFCDAA7A"
1622+
}
1623+
],
1624+
"InstanceType": "kafka.m5.large",
1625+
"SecurityGroups": [
1626+
{
1627+
"Fn::GetAtt": [
1628+
"ClusterV332SecurityGroupDDA33760",
1629+
"GroupId"
1630+
]
1631+
}
1632+
],
1633+
"StorageInfo": {
1634+
"EBSStorageInfo": {
1635+
"VolumeSize": 1000
1636+
}
1637+
}
1638+
},
1639+
"ClusterName": "integ-test-v3-3-2",
1640+
"KafkaVersion": "3.3.2",
1641+
"NumberOfBrokerNodes": 2,
1642+
"EncryptionInfo": {
1643+
"EncryptionInTransit": {
1644+
"ClientBroker": "TLS",
1645+
"InCluster": true
1646+
}
1647+
},
1648+
"LoggingInfo": {
1649+
"BrokerLogs": {
1650+
"CloudWatchLogs": {
1651+
"Enabled": false
1652+
},
1653+
"Firehose": {
1654+
"Enabled": false
1655+
},
1656+
"S3": {
1657+
"Bucket": {
1658+
"Ref": "LoggingBucket1E5A6F3B"
1659+
},
1660+
"Enabled": true
1661+
}
1662+
}
1663+
}
1664+
},
1665+
"UpdateReplacePolicy": "Delete",
1666+
"DeletionPolicy": "Delete"
1667+
},
1668+
"ClusterV332BootstrapBrokersBootstrapBrokerStringTls06A03A3A": {
1669+
"Type": "Custom::AWS",
1670+
"Properties": {
1671+
"ServiceToken": {
1672+
"Fn::GetAtt": [
1673+
"AWS679f53fac002430cb0da5b7982bd22872D164C4C",
1674+
"Arn"
1675+
]
1676+
},
1677+
"Create": {
1678+
"Fn::Join": [
1679+
"",
1680+
[
1681+
"{\"service\":\"Kafka\",\"action\":\"getBootstrapBrokers\",\"parameters\":{\"ClusterArn\":\"",
1682+
{
1683+
"Ref": "ClusterV332929A761F"
1684+
},
1685+
"\"},\"physicalResourceId\":{\"id\":\"BootstrapBrokers\"}}"
1686+
]
1687+
]
1688+
},
1689+
"Update": {
1690+
"Fn::Join": [
1691+
"",
1692+
[
1693+
"{\"service\":\"Kafka\",\"action\":\"getBootstrapBrokers\",\"parameters\":{\"ClusterArn\":\"",
1694+
{
1695+
"Ref": "ClusterV332929A761F"
1696+
},
1697+
"\"},\"physicalResourceId\":{\"id\":\"BootstrapBrokers\"}}"
1698+
]
1699+
]
1700+
},
1701+
"InstallLatestAwsSdk": false
1702+
},
1703+
"DependsOn": [
1704+
"ClusterV332BootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy2EA79A00"
1705+
],
1706+
"UpdateReplacePolicy": "Delete",
1707+
"DeletionPolicy": "Delete"
1708+
},
1709+
"ClusterV332BootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy2EA79A00": {
1710+
"Type": "AWS::IAM::Policy",
1711+
"Properties": {
1712+
"PolicyDocument": {
1713+
"Statement": [
1714+
{
1715+
"Action": "kafka:GetBootstrapBrokers",
1716+
"Effect": "Allow",
1717+
"Resource": {
1718+
"Ref": "ClusterV332929A761F"
1719+
}
1720+
}
1721+
],
1722+
"Version": "2012-10-17"
1723+
},
1724+
"PolicyName": "ClusterV332BootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy2EA79A00",
1725+
"Roles": [
1726+
{
1727+
"Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2"
1728+
}
1729+
]
1730+
}
15951731
}
15961732
},
15971733
"Outputs": {
@@ -1677,6 +1813,14 @@
16771813
"BootstrapBrokerStringTls"
16781814
]
16791815
}
1816+
},
1817+
"BootstrapBrokers9": {
1818+
"Value": {
1819+
"Fn::GetAtt": [
1820+
"ClusterV332BootstrapBrokersBootstrapBrokerStringTls06A03A3A",
1821+
"BootstrapBrokerStringTls"
1822+
]
1823+
}
16801824
}
16811825
},
16821826
"Parameters": {
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"30.0.0"}
1+
{"version":"30.1.0"}

packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/integ.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "30.0.0",
2+
"version": "30.1.0",
33
"testCases": {
44
"MskLogging/DefaultTest": {
55
"stacks": [

packages/@aws-cdk/aws-msk/test/integ.cluster.js.snapshot/manifest.json

+33-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "30.0.0",
2+
"version": "30.1.0",
33
"artifacts": {
44
"aws-cdk-msk-integ.assets": {
55
"type": "cdk:asset-manifest",
@@ -17,7 +17,7 @@
1717
"validateOnSynth": false,
1818
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
1919
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
20-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5c5b94db03f045cf89b28c56612a2b112fa3d83037d4f96122b61ebcfaaa1383.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a9b33d873aac9026db60e46ffd1764d09d46440f81b1ffd7fdb395e54501d620.json",
2121
"requiresBootstrapStackVersion": 6,
2222
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2323
"additionalDependencies": [
@@ -443,6 +443,36 @@
443443
"data": "BootstrapBrokers8"
444444
}
445445
],
446+
"/aws-cdk-msk-integ/Cluster_V3_3_2/SecurityGroup/Resource": [
447+
{
448+
"type": "aws:cdk:logicalId",
449+
"data": "ClusterV332SecurityGroupDDA33760"
450+
}
451+
],
452+
"/aws-cdk-msk-integ/Cluster_V3_3_2/Resource": [
453+
{
454+
"type": "aws:cdk:logicalId",
455+
"data": "ClusterV332929A761F"
456+
}
457+
],
458+
"/aws-cdk-msk-integ/Cluster_V3_3_2/BootstrapBrokersBootstrapBrokerStringTls/Resource/Default": [
459+
{
460+
"type": "aws:cdk:logicalId",
461+
"data": "ClusterV332BootstrapBrokersBootstrapBrokerStringTls06A03A3A"
462+
}
463+
],
464+
"/aws-cdk-msk-integ/Cluster_V3_3_2/BootstrapBrokersBootstrapBrokerStringTls/CustomResourcePolicy/Resource": [
465+
{
466+
"type": "aws:cdk:logicalId",
467+
"data": "ClusterV332BootstrapBrokersBootstrapBrokerStringTlsCustomResourcePolicy2EA79A00"
468+
}
469+
],
470+
"/aws-cdk-msk-integ/BootstrapBrokers9": [
471+
{
472+
"type": "aws:cdk:logicalId",
473+
"data": "BootstrapBrokers9"
474+
}
475+
],
446476
"/aws-cdk-msk-integ/BootstrapVersion": [
447477
{
448478
"type": "aws:cdk:logicalId",
@@ -474,7 +504,7 @@
474504
"validateOnSynth": false,
475505
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
476506
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
477-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e05a31925a856f753d012d462f51a3f4b884235b0fe9c3cea1b63e4c95fcd2c4.json",
507+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/26ebb083b5aa4c4938dd01e52996de45327a2629e9d6d262659c6f011a7b21a1.json",
478508
"requiresBootstrapStackVersion": 6,
479509
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
480510
"additionalDependencies": [

0 commit comments

Comments
 (0)