Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
13 changes: 11 additions & 2 deletions packages/@aws-cdk/aws-msk-alpha/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ export interface ClusterProps {
*/
readonly instanceType?: ec2.InstanceType;

/**
* Whether to use an Express Broker.
* When set to true, the cluster will be created with Express Brokers.
*
* @default false
*/
readonly express?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we switch from using boolean to enum instead readonly brokerType?: BrokerType; keeping it more future proof ?

enum BrokerType {
   STANDARD = 'STANDARD', 
   EXPRESS = 'EXPRESS' 
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.
Added Enum.


/**
* The AWS security groups to associate with the elastic network interfaces in order to specify who can
* connect to and communicate with the Amazon MSK cluster.
Expand Down Expand Up @@ -706,8 +714,9 @@ export class Cluster extends ClusterBase {
});
}

private mskInstanceType(instanceType: ec2.InstanceType): string {
return `kafka.${instanceType.toString()}`;
private mskInstanceType(instanceType: ec2.InstanceType, express?:boolean): string {
const prefix = express ? 'express.' : 'kafka.';
return `${prefix}${instanceType.toString()}`;
}

/**
Expand Down
Loading