diff --git a/packages/@aws-cdk/aws-msk-alpha/lib/cluster.ts b/packages/@aws-cdk/aws-msk-alpha/lib/cluster.ts index ed8041e6751a2..ccdf40907ed33 100644 --- a/packages/@aws-cdk/aws-msk-alpha/lib/cluster.ts +++ b/packages/@aws-cdk/aws-msk-alpha/lib/cluster.ts @@ -894,6 +894,17 @@ export class Cluster extends ClusterBase { return this._bootstrapBrokers('BootstrapBrokerStringSaslIam'); } + /** + * Get the list of brokers that a SASL/IAM authenticated client application can use to bootstrap + * + * Uses a Custom Resource to make an API call to `getBootstrapBrokers` using the Javascript SDK + * + * @returns - A string containing one or more DNS names (or IP) and TLS port pairs. + */ + public get bootstrapBrokersPublicSaslIam() { + return this._bootstrapBrokers('BootstrapBrokerStringPublicSaslIam'); + } + /** * A list of usersnames to register with the cluster. The password will automatically be generated using Secrets * Manager and the { username, password } JSON object stored in Secrets Manager as `AmazonMSK_username`. diff --git a/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster.ts b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster.ts index 3530b033668f5..154fa56d4d080 100644 --- a/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster.ts +++ b/packages/@aws-cdk/aws-msk-alpha/test/integ.cluster.ts @@ -195,7 +195,7 @@ class FeatureFlagStack extends cdk.Stack { removalPolicy: cdk.RemovalPolicy.DESTROY, }); new cdk.CfnOutput(this, 'BootstrapBrokers9', { value: cluster7.bootstrapBrokersTls }); - + new cdk.CfnOutput(this, 'BootstrapBrokers10', { value: cluster3.bootstrapBrokersPublicSaslIam }); } }