Skip to content

Commit

Permalink
fix(elbv2): BaseLoadBalancer.vpc is not optional
Browse files Browse the repository at this point in the history
The `BaseLoadBalancer.vpc` property fulfills the `IApplicationLoadBalancer.vpc` and
`INetworkLoadBalancer.vpc` properties, both of which are optional. A bug in `jsii` (see aws/jsii#3342)
makes this pass type system consistency checks, when it should not be allowed.
  • Loading branch information
Romain Marcadier committed Jan 17, 2022
1 parent 50637e0 commit f5a1bd6
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -192,8 +192,11 @@ export abstract class BaseLoadBalancer extends Resource {

/**
* The VPC this load balancer has been created in.
*
* This property is always defined (not `null` or `undefined`) for sub-classes of `BaseLoadBalancer`.
*/
public readonly vpc: ec2.IVpc;
public readonly vpc?: ec2.IVpc;

/**
* Attributes set on this load balancer
*/
Expand Down

0 comments on commit f5a1bd6

Please sign in to comment.