Skip to content

Commit 874f9ae

Browse files
committed
feat: vpc modules readme
1 parent 62a6177 commit 874f9ae

File tree

2 files changed

+1492
-1
lines changed

2 files changed

+1492
-1
lines changed

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ cdk-vpc-module construct library is an open-source extension of the AWS Cloud De
77
- :white_check_mark: VPC Peering with route table entry
88
- :white_check_mark: Configurable NACL as per subnet group
99
- :white_check_mark: NATGateway as per availabilityZones
10+
- :white_check_mark: VPC Endpoint Services with ALB/NLB setup
11+
- :white_check_mark: SSL/TLS termination support
12+
- :white_check_mark: Multiple target group routing
1013

1114

1215
Using cdk a vpc can be deployed using the following sample code snippet:
@@ -143,6 +146,7 @@ export class VPCStack extends Stack {
143146
},
144147
},
145148
],
149+
146150
vpcEndpoints: [
147151
{
148152
name: "s3-gw",
@@ -286,10 +290,47 @@ A custom IAM policy (s3EndpointIamPermission) is attached to control access to t
286290
A DynamoDB Gateway Endpoint is created in the private-subnet with additional tags specifying the environment and ownership.
287291
288292
Configuration Options
289-
Heres a breakdown of the configuration options available:
293+
Here's a breakdown of the configuration options available:
290294
1. name: A unique name for the VPC Endpoint.
291295
2. service: The AWS service the VPC Endpoint connects to (e.g., S3, DynamoDB, Secrets Manager)
292296
3. subnetGroupNames: The subnet group names where the VPC Endpoint will be deployed.
293297
4. externalSubnets: Specify external subnets if you need to define subnets manually (each with an id, availabilityZone, and routeTableId).
294298
5. iamPolicyStatements: (Optional) Attach IAM policy statements to control access to the endpoint.
295299
6. additionalTags: (Optional) Add custom tags to the VPC Endpoint for easier identification and tracking.
300+
301+
## VPC Endpoint Services
302+
303+
For comprehensive documentation on VPC Endpoint Services, including detailed configuration options, examples, and best practices, see [VPC_ENDPOINT_SERVICES.md](./VPC_ENDPOINT_SERVICES.md).
304+
305+
VPC Endpoint Services allow you to expose your services privately within a VPC using a combination of Network Load Balancer (NLB) and Application Load Balancer (ALB) for robust, scalable private service exposure.
306+
307+
### Quick Example
308+
309+
```typescript
310+
vpcEndpointServices: [
311+
{
312+
name: 'my-private-service',
313+
alb: {
314+
subnetGroupName: 'Private',
315+
targetGroups: [
316+
{
317+
host: 'api.example.com',
318+
applicationPort: 8080,
319+
healthCheckPath: '/health'
320+
}
321+
]
322+
},
323+
nlb: {
324+
subnetGroupName: 'Private',
325+
securityGroupRules: [
326+
{
327+
peer: ec2.Peer.anyIpv4(),
328+
port: ec2.Port.tcp(443),
329+
description: 'Allow HTTPS traffic'
330+
}
331+
]
332+
},
333+
acceptanceRequired: false
334+
}
335+
]
336+
```

0 commit comments

Comments
 (0)