From 48b5f4eb6761b8a23e334a156601d178c3fb3f13 Mon Sep 17 00:00:00 2001 From: bun Date: Sat, 11 Feb 2023 17:04:03 +0900 Subject: [PATCH 1/3] fix(ec2): enable set throughput param to CfnVolume --- packages/@aws-cdk/aws-ec2/lib/volume.ts | 1 + packages/@aws-cdk/aws-ec2/test/volume.test.ts | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/packages/@aws-cdk/aws-ec2/lib/volume.ts b/packages/@aws-cdk/aws-ec2/lib/volume.ts index 9c24d4241ef90..ace264dcd64f5 100644 --- a/packages/@aws-cdk/aws-ec2/lib/volume.ts +++ b/packages/@aws-cdk/aws-ec2/lib/volume.ts @@ -620,6 +620,7 @@ export class Volume extends VolumeBase { multiAttachEnabled: props.enableMultiAttach ?? false, size: props.size?.toGibibytes({ rounding: SizeRoundingBehavior.FAIL }), snapshotId: props.snapshotId, + throughput: props.throughput, volumeType: props.volumeType ?? EbsDeviceVolumeType.GENERAL_PURPOSE_SSD, }); resource.applyRemovalPolicy(props.removalPolicy); diff --git a/packages/@aws-cdk/aws-ec2/test/volume.test.ts b/packages/@aws-cdk/aws-ec2/test/volume.test.ts index 56f7db2f314e2..96bd94bb117cf 100644 --- a/packages/@aws-cdk/aws-ec2/test/volume.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/volume.test.ts @@ -249,6 +249,24 @@ describe('volume', () => { }); }); + test('throughput', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new Volume(stack, 'Volume', { + availabilityZone: 'us-east-1a', + size: cdk.Size.gibibytes(1), + volumeType: EbsDeviceVolumeType.GP3, + throughput: 200, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::EC2::Volume', { + Throughput: 200, + }); + }); + test('volume: standard', () => { // GIVEN const stack = new cdk.Stack(); From eacd677cf15b62505740f017e45552d09201d387 Mon Sep 17 00:00:00 2001 From: bun Date: Sat, 11 Feb 2023 21:35:40 +0900 Subject: [PATCH 2/3] feat(ec2): add integ test for volume --- .../@aws-cdk/aws-ec2/test/integ.volume.ts | 20 +++ ...efaultTestDeployAssert896AAE82.assets.json | 19 +++ ...aultTestDeployAssert896AAE82.template.json | 36 +++++ .../aws-cdk-ec2-volume-1.assets.json | 19 +++ .../aws-cdk-ec2-volume-1.template.json | 50 +++++++ .../test/integ.volume.ts.snapshot/cdk.out | 1 + .../test/integ.volume.ts.snapshot/integ.json | 12 ++ .../integ.volume.ts.snapshot/manifest.json | 111 +++++++++++++++ .../test/integ.volume.ts.snapshot/tree.json | 129 ++++++++++++++++++ 9 files changed, 397 insertions(+) create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.ts create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.assets.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.template.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/aws-cdk-ec2-volume-1.assets.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/aws-cdk-ec2-volume-1.template.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/cdk.out create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/integ.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/manifest.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/tree.json diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.ts b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts new file mode 100644 index 0000000000000..59dbafb2b6f26 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts @@ -0,0 +1,20 @@ +import * as cdk from '@aws-cdk/core'; +import * as integ from '@aws-cdk/integ-tests'; +import * as ec2 from '../lib'; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'aws-cdk-ec2-volume-1'); + +new ec2.Volume(stack, 'TestVolume', { + availabilityZone: 'us-east-1a', + size: cdk.Size.gibibytes(1), + volumeType: ec2.EbsDeviceVolumeType.GP3, + throughput: 200, +}); + +new integ.IntegTest(app, 'VolumeTest', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.assets.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.assets.json new file mode 100644 index 0000000000000..38d63a91a6fbf --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "VolumeTestDefaultTestDeployAssert896AAE82.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.template.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/aws-cdk-ec2-volume-1.assets.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/aws-cdk-ec2-volume-1.assets.json new file mode 100644 index 0000000000000..a9c8ffadb5ca7 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/aws-cdk-ec2-volume-1.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "d505fb8b23ebfd0467ebfb179ba7b56714072b4f413d1ee2c2a9465b284985ef": { + "source": { + "path": "aws-cdk-ec2-volume-1.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "d505fb8b23ebfd0467ebfb179ba7b56714072b4f413d1ee2c2a9465b284985ef.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/aws-cdk-ec2-volume-1.template.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/aws-cdk-ec2-volume-1.template.json new file mode 100644 index 0000000000000..0a64e10ae4bac --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/aws-cdk-ec2-volume-1.template.json @@ -0,0 +1,50 @@ +{ + "Resources": { + "TestVolume24F725A4": { + "Type": "AWS::EC2::Volume", + "Properties": { + "AvailabilityZone": "us-east-1a", + "MultiAttachEnabled": false, + "Size": 1, + "Throughput": 200, + "VolumeType": "gp3" + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/cdk.out b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/cdk.out new file mode 100644 index 0000000000000..ae4b03c54e770 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/integ.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/integ.json new file mode 100644 index 0000000000000..880503b2a8e52 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "30.0.0", + "testCases": { + "VolumeTest/DefaultTest": { + "stacks": [ + "aws-cdk-ec2-volume-1" + ], + "assertionStack": "VolumeTest/DefaultTest/DeployAssert", + "assertionStackName": "VolumeTestDefaultTestDeployAssert896AAE82" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/manifest.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/manifest.json new file mode 100644 index 0000000000000..6907eee361685 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/manifest.json @@ -0,0 +1,111 @@ +{ + "version": "30.0.0", + "artifacts": { + "aws-cdk-ec2-volume-1.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-ec2-volume-1.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-ec2-volume-1": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-ec2-volume-1.template.json", + "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}/d505fb8b23ebfd0467ebfb179ba7b56714072b4f413d1ee2c2a9465b284985ef.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-ec2-volume-1.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-cdk-ec2-volume-1.assets" + ], + "metadata": { + "/aws-cdk-ec2-volume-1/TestVolume/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TestVolume24F725A4" + } + ], + "/aws-cdk-ec2-volume-1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-ec2-volume-1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-ec2-volume-1" + }, + "VolumeTestDefaultTestDeployAssert896AAE82.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "VolumeTestDefaultTestDeployAssert896AAE82.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "VolumeTestDefaultTestDeployAssert896AAE82": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "VolumeTestDefaultTestDeployAssert896AAE82.template.json", + "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}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "VolumeTestDefaultTestDeployAssert896AAE82.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "VolumeTestDefaultTestDeployAssert896AAE82.assets" + ], + "metadata": { + "/VolumeTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/VolumeTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "VolumeTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/tree.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/tree.json new file mode 100644 index 0000000000000..8d5aa98126765 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.ts.snapshot/tree.json @@ -0,0 +1,129 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-ec2-volume-1": { + "id": "aws-cdk-ec2-volume-1", + "path": "aws-cdk-ec2-volume-1", + "children": { + "TestVolume": { + "id": "TestVolume", + "path": "aws-cdk-ec2-volume-1/TestVolume", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ec2-volume-1/TestVolume/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Volume", + "aws:cdk:cloudformation:props": { + "availabilityZone": "us-east-1a", + "multiAttachEnabled": false, + "size": 1, + "throughput": 200, + "volumeType": "gp3" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVolume", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Volume", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-ec2-volume-1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-ec2-volume-1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "VolumeTest": { + "id": "VolumeTest", + "path": "VolumeTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "VolumeTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "VolumeTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "VolumeTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "VolumeTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "VolumeTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file From 2bf61bbe410dcf8e7a4fbbdc351534e6f69c1fa5 Mon Sep 17 00:00:00 2001 From: bun Date: Sat, 11 Feb 2023 22:02:11 +0900 Subject: [PATCH 3/3] fix(ec2): build and rerun integ test volume --- ...efaultTestDeployAssert896AAE82.assets.json | 19 +++ ...aultTestDeployAssert896AAE82.template.json | 36 +++++ .../aws-cdk-ec2-volume-1.assets.json | 19 +++ .../aws-cdk-ec2-volume-1.template.json | 50 +++++++ .../test/integ.volume.js.snapshot/cdk.out | 1 + .../test/integ.volume.js.snapshot/integ.json | 12 ++ .../integ.volume.js.snapshot/manifest.json | 111 +++++++++++++++ .../test/integ.volume.js.snapshot/tree.json | 129 ++++++++++++++++++ 8 files changed, 377 insertions(+) create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.assets.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.template.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/aws-cdk-ec2-volume-1.assets.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/aws-cdk-ec2-volume-1.template.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/integ.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/tree.json diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.assets.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.assets.json new file mode 100644 index 0000000000000..38d63a91a6fbf --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "VolumeTestDefaultTestDeployAssert896AAE82.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.template.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/VolumeTestDefaultTestDeployAssert896AAE82.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/aws-cdk-ec2-volume-1.assets.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/aws-cdk-ec2-volume-1.assets.json new file mode 100644 index 0000000000000..a9c8ffadb5ca7 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/aws-cdk-ec2-volume-1.assets.json @@ -0,0 +1,19 @@ +{ + "version": "30.0.0", + "files": { + "d505fb8b23ebfd0467ebfb179ba7b56714072b4f413d1ee2c2a9465b284985ef": { + "source": { + "path": "aws-cdk-ec2-volume-1.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "d505fb8b23ebfd0467ebfb179ba7b56714072b4f413d1ee2c2a9465b284985ef.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/aws-cdk-ec2-volume-1.template.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/aws-cdk-ec2-volume-1.template.json new file mode 100644 index 0000000000000..0a64e10ae4bac --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/aws-cdk-ec2-volume-1.template.json @@ -0,0 +1,50 @@ +{ + "Resources": { + "TestVolume24F725A4": { + "Type": "AWS::EC2::Volume", + "Properties": { + "AvailabilityZone": "us-east-1a", + "MultiAttachEnabled": false, + "Size": 1, + "Throughput": 200, + "VolumeType": "gp3" + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/cdk.out b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/cdk.out new file mode 100644 index 0000000000000..ae4b03c54e770 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"30.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/integ.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/integ.json new file mode 100644 index 0000000000000..880503b2a8e52 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "30.0.0", + "testCases": { + "VolumeTest/DefaultTest": { + "stacks": [ + "aws-cdk-ec2-volume-1" + ], + "assertionStack": "VolumeTest/DefaultTest/DeployAssert", + "assertionStackName": "VolumeTestDefaultTestDeployAssert896AAE82" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/manifest.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/manifest.json new file mode 100644 index 0000000000000..6907eee361685 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/manifest.json @@ -0,0 +1,111 @@ +{ + "version": "30.0.0", + "artifacts": { + "aws-cdk-ec2-volume-1.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-ec2-volume-1.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-ec2-volume-1": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-ec2-volume-1.template.json", + "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}/d505fb8b23ebfd0467ebfb179ba7b56714072b4f413d1ee2c2a9465b284985ef.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-ec2-volume-1.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-cdk-ec2-volume-1.assets" + ], + "metadata": { + "/aws-cdk-ec2-volume-1/TestVolume/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TestVolume24F725A4" + } + ], + "/aws-cdk-ec2-volume-1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-ec2-volume-1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-ec2-volume-1" + }, + "VolumeTestDefaultTestDeployAssert896AAE82.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "VolumeTestDefaultTestDeployAssert896AAE82.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "VolumeTestDefaultTestDeployAssert896AAE82": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "VolumeTestDefaultTestDeployAssert896AAE82.template.json", + "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}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "VolumeTestDefaultTestDeployAssert896AAE82.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "VolumeTestDefaultTestDeployAssert896AAE82.assets" + ], + "metadata": { + "/VolumeTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/VolumeTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "VolumeTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/tree.json b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/tree.json new file mode 100644 index 0000000000000..8d5aa98126765 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/integ.volume.js.snapshot/tree.json @@ -0,0 +1,129 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-ec2-volume-1": { + "id": "aws-cdk-ec2-volume-1", + "path": "aws-cdk-ec2-volume-1", + "children": { + "TestVolume": { + "id": "TestVolume", + "path": "aws-cdk-ec2-volume-1/TestVolume", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ec2-volume-1/TestVolume/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Volume", + "aws:cdk:cloudformation:props": { + "availabilityZone": "us-east-1a", + "multiAttachEnabled": false, + "size": 1, + "throughput": 200, + "volumeType": "gp3" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVolume", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Volume", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-ec2-volume-1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-ec2-volume-1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "VolumeTest": { + "id": "VolumeTest", + "path": "VolumeTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "VolumeTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "VolumeTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "VolumeTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "VolumeTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "VolumeTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.237" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file