Skip to content

Commit

Permalink
Add security group property to HealthMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlove-aws committed May 3, 2021
1 parent a0d7b0a commit d29eb72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/aws-rfdk/lib/core/lib/health-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import {SnsAction} from '@aws-cdk/aws-cloudwatch-actions';
import {
IConnectable,
ISecurityGroup,
IVpc,
Port,
SubnetSelection,
Expand Down Expand Up @@ -211,6 +212,13 @@ export interface HealthMonitorProps {
* @default: The VPC default strategy
*/
readonly vpcSubnets?: SubnetSelection;

/**
* Security group to associate with this load balancer.
*
* @default: A security group is created
*/
readonly securityGroup?: ISecurityGroup;
}

/**
Expand Down
1 change: 1 addition & 0 deletions packages/aws-rfdk/lib/core/lib/load-balancer-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export class LoadBalancerFactory {
internetFacing: false,
vpcSubnets: healthMonitorProps.vpcSubnets,
deletionProtection: healthMonitorProps.deletionProtection ?? true,
securityGroup: healthMonitorProps.securityGroup,
});
// Enabling dropping of invalid HTTP header fields on the load balancer to prevent http smuggling attacks.
loadBalancer.setAttribute('routing.http.drop_invalid_header_fields.enabled', 'true');
Expand Down

0 comments on commit d29eb72

Please sign in to comment.