Vpc Endpoint
Provides a Vpc Endpoint
Sample
Gateway Endpoint
exports.createResources = () => [
{
type: "VpcEndpoint",
group: "EC2",
name: "project-vpc-endpoint-vpce-s3",
properties: ({config}) => ({
ServiceName: `com.amazonaws.${config.region}.s3`,
VpcEndpointType: "Gateway",
}),
dependencies: () => ({
vpc: "project-vpc-endpoint-vpc",
}),
];
Interface Endpoint
exports.createResources = () => [
{
type: "VpcEndpoint",
group: "EC2",
properties: ({}) => ({
PrivateDnsEnabled: true,
VpcEndpointType: "Interface",
ServiceName: `com.amazonaws.${config.region}.ec2`,
}),
dependencies: () => ({
vpc: "spoke-vpc-2",
subnets: [
"spoke-vpc-2-private-subnet-a",
"spoke-vpc-2-private-subnet-b",
"spoke-vpc-2-private-subnet-c",
],
}),
},
];
Examples
### Properties
Dependencies
Used By
List
gc l -t VpcEndpoint
Listing resources on 1 provider: aws
✓ aws
✓ Initialising
✓ Listing 1/1
┌──────────────────────────────────────────────────────────────────────┐
│ 1 EC2::VpcEndpoint from aws │
├──────────────────────────────────────────────────────────────────────┤
│ name: project-vpc::project-vpc-endpoint-vpce-s3 │
│ managedByUs: Yes │
│ live: │
│ VpcEndpointId: vpce-04c28f6091f2009c1 │
│ VpcEndpointType: Gateway │
│ VpcId: vpc-09b4e35939bf3408b │
│ ServiceName: com.amazonaws.us-east-1.s3 │
│ State: available │
│ PolicyDocument: │
│ Version: 2008-10-17 │
│ Statement: │
│ - Effect: Allow │
│ Principal: * │
│ Action: * │
│ Resource: * │
│ RouteTableIds: │
│ - "rtb-010e7a82091a50e0d" │
│ SubnetIds: [] │
│ Groups: [] │
│ PrivateDnsEnabled: false │
│ RequesterManaged: false │
│ NetworkInterfaceIds: [] │
│ DnsEntries: [] │
│ CreationTimestamp: 2022-03-11T21:08:56.000Z │
│ Tags: │
│ - Key: gc-created-by-provider │
│ Value: aws │
│ - Key: gc-managed-by │
│ Value: grucloud │
│ - Key: gc-project-name │
│ Value: @grucloud/example-aws-ec2-vpb-endpoint │
│ - Key: gc-stage │
│ Value: dev │
│ - Key: Name │
│ Value: project-vpc-endpoint-vpce-s3 │
│ OwnerId: 840541460064 │
│ │
└──────────────────────────────────────────────────────────────────────┘
List Summary:
Provider: aws
┌─────────────────────────────────────────────────────────────────────┐
│ aws │
├──────────────────┬──────────────────────────────────────────────────┤
│ EC2::VpcEndpoint │ project-vpc::project-vpc-endpoint-vpce-s3 │
└──────────────────┴──────────────────────────────────────────────────┘
1 resource, 1 type, 1 provider
Command "gc list -t VpcEndpoint" executed in 3s, 198 MB