CDK Construct for a VPC Endpoint with private IPs
Project description
Interface VPC Endpoint with Private IP
This is a CDK construct that retrieves the private IP address of an Interface VPC Endpoint:
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cdk_vpc_endpoint_with_private_ip-0.0.2.tar.gz
.
File metadata
- Download URL: cdk_vpc_endpoint_with_private_ip-0.0.2.tar.gz
- Upload date:
- Size: 55.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97d40088bfc65a74d980b8ecbae29fc9018b3d18933f93fa7c96056c02339620 |
|
MD5 | c2e8312a189dbbaa14493fc288635d57 |
|
BLAKE2b-256 | cd3b1e3152d5f076b0eebfc10860adef530b7eea7080fb39ae1a22c985eef40a |
File details
Details for the file cdk_vpc_endpoint_with_private_ip-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: cdk_vpc_endpoint_with_private_ip-0.0.2-py3-none-any.whl
- Upload date:
- Size: 54.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9e4e86a0858384e2ccf580e58b8914d6dfd37bd861d33d1592fc617053829da |
|
MD5 | 5d1fd214da13301e516aa4ed863f4e68 |
|
BLAKE2b-256 | 23e7936a4e6ed892c99a9fa8ae082b507b7a0b0218b7512e192ddd6aaa6807df |