Skip to content

Commit

Permalink
fix(ec2): cannot set removal policy on VpcEndpointService
Browse files Browse the repository at this point in the history
        ### Issue # (if applicable)

        Closes #30639.

        ### Reason for this change

        Cannot set removal policy on VpcEndpointService. defaultChild is not set.

        ### Description of changes

        Sets defaultChild of VpcEndpointService objects.
  • Loading branch information
slunk authored Jun 24, 2024
1 parent 3b95777 commit 8f3679e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export class VpcEndpointService extends Resource implements IVpcEndpointService
acceptanceRequired: this.acceptanceRequired,
contributorInsightsEnabled: this.contributorInsightsEnabled,
});
this.node.defaultChild = this.endpointService;

this.vpcEndpointServiceId = this.endpointService.ref;

Expand Down

0 comments on commit 8f3679e

Please sign in to comment.