Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-cdk/aws-ec2

Package Overview
Dependencies
Maintainers
5
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-ec2 - npm Package Compare versions

Comparing version 0.27.0 to 0.28.0

13

lib/vpc.d.ts

@@ -163,6 +163,17 @@ import cdk = require('@aws-cdk/cdk');

*
* Thi name will be suffixed with an integer correlating to a specific
* This name will be suffixed with an integer correlating to a specific
* availability zone.
*/
readonly name: string;
/**
* Controls if subnet IP space needs to be reserved.
*
* When true, the IP space for the subnet is reserved but no actual
* resources are provisioned. This space is only dependent on the
* number of availibility zones and on `cidrMask` - all other subnet
* properties are ignored.
*
* @default false
*/
readonly reserved?: boolean;
}

@@ -169,0 +180,0 @@ /**

26

package.json
{
"name": "@aws-cdk/aws-ec2",
"version": "0.27.0",
"version": "0.28.0",
"description": "CDK Constructs for AWS EC2",

@@ -61,19 +61,19 @@ "main": "lib/index.js",

"devDependencies": {
"@aws-cdk/assert": "^0.27.0",
"cdk-build-tools": "^0.27.0",
"cdk-integ-tools": "^0.27.0",
"cfn2ts": "^0.27.0",
"pkglint": "^0.27.0"
"@aws-cdk/assert": "^0.28.0",
"cdk-build-tools": "^0.28.0",
"cdk-integ-tools": "^0.28.0",
"cfn2ts": "^0.28.0",
"pkglint": "^0.28.0"
},
"dependencies": {
"@aws-cdk/aws-cloudwatch": "^0.27.0",
"@aws-cdk/aws-iam": "^0.27.0",
"@aws-cdk/cdk": "^0.27.0",
"@aws-cdk/cx-api": "^0.27.0"
"@aws-cdk/aws-cloudwatch": "^0.28.0",
"@aws-cdk/aws-iam": "^0.28.0",
"@aws-cdk/cdk": "^0.28.0",
"@aws-cdk/cx-api": "^0.28.0"
},
"homepage": "https://github.com/awslabs/aws-cdk",
"peerDependencies": {
"@aws-cdk/aws-cloudwatch": "^0.27.0",
"@aws-cdk/cdk": "^0.27.0",
"@aws-cdk/cx-api": "^0.27.0"
"@aws-cdk/aws-cloudwatch": "^0.28.0",
"@aws-cdk/cdk": "^0.28.0",
"@aws-cdk/cx-api": "^0.28.0"
},

@@ -80,0 +80,0 @@ "engines": {

@@ -175,2 +175,48 @@ ## AWS Compute and Networking Construct Library

#### Reserving subnet IP space
There are situations where the IP space for a subnet or number of subnets
will need to be reserved. This is useful in situations where subnets
would need to be added after the vpc is originally deployed, without causing
IP renumbering for existing subnets. The IP space for a subnet may be reserved
by setting the `reserved` subnetConfiguration property to true, as shown below:
```ts
import ec2 = require('@aws-cdk/aws-ec2');
const vpc = new ec2.VpcNetwork(this, 'TheVPC', {
cidr: '10.0.0.0/16',
natGateways: 1,
subnetConfiguration: [
{
cidrMask: 26,
name: 'Public',
subnetType: SubnetType.Public,
},
{
cidrMask: 26,
name: 'Application1',
subnetType: SubnetType.Private,
},
{
cidrMask: 26,
name: 'Application2',
subnetType: SubnetType.Private,
reserved: true,
},
{
cidrMask: 27,
name: 'Database',
subnetType: SubnetType.Isolated,
}
],
});
```
In the example above, the subnet for Application2 is not actually provisioned
but its IP space is still reserved. If in the future this subnet needs to be
provisioned, then the `reserved: true` property should be removed. Most
importantly, this action would not cause the Database subnet to get renumbered,
but rather the IP space that was previously reserved will be used for the
subnet provisioned for Application2. The `reserved` property also takes into
consideration the number of availability zones when reserving IP space.
#### Sharing VPCs between stacks

@@ -177,0 +223,0 @@

@@ -14,2 +14,4 @@ import { Test } from 'nodeunit';

"with no subnets defined, the VPC should have an IGW, and a NAT Gateway per AZ"(test: Test): void;
"with subnets and reserved subnets defined, VPC subnet count should not contain reserved subnets "(test: Test): void;
"with reserved subents, any other subnets should not have cidrBlock from within reserved space"(test: Test): void;
"with custom subents, the VPC should have the right number of subnets, an IGW, and a NAT Gateway per AZ"(test: Test): void;

@@ -16,0 +18,0 @@ "with custom subents and natGateways = 2 there should be only two NATGW"(test: Test): void;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc