Skip to content

Commit

Permalink
remove policies property
Browse files Browse the repository at this point in the history
  • Loading branch information
postsa committed Oct 6, 2023
1 parent 07a67fd commit 36731b1
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions packages/aws-cdk-lib/aws-events/lib/event-bus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,6 @@ export class EventBus extends EventBusBase {
*/
public readonly eventSourceName?: string;

/**
* The EventBusPolicies attached to this event bus
*/
public readonly policies: EventBusPolicy[];

constructor(scope: Construct, id: string, props?: EventBusProps) {
const { eventBusName, eventSourceName } = EventBus.eventBusProps(
Lazy.string({ produce: () => Names.uniqueId(this) }),
Expand All @@ -322,8 +317,6 @@ export class EventBus extends EventBusBase {

super(scope, id, { physicalName: eventBusName });

this.policies = [];

const eventBus = new CfnEventBus(this, 'Resource', {
name: this.physicalName,
eventSourceName,
Expand All @@ -348,12 +341,11 @@ export class EventBus extends EventBusBase {
throw new Error('Event Bus policy statements must have a sid');
}

const policy = new EventBusPolicy(this, statement.sid, {
new EventBusPolicy(this, statement.sid, {
eventBus: this,
statement: statement.toJSON(),
statementId: statement.sid,
});
this.policies.push(policy);

return { statementAdded: true, policyDependable: policy };
}
Expand Down

0 comments on commit 36731b1

Please sign in to comment.