From 57c00a2a969fc1b4b7630505016763e84046aa58 Mon Sep 17 00:00:00 2001 From: shikha372 Date: Fri, 14 Jun 2024 15:39:24 -0700 Subject: [PATCH] addressing last feedback comments --- packages/@aws-cdk/aws-vpcv2-alpha/lib/subnet-v2.ts | 5 ++--- .../aws-cdk-vpcv2-alpha-new.assets.json | 4 ++-- .../aws-cdk-vpcv2-alpha-new.template.json | 1 + .../test/integ.subnet-v2.js.snapshot/manifest.json | 7 +++++-- .../test/integ.subnet-v2.js.snapshot/tree.json | 1 + 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/@aws-cdk/aws-vpcv2-alpha/lib/subnet-v2.ts b/packages/@aws-cdk/aws-vpcv2-alpha/lib/subnet-v2.ts index 5e54993ae78d5..665e6248880fb 100644 --- a/packages/@aws-cdk/aws-vpcv2-alpha/lib/subnet-v2.ts +++ b/packages/@aws-cdk/aws-vpcv2-alpha/lib/subnet-v2.ts @@ -126,9 +126,8 @@ export class SubnetV2 extends Resource implements ISubnet { constructor(scope: Construct, id: string, props: SubnetPropsV2) { super(scope, id); - let ipv4CidrBlock: string | undefined; - let ipv6CidrBlock: string| undefined; - + let ipv4CidrBlock: string = ''; + let ipv6CidrBlock: string = ''; if (props.cidrBlock instanceof Ipv4Cidr) { ipv4CidrBlock = props.cidrBlock.cidr; } else if (props.cidrBlock instanceof Ipv6Cidr) { diff --git a/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/aws-cdk-vpcv2-alpha-new.assets.json b/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/aws-cdk-vpcv2-alpha-new.assets.json index 79f70b14bae98..56417c37936c4 100644 --- a/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/aws-cdk-vpcv2-alpha-new.assets.json +++ b/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/aws-cdk-vpcv2-alpha-new.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "441acbb4f96789feb207fab29ab31bbaa9e73d499b52cabf7ff2bc7763db0a17": { + "97187802dbd9211ecabaa11a38b49495d71b4e12fd0c8c27d304d32497b9212d": { "source": { "path": "aws-cdk-vpcv2-alpha-new.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "441acbb4f96789feb207fab29ab31bbaa9e73d499b52cabf7ff2bc7763db0a17.json", + "objectKey": "97187802dbd9211ecabaa11a38b49495d71b4e12fd0c8c27d304d32497b9212d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/aws-cdk-vpcv2-alpha-new.template.json b/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/aws-cdk-vpcv2-alpha-new.template.json index 8cc75c7b08364..26331711728ff 100644 --- a/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/aws-cdk-vpcv2-alpha-new.template.json +++ b/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/aws-cdk-vpcv2-alpha-new.template.json @@ -100,6 +100,7 @@ "Properties": { "AvailabilityZone": "us-west-2a", "CidrBlock": "10.0.0.0/24", + "Ipv6CidrBlock": "", "VpcId": { "Fn::GetAtt": [ "VPCTestFB735C86", diff --git a/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/manifest.json b/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/manifest.json index d033b3f3e69a2..6ca1f5aa5cd71 100644 --- a/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/441acbb4f96789feb207fab29ab31bbaa9e73d499b52cabf7ff2bc7763db0a17.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/97187802dbd9211ecabaa11a38b49495d71b4e12fd0c8c27d304d32497b9212d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -85,7 +85,10 @@ "/aws-cdk-vpcv2-alpha-new/testsbubnet/Subnet": [ { "type": "aws:cdk:logicalId", - "data": "testsbubnetSubnet77337845" + "data": "testsbubnetSubnet77337845", + "trace": [ + "!!DESTRUCTIVE_CHANGES: MAY_REPLACE" + ] } ], "/aws-cdk-vpcv2-alpha-new/testsbubnet/RouteTable": [ diff --git a/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/tree.json b/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/tree.json index 643614720b36f..1cb0358a1a707 100644 --- a/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-vpcv2-alpha/test/integ.subnet-v2.js.snapshot/tree.json @@ -197,6 +197,7 @@ "aws:cdk:cloudformation:props": { "availabilityZone": "us-west-2a", "cidrBlock": "10.0.0.0/24", + "ipv6CidrBlock": "", "vpcId": { "Fn::GetAtt": [ "VPCTestFB735C86",