Skip to content

Commit

Permalink
only activate vpc endpoints if privateWebsite toggle true
Browse files Browse the repository at this point in the history
  • Loading branch information
manuwaik committed Jan 17, 2024
1 parent 8ef39e4 commit 1d81875
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class Shared extends Construct {
}

if (
props.config.privateWebsite ||
typeof props.config.vpc?.createVpcEndpoints === "undefined" ||
props.config.vpc?.createVpcEndpoints === true
) {
// Create a VPC endpoint for S3.
Expand Down Expand Up @@ -104,6 +104,9 @@ export class Shared extends Construct {
open: true,
});

}

if (props.config.privateWebsite) {
// Create VPC Endpoint for AppSync
vpc.addInterfaceEndpoint("AppSyncEndpoint", {
service: ec2.InterfaceVpcEndpointAwsService.APP_SYNC,
Expand Down Expand Up @@ -181,7 +184,6 @@ export class Shared extends Construct {
// privateDnsEnabled: true
// });
// // }


}

Expand Down

0 comments on commit 1d81875

Please sign in to comment.