Skip to content

Commit

Permalink
fix(msk-alpha): cluster deployment fails in ap-southeast-1 (#28112)
Browse files Browse the repository at this point in the history
The reason is that the `AwsCustomResource` that this construct library uses calls `describeCluster`, which passes back all responses to CloudFormation, even if they are unused.

This PR restricts the return value to only the outputs that are actually read.

Fixes #28108

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr authored Nov 27, 2023
1 parent 030782a commit 0ee4199
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 18 deletions.
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-msk-alpha/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,11 @@ export class Cluster extends ClusterBase {
physicalResourceId: cr.PhysicalResourceId.of(
'ZooKeeperConnectionString',
),
// Limit the output of describeCluster that is otherwise too large
outputPaths: [
'ClusterInfo.ZookeeperConnectString',
'ClusterInfo.ZookeeperConnectStringTls',
],
},
policy: cr.AwsCustomResourcePolicy.fromSdkCalls({
resources: [this.clusterArn],
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.

Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
{
"Ref": "ClusterZookeeper29ECF2D7"
},
"\"},\"physicalResourceId\":{\"id\":\"ZooKeeperConnectionString\"}}"
"\"},\"physicalResourceId\":{\"id\":\"ZooKeeperConnectionString\"},\"outputPaths\":[\"ClusterInfo.ZookeeperConnectString\",\"ClusterInfo.ZookeeperConnectStringTls\"]}"
]
]
},
Expand All @@ -489,7 +489,7 @@
{
"Ref": "ClusterZookeeper29ECF2D7"
},
"\"},\"physicalResourceId\":{\"id\":\"ZooKeeperConnectionString\"}}"
"\"},\"physicalResourceId\":{\"id\":\"ZooKeeperConnectionString\"},\"outputPaths\":[\"ClusterInfo.ZookeeperConnectString\",\"ClusterInfo.ZookeeperConnectStringTls\"]}"
]
]
},
Expand Down Expand Up @@ -562,7 +562,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "e5178afc49b7c6a85127a67856ce958e4f0879ce6aad5e974cac2a088bf939db.zip"
"S3Key": "b0de6372e1c756b7afa1a8a1d0a21ee4cd330150290abffc9bc163f285150514.zip"
},
"Handler": "index.handler",
"Role": {
Expand Down

Large diffs are not rendered by default.

This file was deleted.

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.

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.

0 comments on commit 0ee4199

Please sign in to comment.