0.0.4 • Published 8 months ago

cdk-vpc-endpoint-with-private-ip v0.0.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

Interface VPC Endpoint with Private IP

This is a CDK construct that retrieves the private IP address of an Interface VPC Endpoint:

View on Construct Hub Open in Visual Studio Code npm version Build Status Release Status License npm downloads

Architecture

Architecture

Installation

npm install cdk-vpc-endpoint-with-private-ip

Usage

You can create an interface VPC endpoint and retrive its private IP addresses using the VpcEndpointWithPrivateIp construct.

The ec2.InterfaceVpcEndpointProps can be passed to the construct to configure the interface VPC endpoint.

import { InterfaceVpcEndpointWithPrivateIp } from 'cdk-vpc-endpoint-with-private-ip';
import * as ec2 from 'aws-cdk-lib/aws-ec2';

declare const vpc: ec2.IVpc;

const endpoint = new InterfaceVpcEndpointWithPrivateIp(this, 'Endpoint', {
  vpc,
  service: ec2.InterfaceVpcEndpointAwsService.S3,
});

const privateIps = endpoint.privateIps;

Note: privateIps is an array of CDK Tokens, and the actual IP addresses are not determined until the stack is deployed.

Special Thanks

I am greatly referencing the content of this post.

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

9 months ago

0.0.1

9 months ago

0.0.0

9 months ago