diff --git a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/BatchWithEFSTestDefaultTestDeployAssert0F887B55.assets.json b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/BatchWithEFSTestDefaultTestDeployAssert0F887B55.assets.json index 6f2911b10864e..3a915fbe9e315 100644 --- a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/BatchWithEFSTestDefaultTestDeployAssert0F887B55.assets.json +++ b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/BatchWithEFSTestDefaultTestDeployAssert0F887B55.assets.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.1.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/batch-stack.assets.json b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/batch-stack.assets.json index f5ced56610124..4f1e56ca8afe6 100644 --- a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/batch-stack.assets.json +++ b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/batch-stack.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.1.0", "files": { - "742f32336d22265973f0e225f7f35f8254d591f606eb0b3fbbc4ffbe4909a323": { + "dea8441064e2b7f93a29d086bcfc92bbdd9b163aed56cc08208f3ec941e96441": { "source": { "path": "batch-stack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "742f32336d22265973f0e225f7f35f8254d591f606eb0b3fbbc4ffbe4909a323.json", + "objectKey": "dea8441064e2b7f93a29d086bcfc92bbdd9b163aed56cc08208f3ec941e96441.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-batch/test/integ.batch-with-efs.js.snapshot/batch-stack.template.json b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/batch-stack.template.json index 76d049affafdb..e7cf6f760094e 100644 --- a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/batch-stack.template.json +++ b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/batch-stack.template.json @@ -577,6 +577,12 @@ "FileSystemId": { "Ref": "EFSF3301CFD" }, + "AccessPointTags": [ + { + "Key": "Name", + "Value": "batch-stack/EFSAccessPoint" + } + ], "PosixUser": { "Gid": "1000", "Uid": "1000" diff --git a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/cdk.out b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/cdk.out index 588d7b269d34f..b72fef144f05c 100644 --- a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.1.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/integ.json b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/integ.json index d96168e1c2dd6..c48cd863fc5e6 100644 --- a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.1.0", "testCases": { "BatchWithEFSTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/manifest.json b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/manifest.json index 0f03538f69fa3..57c6b4202d2fe 100644 --- a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "21.0.0", + "version": "30.1.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "batch-stack.assets": { "type": "cdk:asset-manifest", "properties": { @@ -23,7 +17,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}/742f32336d22265973f0e225f7f35f8254d591f606eb0b3fbbc4ffbe4909a323.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dea8441064e2b7f93a29d086bcfc92bbdd9b163aed56cc08208f3ec941e96441.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -490,6 +484,12 @@ ] }, "displayName": "BatchWithEFSTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/tree.json b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/tree.json index a6ba9cf4b5ca2..bece4c4bbb608 100644 --- a/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-batch/test/integ.batch-with-efs.js.snapshot/tree.json @@ -4,14 +4,6 @@ "id": "App", "path": "", "children": { - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.140" - } - }, "batch-stack": { "id": "batch-stack", "path": "batch-stack", @@ -942,6 +934,12 @@ "fileSystemId": { "Ref": "EFSF3301CFD" }, + "accessPointTags": [ + { + "key": "Name", + "value": "batch-stack/EFSAccessPoint" + } + ], "posixUser": { "uid": "1000", "gid": "1000" @@ -970,6 +968,14 @@ "id": "DefaultJobRole", "path": "batch-stack/DefaultJobRole", "children": { + "ImportDefaultJobRole": { + "id": "ImportDefaultJobRole", + "path": "batch-stack/DefaultJobRole/ImportDefaultJobRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "batch-stack/DefaultJobRole/Resource", @@ -1132,6 +1138,14 @@ "id": "Ecs-Instance-Role", "path": "batch-stack/batch-demand-compute-env-launch-template/Ecs-Instance-Role", "children": { + "ImportEcs-Instance-Role": { + "id": "ImportEcs-Instance-Role", + "path": "batch-stack/batch-demand-compute-env-launch-template/Ecs-Instance-Role/ImportEcs-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "batch-stack/batch-demand-compute-env-launch-template/Ecs-Instance-Role/Resource", @@ -1199,6 +1213,14 @@ "id": "Resource-Service-Instance-Role", "path": "batch-stack/batch-demand-compute-env-launch-template/Resource-Service-Instance-Role", "children": { + "ImportResource-Service-Instance-Role": { + "id": "ImportResource-Service-Instance-Role", + "path": "batch-stack/batch-demand-compute-env-launch-template/Resource-Service-Instance-Role/ImportResource-Service-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "batch-stack/batch-demand-compute-env-launch-template/Resource-Service-Instance-Role/Resource", @@ -1358,6 +1380,14 @@ "id": "Ecs-Instance-Role", "path": "batch-stack/batch-spot-compute-env/Ecs-Instance-Role", "children": { + "ImportEcs-Instance-Role": { + "id": "ImportEcs-Instance-Role", + "path": "batch-stack/batch-spot-compute-env/Ecs-Instance-Role/ImportEcs-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "batch-stack/batch-spot-compute-env/Ecs-Instance-Role/Resource", @@ -1425,6 +1455,14 @@ "id": "Resource-Service-Instance-Role", "path": "batch-stack/batch-spot-compute-env/Resource-Service-Instance-Role", "children": { + "ImportResource-Service-Instance-Role": { + "id": "ImportResource-Service-Instance-Role", + "path": "batch-stack/batch-spot-compute-env/Resource-Service-Instance-Role/ImportResource-Service-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "batch-stack/batch-spot-compute-env/Resource-Service-Instance-Role/Resource", @@ -1587,6 +1625,14 @@ "id": "Ecs-Instance-Role", "path": "batch-stack/batch-demand-compute-env-launch-template-2/Ecs-Instance-Role", "children": { + "ImportEcs-Instance-Role": { + "id": "ImportEcs-Instance-Role", + "path": "batch-stack/batch-demand-compute-env-launch-template-2/Ecs-Instance-Role/ImportEcs-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "batch-stack/batch-demand-compute-env-launch-template-2/Ecs-Instance-Role/Resource", @@ -1654,6 +1700,14 @@ "id": "Resource-Service-Instance-Role", "path": "batch-stack/batch-demand-compute-env-launch-template-2/Resource-Service-Instance-Role", "children": { + "ImportResource-Service-Instance-Role": { + "id": "ImportResource-Service-Instance-Role", + "path": "batch-stack/batch-demand-compute-env-launch-template-2/Resource-Service-Instance-Role/ImportResource-Service-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "batch-stack/batch-demand-compute-env-launch-template-2/Resource-Service-Instance-Role/Resource", @@ -1852,6 +1906,14 @@ "id": "Resource-Service-Instance-Role", "path": "batch-stack/batch-fargate-compute-env/Resource-Service-Instance-Role", "children": { + "ImportResource-Service-Instance-Role": { + "id": "ImportResource-Service-Instance-Role", + "path": "batch-stack/batch-fargate-compute-env/Resource-Service-Instance-Role/ImportResource-Service-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "batch-stack/batch-fargate-compute-env/Resource-Service-Instance-Role/Resource", @@ -1986,6 +2048,14 @@ "id": "Resource-Service-Instance-Role", "path": "batch-stack/batch-fargate-spot-compute-env/Resource-Service-Instance-Role", "children": { + "ImportResource-Service-Instance-Role": { + "id": "ImportResource-Service-Instance-Role", + "path": "batch-stack/batch-fargate-spot-compute-env/Resource-Service-Instance-Role/ImportResource-Service-Instance-Role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "batch-stack/batch-fargate-spot-compute-env/Resource-Service-Instance-Role/Resource", @@ -2313,6 +2383,14 @@ "id": "execution-role", "path": "batch-stack/execution-role", "children": { + "Importexecution-role": { + "id": "Importexecution-role", + "path": "batch-stack/execution-role/Importexecution-role", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "batch-stack/execution-role/Resource", @@ -2502,6 +2580,22 @@ "fqn": "@aws-cdk/aws-batch.JobDefinition", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "batch-stack/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "batch-stack/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, "constructInfo": { @@ -2522,12 +2616,30 @@ "path": "BatchWithEFSTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.140" + "version": "10.1.252" } }, "DeployAssert": { "id": "DeployAssert", "path": "BatchWithEFSTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "BatchWithEFSTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "BatchWithEFSTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "@aws-cdk/core.Stack", "version": "0.0.0" @@ -2544,6 +2656,14 @@ "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.252" + } } }, "constructInfo": { diff --git a/packages/@aws-cdk/aws-efs/lib/access-point.ts b/packages/@aws-cdk/aws-efs/lib/access-point.ts index 74eefa878773e..41424f96378e5 100644 --- a/packages/@aws-cdk/aws-efs/lib/access-point.ts +++ b/packages/@aws-cdk/aws-efs/lib/access-point.ts @@ -1,4 +1,4 @@ -import { ArnFormat, IResource, Resource, Stack } from '@aws-cdk/core'; +import { ArnFormat, IResource, Resource, Stack, Tags } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { IFileSystem } from './efs-file-system'; import { CfnAccessPoint } from './efs.generated'; @@ -218,6 +218,8 @@ export class AccessPoint extends AccessPointBase { } : undefined, }); + Tags.of(this).add('Name', this.node.path); + this.accessPointId = resource.ref; this.accessPointArn = Stack.of(scope).formatArn({ service: 'elasticfilesystem', diff --git a/packages/@aws-cdk/aws-efs/test/access-point.test.ts b/packages/@aws-cdk/aws-efs/test/access-point.test.ts index 488dbb93dee4f..6571be822a720 100644 --- a/packages/@aws-cdk/aws-efs/test/access-point.test.ts +++ b/packages/@aws-cdk/aws-efs/test/access-point.test.ts @@ -1,6 +1,6 @@ import { Template } from '@aws-cdk/assertions'; import * as ec2 from '@aws-cdk/aws-ec2'; -import { Stack } from '@aws-cdk/core'; +import { Stack, Tags } from '@aws-cdk/core'; import { AccessPoint, FileSystem } from '../lib'; let stack: Stack; @@ -31,6 +31,25 @@ test('new AccessPoint correctly', () => { Template.fromStack(stack).resourceCountIs('AWS::EFS::AccessPoint', 1); }); +test('support tags for AccessPoint', () => { + // WHEN + const accessPoint = new AccessPoint(stack, 'MyAccessPoint', { + fileSystem, + }); + Tags.of(accessPoint).add('key1', 'value1'); + Tags.of(accessPoint).add('key2', 'value2'); + Tags.of(accessPoint).add('Name', 'MyAccessPointName'); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::EFS::AccessPoint', { + AccessPointTags: [ + { Key: 'key1', Value: 'value1' }, + { Key: 'key2', Value: 'value2' }, + { Key: 'Name', Value: 'MyAccessPointName' }, + ], + }); +}); + test('import an AccessPoint using fromAccessPointId', () => { // WHEN const ap = new AccessPoint(stack, 'MyAccessPoint', { diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.assets.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.assets.json index 63310c336fab4..c89606077c44e 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.assets.json +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/FileSystemPolicyTestDefaultTestDeployAssertD0596FC1.assets.json @@ -1,5 +1,5 @@ { - "version": "30.0.0", + "version": "30.1.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/cdk.out b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/cdk.out index ae4b03c54e770..b72fef144f05c 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"30.0.0"} \ No newline at end of file +{"version":"30.1.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/integ.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/integ.json index 92343ca276aaf..a5b791d6df896 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "30.0.0", + "version": "30.1.0", "testCases": { "FileSystemPolicyTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/manifest.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/manifest.json index e59b3eec02264..3c673ba5033f3 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "30.0.0", + "version": "30.1.0", "artifacts": { "test-efs-integ.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,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}/c5e7b14cbe61beadd8ee29f1e2e8da7ac152bf472dfba586a792ff422a1eef41.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7d5832d3a930b18cb36abc1ffaed24a2bf408a8130ba7fab108ff6f6fa75dd98.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -183,6 +183,12 @@ "data": "FileSystemEfsMountTarget24B8EBB43" } ], + "/test-efs-integ/AccessPoint/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "AccessPointE936DE82" + } + ], "/test-efs-integ/BootstrapVersion": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.assets.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.assets.json index 4b4483a20346e..2c398da3f69db 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.assets.json +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "30.0.0", + "version": "30.1.0", "files": { - "c5e7b14cbe61beadd8ee29f1e2e8da7ac152bf472dfba586a792ff422a1eef41": { + "7d5832d3a930b18cb36abc1ffaed24a2bf408a8130ba7fab108ff6f6fa75dd98": { "source": { "path": "test-efs-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c5e7b14cbe61beadd8ee29f1e2e8da7ac152bf472dfba586a792ff422a1eef41.json", + "objectKey": "7d5832d3a930b18cb36abc1ffaed24a2bf408a8130ba7fab108ff6f6fa75dd98.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-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.template.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.template.json index 7abbbf57f980e..0349d15da0f88 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.template.json +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/test-efs-integ.template.json @@ -464,6 +464,21 @@ "Ref": "VpcPrivateSubnet2Subnet3788AAA1" } } + }, + "AccessPointE936DE82": { + "Type": "AWS::EFS::AccessPoint", + "Properties": { + "FileSystemId": { + "Ref": "FileSystem8A8E25C0" + }, + "AccessPointTags": [ + { + "Key": "Name", + "Value": "MyAccessPoint" + } + ], + "RootDirectory": {} + } } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/tree.json b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/tree.json index d231356b874e9..b32beb54b1e25 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.js.snapshot/tree.json @@ -763,6 +763,39 @@ "version": "0.0.0" } }, + "AccessPoint": { + "id": "AccessPoint", + "path": "test-efs-integ/AccessPoint", + "children": { + "Resource": { + "id": "Resource", + "path": "test-efs-integ/AccessPoint/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EFS::AccessPoint", + "aws:cdk:cloudformation:props": { + "fileSystemId": { + "Ref": "FileSystem8A8E25C0" + }, + "accessPointTags": [ + { + "key": "Name", + "value": "MyAccessPoint" + } + ], + "rootDirectory": {} + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-efs.CfnAccessPoint", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-efs.AccessPoint", + "version": "0.0.0" + } + }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "test-efs-integ/BootstrapVersion", @@ -798,7 +831,7 @@ "path": "FileSystemPolicyTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.249" + "version": "10.1.252" } }, "DeployAssert": { @@ -844,7 +877,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.249" + "version": "10.1.252" } } }, diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.ts b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.ts index a468a6822e2f1..79f40dccec337 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.ts +++ b/packages/@aws-cdk/aws-efs/test/integ.efs-filesystem-policy.ts @@ -3,7 +3,7 @@ import { AccountRootPrincipal, PolicyDocument, PolicyStatement } from '@aws-cdk/ import * as cdk from '@aws-cdk/core'; // eslint-disable-next-line import/no-extraneous-dependencies import * as integ from '@aws-cdk/integ-tests'; -import { FileSystem } from '../lib'; +import { AccessPoint, FileSystem } from '../lib'; const app = new cdk.App(); const stack = new cdk.Stack(app, 'test-efs-integ'); @@ -26,12 +26,17 @@ const myFileSystemPolicy = new PolicyDocument({ })], }); -new FileSystem(stack, 'FileSystem', { +const fileSystem = new FileSystem(stack, 'FileSystem', { vpc, fileSystemPolicy: myFileSystemPolicy, }); +const accessPoint = new AccessPoint(stack, 'AccessPoint', { + fileSystem, +}); +cdk.Tags.of(accessPoint).add('Name', 'MyAccessPoint'); + new integ.IntegTest(app, 'FileSystemPolicyTest', { testCases: [stack], }); -app.synth(); \ No newline at end of file +app.synth(); diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/cdk.out b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/cdk.out index 588d7b269d34f..b72fef144f05c 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"30.1.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/integ.json b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/integ.json index 4d02881b45ff2..5092c4c2a994c 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "30.1.0", "testCases": { "integ.efs": { "stacks": [ diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/manifest.json b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/manifest.json index a38f0441c01ba..e46186a23e262 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "20.0.0", + "version": "30.1.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "test-efs-integ.assets": { "type": "cdk:asset-manifest", "properties": { @@ -23,7 +17,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}/5a176f99ace1339beed54ef48f307a4119e039540eec6e4f95196f9f2ce08b41.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bf1856ec9969cccf2ed5dcc40acf92ce4870f877b88f68aa2813b3feb3c775af.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -209,6 +203,12 @@ ] }, "displayName": "test-efs-integ" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/test-efs-integ.assets.json b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/test-efs-integ.assets.json index 6b72588d8271c..f6e5a2cd9a4ed 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/test-efs-integ.assets.json +++ b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/test-efs-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "20.0.0", + "version": "30.1.0", "files": { - "5a176f99ace1339beed54ef48f307a4119e039540eec6e4f95196f9f2ce08b41": { + "bf1856ec9969cccf2ed5dcc40acf92ce4870f877b88f68aa2813b3feb3c775af": { "source": { "path": "test-efs-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5a176f99ace1339beed54ef48f307a4119e039540eec6e4f95196f9f2ce08b41.json", + "objectKey": "bf1856ec9969cccf2ed5dcc40acf92ce4870f877b88f68aa2813b3feb3c775af.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-efs/test/integ.efs.js.snapshot/test-efs-integ.template.json b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/test-efs-integ.template.json index 3db99e3c0979d..ca89c3654f94a 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/test-efs-integ.template.json +++ b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/test-efs-integ.template.json @@ -435,6 +435,12 @@ "FileSystemId": { "Ref": "FileSystem8A8E25C0" }, + "AccessPointTags": [ + { + "Key": "Name", + "Value": "test-efs-integ/FileSystem/AccessPoint" + } + ], "PosixUser": { "Gid": "1000", "Uid": "1000" diff --git a/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/tree.json b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/tree.json index 21c6134519363..ea1056800dbb4 100644 --- a/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-efs/test/integ.efs.js.snapshot/tree.json @@ -4,14 +4,6 @@ "id": "App", "path": "", "children": { - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" - } - }, "test-efs-integ": { "id": "test-efs-integ", "path": "test-efs-integ", @@ -91,8 +83,8 @@ "id": "Acl", "path": "test-efs-integ/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -258,8 +250,8 @@ "id": "Acl", "path": "test-efs-integ/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -377,8 +369,8 @@ "id": "Acl", "path": "test-efs-integ/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -496,8 +488,8 @@ "id": "Acl", "path": "test-efs-integ/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -742,6 +734,12 @@ "fileSystemId": { "Ref": "FileSystem8A8E25C0" }, + "accessPointTags": [ + { + "key": "Name", + "value": "test-efs-integ/FileSystem/AccessPoint" + } + ], "posixUser": { "uid": "1000", "gid": "1000" @@ -772,17 +770,41 @@ "fqn": "@aws-cdk/aws-efs.FileSystem", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "test-efs-integ/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "test-efs-integ/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.252" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/aws-cdk-lambda-1.assets.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/aws-cdk-lambda-1.assets.json index 2bf00b6e59333..029e733f879ae 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/aws-cdk-lambda-1.assets.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/aws-cdk-lambda-1.assets.json @@ -1,7 +1,7 @@ { - "version": "21.0.0", + "version": "30.1.0", "files": { - "db659d970a5c19f47e5b73f555e343ee0dbc0d912df8c8b17b6fa0ebfab283b8": { + "99f646d44e5cdeefa552647d4c7ab32663f1ba5316065e52de38d8530187ab1d": { "source": { "path": "aws-cdk-lambda-1.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "db659d970a5c19f47e5b73f555e343ee0dbc0d912df8c8b17b6fa0ebfab283b8.json", + "objectKey": "99f646d44e5cdeefa552647d4c7ab32663f1ba5316065e52de38d8530187ab1d.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-lambda/test/integ.lambda.filesystem.js.snapshot/aws-cdk-lambda-1.template.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/aws-cdk-lambda-1.template.json index 533cfb5d55526..1197d43cbbd41 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/aws-cdk-lambda-1.template.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/aws-cdk-lambda-1.template.json @@ -456,6 +456,12 @@ "FileSystemId": { "Ref": "Efs9E8BF36B" }, + "AccessPointTags": [ + { + "Key": "Name", + "Value": "aws-cdk-lambda-1/Efs/AccessPoint" + } + ], "PosixUser": { "Gid": "1001", "Uid": "1001" diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/cdk.out index 8ecc185e9dbee..b72fef144f05c 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"21.0.0"} \ No newline at end of file +{"version":"30.1.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/integ.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/integ.json index 1b9167c9341cb..4e4f69a9e5e34 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "21.0.0", + "version": "30.1.0", "testCases": { "integ.lambda.filesystem": { "stacks": [ diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/manifest.json index 8c79792676aa1..3fcc769449284 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/manifest.json @@ -1,12 +1,6 @@ { - "version": "21.0.0", + "version": "30.1.0", "artifacts": { - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - }, "aws-cdk-lambda-1.assets": { "type": "cdk:asset-manifest", "properties": { @@ -23,7 +17,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}/db659d970a5c19f47e5b73f555e343ee0dbc0d912df8c8b17b6fa0ebfab283b8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/99f646d44e5cdeefa552647d4c7ab32663f1ba5316065e52de38d8530187ab1d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -269,6 +263,12 @@ ] }, "displayName": "aws-cdk-lambda-1" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/tree.json b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/tree.json index f9eaeccd551b2..09d8a80dd8a6b 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.lambda.filesystem.js.snapshot/tree.json @@ -4,14 +4,6 @@ "id": "App", "path": "", "children": { - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" - } - }, "aws-cdk-lambda-1": { "id": "aws-cdk-lambda-1", "path": "aws-cdk-lambda-1", @@ -771,6 +763,12 @@ "fileSystemId": { "Ref": "Efs9E8BF36B" }, + "accessPointTags": [ + { + "key": "Name", + "value": "aws-cdk-lambda-1/Efs/AccessPoint" + } + ], "posixUser": { "uid": "1001", "gid": "1001" @@ -810,6 +808,14 @@ "id": "ServiceRole", "path": "aws-cdk-lambda-1/MyLambda/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-lambda-1/MyLambda/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-lambda-1/MyLambda/ServiceRole/Resource", @@ -1133,6 +1139,14 @@ "id": "ServiceRole", "path": "aws-cdk-lambda-1/MyLambda2/ServiceRole", "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-lambda-1/MyLambda2/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, "Resource": { "id": "Resource", "path": "aws-cdk-lambda-1/MyLambda2/ServiceRole/Resource", @@ -1392,12 +1406,36 @@ "fqn": "@aws-cdk/aws-lambda.Function", "version": "0.0.0" } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-lambda-1/BootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-lambda-1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnRule", + "version": "0.0.0" + } } }, "constructInfo": { "fqn": "@aws-cdk/core.Stack", "version": "0.0.0" } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.252" + } } }, "constructInfo": { diff --git a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip index d1065f07d934c..f62fe1e5a06d6 100644 Binary files a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip and b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip differ diff --git a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/asset.e3900c1e0365029a742f5b51f9ccb158093a5e209a71840a41f9793498c3ed1b.bundle/index.js b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js similarity index 60% rename from packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/asset.e3900c1e0365029a742f5b51f9ccb158093a5e209a71840a41f9793498c3ed1b.bundle/index.js rename to packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js index d26d8b290deae..58bcb1ef7f38e 100644 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/asset.e3900c1e0365029a742f5b51f9ccb158093a5e209a71840a41f9793498c3ed1b.bundle/index.js +++ b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle/index.js @@ -1,3 +1,4 @@ +"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; @@ -17,6 +18,10 @@ var __copyProps = (to, from, except, desc) => { return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); @@ -33,40 +38,83 @@ module.exports = __toCommonJS(lambda_handler_exports); // ../assertions/lib/matcher.ts var Matcher = class { + /** + * Check whether the provided object is a subtype of the `IMatcher`. + */ static isMatcher(x) { return x && x instanceof Matcher; } }; var MatchResult = class { constructor(target) { - this.failures = []; + this.failuresHere = /* @__PURE__ */ new Map(); this.captures = /* @__PURE__ */ new Map(); this.finalized = false; + this.innerMatchFailures = /* @__PURE__ */ new Map(); + this._hasFailed = false; + this._failCount = 0; + this._cost = 0; this.target = target; } + /** + * DEPRECATED + * @deprecated use recordFailure() + */ push(matcher, path, message) { return this.recordFailure({ matcher, path, message }); } + /** + * Record a new failure into this result at a specific path. + */ recordFailure(failure) { - this.failures.push(failure); + const failKey = failure.path.join("."); + let list = this.failuresHere.get(failKey); + if (!list) { + list = []; + this.failuresHere.set(failKey, list); + } + this._failCount += 1; + this._cost += failure.cost ?? 1; + list.push(failure); + this._hasFailed = true; return this; } + /** Whether the match is a success */ + get isSuccess() { + return !this._hasFailed; + } + /** Does the result contain any failures. If not, the result is a success */ hasFailed() { - return this.failures.length !== 0; + return this._hasFailed; } + /** The number of failures */ get failCount() { - return this.failures.length; + return this._failCount; } + /** The cost of the failures so far */ + get failCost() { + return this._cost; + } + /** + * Compose the results of a previous match as a subtree. + * @param id the id of the parent tree. + */ compose(id, inner) { - const innerF = inner.failures; - this.failures.push(...innerF.map((f) => { - return { path: [id, ...f.path], message: f.message, matcher: f.matcher }; - })); + if (inner.hasFailed()) { + this._hasFailed = true; + this._failCount += inner.failCount; + this._cost += inner._cost; + this.innerMatchFailures.set(id, inner); + } inner.captures.forEach((vals, capture) => { vals.forEach((value) => this.recordCapture({ capture, value })); }); return this; } + /** + * Prepare the result to be analyzed. + * This API *must* be called prior to analyzing these results. + */ finished() { if (this.finalized) { return this; @@ -77,12 +125,169 @@ var MatchResult = class { this.finalized = true; return this; } + /** + * Render the failed match in a presentable way + * + * Prefer using `renderMismatch` over this method. It is left for backwards + * compatibility for test suites that expect it, but `renderMismatch()` will + * produce better output. + */ toHumanStrings() { - return this.failures.map((r) => { - const loc = r.path.length === 0 ? "" : ` at ${r.path.join("")}`; + const failures = new Array(); + debugger; + recurse(this, []); + return failures.map((r) => { + const loc = r.path.length === 0 ? "" : ` at /${r.path.join("/")}`; return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`; }); + function recurse(x, prefix) { + for (const fail of Array.from(x.failuresHere.values()).flat()) { + failures.push({ + matcher: fail.matcher, + message: fail.message, + path: [...prefix, ...fail.path] + }); + } + for (const [key, inner] of x.innerMatchFailures.entries()) { + recurse(inner, [...prefix, key]); + } + } } + /** + * Do a deep render of the match result, showing the structure mismatches in context + */ + renderMismatch() { + if (!this.hasFailed()) { + return ""; + } + const parts = new Array(); + const indents = new Array(); + emitFailures(this, ""); + recurse(this); + return moveMarkersToFront(parts.join("").trimEnd()); + function emit(x) { + if (x === void 0) { + debugger; + } + parts.push(x.replace(/\n/g, ` +${indents.join("")}`)); + } + function emitFailures(r, path, scrapSet) { + for (const fail of r.failuresHere.get(path) ?? []) { + emit(`!! ${fail.message} +`); + } + scrapSet == null ? void 0 : scrapSet.delete(path); + } + function recurse(r) { + const remainingFailures = new Set(Array.from(r.failuresHere.keys()).filter((x) => x !== "")); + if (Array.isArray(r.target)) { + indents.push(" "); + emit("[\n"); + for (const [first, i] of enumFirst(range(r.target.length))) { + if (!first) { + emit(",\n"); + } + emitFailures(r, `${i}`, remainingFailures); + const innerMatcher = r.innerMatchFailures.get(`${i}`); + if (innerMatcher) { + emitFailures(innerMatcher, ""); + recurseComparingValues(innerMatcher, r.target[i]); + } else { + emit(renderAbridged(r.target[i])); + } + } + emitRemaining(); + indents.pop(); + emit("\n]"); + return; + } + if (r.target && typeof r.target === "object") { + indents.push(" "); + emit("{\n"); + const keys = Array.from(/* @__PURE__ */ new Set([ + ...Object.keys(r.target), + ...Array.from(remainingFailures) + ])).sort(); + for (const [first, key] of enumFirst(keys)) { + if (!first) { + emit(",\n"); + } + emitFailures(r, key, remainingFailures); + const innerMatcher = r.innerMatchFailures.get(key); + if (innerMatcher) { + emitFailures(innerMatcher, ""); + emit(`${jsonify(key)}: `); + recurseComparingValues(innerMatcher, r.target[key]); + } else { + emit(`${jsonify(key)}: `); + emit(renderAbridged(r.target[key])); + } + } + emitRemaining(); + indents.pop(); + emit("\n}"); + return; + } + emitRemaining(); + emit(jsonify(r.target)); + function emitRemaining() { + if (remainingFailures.size > 0) { + emit("\n"); + } + for (const key of remainingFailures) { + emitFailures(r, key); + } + } + } + function recurseComparingValues(inner, actualValue) { + if (inner.target === actualValue) { + return recurse(inner); + } + emit(renderAbridged(actualValue)); + emit(" <*> "); + recurse(inner); + } + function renderAbridged(x) { + if (Array.isArray(x)) { + switch (x.length) { + case 0: + return "[]"; + case 1: + return `[ ${renderAbridged(x[0])} ]`; + case 2: + if (x.every((e) => ["number", "boolean", "string"].includes(typeof e))) { + return `[ ${x.map(renderAbridged).join(", ")} ]`; + } + return "[ ... ]"; + default: + return "[ ... ]"; + } + } + if (x && typeof x === "object") { + const keys = Object.keys(x); + switch (keys.length) { + case 0: + return "{}"; + case 1: + return `{ ${JSON.stringify(keys[0])}: ${renderAbridged(x[keys[0]])} }`; + default: + return "{ ... }"; + } + } + return jsonify(x); + } + function jsonify(x) { + return JSON.stringify(x) ?? "undefined"; + } + function moveMarkersToFront(x) { + const re = /^(\s+)!!/gm; + return x.replace(re, (_, spaces) => `!!${spaces.substring(0, spaces.length - 2)}`); + } + } + /** + * Record a capture against in this match result. + */ recordCapture(options) { let values = this.captures.get(options.capture); if (values === void 0) { @@ -92,6 +297,18 @@ var MatchResult = class { this.captures.set(options.capture, values); } }; +function* range(n) { + for (let i = 0; i < n; i++) { + yield i; + } +} +function* enumFirst(xs) { + let first = true; + for (const x of xs) { + yield [first, x]; + first = false; + } +} // ../assertions/lib/private/matchers/absent.ts var AbsentMatch = class extends Matcher { @@ -112,6 +329,51 @@ var AbsentMatch = class extends Matcher { } }; +// ../assertions/lib/private/sorting.ts +function sortKeyComparator(keyFn) { + return (a, b) => { + const ak = keyFn(a); + const bk = keyFn(b); + for (let i = 0; i < ak.length && i < bk.length; i++) { + const av = ak[i]; + const bv = bk[i]; + let diff = 0; + if (typeof av === "number" && typeof bv === "number") { + diff = av - bv; + } else if (typeof av === "string" && typeof bv === "string") { + diff = av.localeCompare(bv); + } + if (diff !== 0) { + return diff; + } + } + return bk.length - ak.length; + }; +} + +// ../assertions/lib/private/sparse-matrix.ts +var SparseMatrix = class { + constructor() { + this.matrix = /* @__PURE__ */ new Map(); + } + get(row, col) { + var _a; + return (_a = this.matrix.get(row)) == null ? void 0 : _a.get(col); + } + row(row) { + var _a; + return Array.from(((_a = this.matrix.get(row)) == null ? void 0 : _a.entries()) ?? []); + } + set(row, col, value) { + let r = this.matrix.get(row); + if (!r) { + r = /* @__PURE__ */ new Map(); + this.matrix.set(row, r); + } + r.set(col, value); + } +}; + // ../assertions/lib/private/type.ts function getType(obj) { return Array.isArray(obj) ? "array" : typeof obj; @@ -119,33 +381,74 @@ function getType(obj) { // ../assertions/lib/match.ts var Match = class { + /** + * Use this matcher in the place of a field's value, if the field must not be present. + */ static absent() { return new AbsentMatch("absent"); } + /** + * Matches the specified pattern with the array found in the same relative path of the target. + * The set of elements (or matchers) must be in the same order as would be found. + * @param pattern the pattern to match + */ static arrayWith(pattern) { return new ArrayMatch("arrayWith", pattern); } + /** + * Matches the specified pattern with the array found in the same relative path of the target. + * The set of elements (or matchers) must match exactly and in order. + * @param pattern the pattern to match + */ static arrayEquals(pattern) { return new ArrayMatch("arrayEquals", pattern, { subsequence: false }); } + /** + * Deep exact matching of the specified pattern to the target. + * @param pattern the pattern to match + */ static exact(pattern) { return new LiteralMatch("exact", pattern, { partialObjects: false }); } + /** + * Matches the specified pattern to an object found in the same relative path of the target. + * The keys and their values (or matchers) must be present in the target but the target can be a superset. + * @param pattern the pattern to match + */ static objectLike(pattern) { return new ObjectMatch("objectLike", pattern); } + /** + * Matches the specified pattern to an object found in the same relative path of the target. + * The keys and their values (or matchers) must match exactly with the target. + * @param pattern the pattern to match + */ static objectEquals(pattern) { return new ObjectMatch("objectEquals", pattern, { partial: false }); } + /** + * Matches any target which does NOT follow the specified pattern. + * @param pattern the pattern to NOT match + */ static not(pattern) { return new NotMatch("not", pattern); } + /** + * Matches any string-encoded JSON and applies the specified pattern after parsing it. + * @param pattern the pattern to match after parsing the encoded JSON. + */ static serializedJson(pattern) { return new SerializedJson("serializedJson", pattern); } + /** + * Matches any non-null value at the target. + */ static anyValue() { return new AnyMatch("anyValue"); } + /** + * Matches targets according to a regular expression + */ static stringLikeRegexp(pattern) { return new StringLikeRegexpMatch("stringLikeRegexp", pattern); } @@ -202,40 +505,87 @@ var ArrayMatch = class extends Matcher { message: `Expected type array but received ${getType(actual)}` }); } - if (!this.subsequence && this.pattern.length !== actual.length) { - return new MatchResult(actual).recordFailure({ + return this.subsequence ? this.testSubsequence(actual) : this.testFullArray(actual); + } + testFullArray(actual) { + const result = new MatchResult(actual); + let i = 0; + for (; i < this.pattern.length && i < actual.length; i++) { + const patternElement = this.pattern[i]; + const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); + const innerResult = matcher.test(actual[i]); + result.compose(`${i}`, innerResult); + } + if (i < this.pattern.length) { + result.recordFailure({ matcher: this, - path: [], - message: `Expected array of length ${this.pattern.length} but received ${actual.length}` + message: `Not enough elements in array (expecting ${this.pattern.length}, got ${actual.length})`, + path: [`${i}`] + }); + } + if (i < actual.length) { + result.recordFailure({ + matcher: this, + message: `Too many elements in array (expecting ${this.pattern.length}, got ${actual.length})`, + path: [`${i}`] }); } + return result; + } + testSubsequence(actual) { + const result = new MatchResult(actual); let patternIdx = 0; let actualIdx = 0; - const result = new MatchResult(actual); + const matches = new SparseMatrix(); while (patternIdx < this.pattern.length && actualIdx < actual.length) { const patternElement = this.pattern[patternIdx]; const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); const matcherName = matcher.name; - if (this.subsequence && (matcherName == "absent" || matcherName == "anyValue")) { + if (matcherName == "absent" || matcherName == "anyValue") { throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`); } const innerResult = matcher.test(actual[actualIdx]); - if (!this.subsequence || !innerResult.hasFailed()) { - result.compose(`[${actualIdx}]`, innerResult); + matches.set(patternIdx, actualIdx, innerResult); + actualIdx++; + if (innerResult.isSuccess) { + result.compose(`${actualIdx}`, innerResult); patternIdx++; - actualIdx++; - } else { - actualIdx++; } } - for (; patternIdx < this.pattern.length; patternIdx++) { - const pattern = this.pattern[patternIdx]; - const element = Matcher.isMatcher(pattern) || typeof pattern === "object" ? " " : ` [${pattern}] `; - result.recordFailure({ - matcher: this, - path: [], - message: `Missing element${element}at pattern index ${patternIdx}` - }); + if (patternIdx < this.pattern.length) { + for (let spi = 0; spi < patternIdx; spi++) { + const foundMatch = matches.row(spi).find(([, r]) => r.isSuccess); + if (!foundMatch) { + continue; + } + const [index] = foundMatch; + result.compose(`${index}`, new MatchResult(actual[index]).recordFailure({ + matcher: this, + message: `arrayWith pattern ${spi} matched here`, + path: [], + cost: 0 + // This is an informational message so it would be unfair to assign it cost + })); + } + const failedMatches = matches.row(patternIdx); + failedMatches.sort(sortKeyComparator(([i, r]) => [r.failCost, i])); + if (failedMatches.length > 0) { + const [index, innerResult] = failedMatches[0]; + result.recordFailure({ + matcher: this, + message: `Could not match arrayWith pattern ${patternIdx}. This is the closest match`, + path: [`${index}`], + cost: 0 + // Informational message + }); + result.compose(`${index}`, innerResult); + } else { + result.recordFailure({ + matcher: this, + message: `Could not match arrayWith pattern ${patternIdx}. No more elements to try`, + path: [`${actual.length}`] + }); + } } return result; } @@ -261,8 +611,8 @@ var ObjectMatch = class extends Matcher { if (!(a in this.pattern)) { result.recordFailure({ matcher: this, - path: [`/${a}`], - message: "Unexpected key" + path: [a], + message: `Unexpected key ${a}` }); } } @@ -271,14 +621,14 @@ var ObjectMatch = class extends Matcher { if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) { result.recordFailure({ matcher: this, - path: [`/${patternKey}`], - message: `Missing key '${patternKey}' among {${Object.keys(actual).join(",")}}` + path: [patternKey], + message: `Missing key '${patternKey}'` }); continue; } const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial }); const inner = matcher.test(actual[patternKey]); - result.compose(`/${patternKey}`, inner); + result.compose(patternKey, inner); } return result; } @@ -290,34 +640,37 @@ var SerializedJson = class extends Matcher { this.pattern = pattern; } test(actual) { - const result = new MatchResult(actual); if (getType(actual) !== "string") { - result.recordFailure({ + return new MatchResult(actual).recordFailure({ matcher: this, path: [], message: `Expected JSON as a string but found ${getType(actual)}` }); - return result; } let parsed; try { parsed = JSON.parse(actual); } catch (err) { if (err instanceof SyntaxError) { - result.recordFailure({ + return new MatchResult(actual).recordFailure({ matcher: this, path: [], message: `Invalid JSON string: ${actual}` }); - return result; } else { throw err; } } const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); const innerResult = matcher.test(parsed); - result.compose(`(${this.name})`, innerResult); - return result; + if (innerResult.hasFailed()) { + innerResult.recordFailure({ + matcher: this, + path: [], + message: "Encoded JSON value does not match" + }); + } + return innerResult; } }; var NotMatch = class extends Matcher { @@ -404,6 +757,10 @@ var CustomResourceHandler = class { this.event = event; this.physicalResourceId = extractPhysicalResourceId(event); } + /** + * Handles executing the custom resource event. If `stateMachineArn` is present + * in the props then trigger the waiter statemachine + */ async handle() { try { if ("stateMachineArn" in this.event.ResourceProperties) { @@ -425,6 +782,9 @@ var CustomResourceHandler = class { clearTimeout(this.timeout); } } + /** + * Handle async requests from the waiter state machine + */ async handleIsComplete() { try { const result = await this.processEvent(this.event.ResourceProperties); @@ -436,6 +796,10 @@ var CustomResourceHandler = class { clearTimeout(this.timeout); } } + /** + * Start a step function state machine which will wait for the request + * to be successful. + */ async startExecution(req) { try { const sfn = new AWS.StepFunctions(); @@ -506,10 +870,7 @@ var AssertionHandler = class extends CustomResourceHandler { failed: true, assertion: JSON.stringify({ status: "fail", - message: [ - ...matchResult.toHumanStrings(), - JSON.stringify(matchResult.target, void 0, 2) - ].join("\n") + message: matchResult.renderMismatch() }) }; if (request2.failDeployment) { @@ -531,6 +892,65 @@ var MatchCreator = class { matcher: obj }; } + /** + * Return a Matcher that can be tested against the actual results. + * This will convert the encoded matchers into their corresponding + * assertions matcher. + * + * For example: + * + * ExpectedResult.objectLike({ + * Messages: [{ + * Body: Match.objectLike({ + * Elements: Match.arrayWith([{ Asdf: 3 }]), + * Payload: Match.serializedJson({ key: 'value' }), + * }), + * }], + * }); + * + * Will be encoded as: + * { + * $ObjectLike: { + * Messages: [{ + * Body: { + * $ObjectLike: { + * Elements: { + * $ArrayWith: [{ Asdf: 3 }], + * }, + * Payload: { + * $SerializedJson: { key: 'value' } + * } + * }, + * }, + * }], + * }, + * } + * + * Which can then be parsed by this function. For each key (recursively) + * the parser will check if the value has one of the encoded matchers as a key + * and if so, it will set the value as the Matcher. So, + * + * { + * Body: { + * $ObjectLike: { + * Elements: { + * $ArrayWith: [{ Asdf: 3 }], + * }, + * Payload: { + * $SerializedJson: { key: 'value' } + * } + * }, + * }, + * } + * + * Will be converted to + * { + * Body: Match.objectLike({ + * Elements: Match.arrayWith([{ Asdf: 3 }]), + * Payload: Match.serializedJson({ key: 'value' }), + * }), + * } + */ getMatcher() { try { const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) { @@ -542,6 +962,8 @@ var MatchCreator = class { return Match.objectLike(v[nested]); case "$StringLike": return Match.stringLikeRegexp(v[nested]); + case "$SerializedJson": + return Match.serializedJson(v[nested]); default: return v; } @@ -678,6 +1100,7 @@ async function handler(event, context) { await provider.respond({ status: "SUCCESS", reason: "OK", + // return both the result of the API call _and_ the assertion results data: { ...assertionResult, ...result diff --git a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/cdk.out b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/cdk.out index 145739f539580..b72fef144f05c 100644 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"22.0.0"} \ No newline at end of file +{"version":"30.1.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/integ.json b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/integ.json index 258cb246cc28d..eca95212c44ed 100644 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.1.0", "testCases": { "integ-test-bucket-deployments/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/integtestbucketdeploymentsDefaultTestDeployAssertCF25A2DF.assets.json b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/integtestbucketdeploymentsDefaultTestDeployAssertCF25A2DF.assets.json index 4c728fe27d8c8..205d7688474e5 100644 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/integtestbucketdeploymentsDefaultTestDeployAssertCF25A2DF.assets.json +++ b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/integtestbucketdeploymentsDefaultTestDeployAssertCF25A2DF.assets.json @@ -1,20 +1,20 @@ { - "version": "22.0.0", + "version": "30.1.0", "files": { - "e3900c1e0365029a742f5b51f9ccb158093a5e209a71840a41f9793498c3ed1b": { + "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4": { "source": { - "path": "asset.e3900c1e0365029a742f5b51f9ccb158093a5e209a71840a41f9793498c3ed1b.bundle", + "path": "asset.73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e3900c1e0365029a742f5b51f9ccb158093a5e209a71840a41f9793498c3ed1b.zip", + "objectKey": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "320a35b24ed97136c867ae2541ddd087d6d0ff3502311494d4aa87572b881e91": { + "cb68a9799f1b0a01be938de2628b70716eb6756ab8b00a9cc4e25379b475254e": { "source": { "path": "integtestbucketdeploymentsDefaultTestDeployAssertCF25A2DF.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "320a35b24ed97136c867ae2541ddd087d6d0ff3502311494d4aa87572b881e91.json", + "objectKey": "cb68a9799f1b0a01be938de2628b70716eb6756ab8b00a9cc4e25379b475254e.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-s3-deployment/test/integ.bucket-deployment.js.snapshot/integtestbucketdeploymentsDefaultTestDeployAssertCF25A2DF.template.json b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/integtestbucketdeploymentsDefaultTestDeployAssertCF25A2DF.template.json index d9de0017d7da7..8325db2396a0a 100644 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/integtestbucketdeploymentsDefaultTestDeployAssertCF25A2DF.template.json +++ b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/integtestbucketdeploymentsDefaultTestDeployAssertCF25A2DF.template.json @@ -18,7 +18,7 @@ } }, "flattenResponse": "false", - "salt": "1671126524996" + "salt": "1677600919513" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -82,7 +82,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "e3900c1e0365029a742f5b51f9ccb158093a5e209a71840a41f9793498c3ed1b.zip" + "S3Key": "73c20a669c041469f7fc3fc03d574b093b5b97e7c716f76c1e8117e6163e4dc4.zip" }, "Timeout": 120, "Handler": "index.handler", diff --git a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/manifest.json b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/manifest.json index bd74b674f0dd0..c1296996930d5 100644 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.1.0", "artifacts": { "test-bucket-deployments-2.assets": { "type": "cdk:asset-manifest", @@ -17,7 +17,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}/9854d9c205c56719d3e954eb4cf27a828725afdcd6e7e00b7ccecfce1866740f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5f955b28abc21da07dc33a4cdd724c0f329f3bb14a71217ca89b731e2ab54413.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -484,7 +484,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}/320a35b24ed97136c867ae2541ddd087d6d0ff3502311494d4aa87572b881e91.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cb68a9799f1b0a01be938de2628b70716eb6756ab8b00a9cc4e25379b475254e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/test-bucket-deployments-2.assets.json b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/test-bucket-deployments-2.assets.json index a705c32a9f7c6..d88f37ddc79ed 100644 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/test-bucket-deployments-2.assets.json +++ b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/test-bucket-deployments-2.assets.json @@ -1,5 +1,5 @@ { - "version": "22.0.0", + "version": "30.1.0", "files": { "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c": { "source": { @@ -79,7 +79,7 @@ } } }, - "9854d9c205c56719d3e954eb4cf27a828725afdcd6e7e00b7ccecfce1866740f": { + "5f955b28abc21da07dc33a4cdd724c0f329f3bb14a71217ca89b731e2ab54413": { "source": { "path": "test-bucket-deployments-2.template.json", "packaging": "file" @@ -87,7 +87,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9854d9c205c56719d3e954eb4cf27a828725afdcd6e7e00b7ccecfce1866740f.json", + "objectKey": "5f955b28abc21da07dc33a4cdd724c0f329f3bb14a71217ca89b731e2ab54413.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-s3-deployment/test/integ.bucket-deployment.js.snapshot/test-bucket-deployments-2.template.json b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/test-bucket-deployments-2.template.json index 9f8408949492e..159a28e97aee6 100644 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/test-bucket-deployments-2.template.json +++ b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/test-bucket-deployments-2.template.json @@ -1013,6 +1013,12 @@ "FileSystemId": { "Ref": "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faDE9EC34B" }, + "AccessPointTags": [ + { + "Key": "Name", + "Value": "test-bucket-deployments-2/BucketDeploymentEFS-VPC-c8e45d2d82aec23f89c7172e7e6f994ff3d9c444fa/AccessPoint" + } + ], "PosixUser": { "Gid": "1001", "Uid": "1001" diff --git a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/tree.json b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/tree.json index 82f3c333bf0e8..f54637e846602 100644 --- a/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-s3-deployment/test/integ.bucket-deployment.js.snapshot/tree.json @@ -1534,6 +1534,12 @@ "fileSystemId": { "Ref": "BucketDeploymentEFSVPCc8e45d2d82aec23f89c7172e7e6f994ff3d9c444faDE9EC34B" }, + "accessPointTags": [ + { + "key": "Name", + "value": "test-bucket-deployments-2/BucketDeploymentEFS-VPC-c8e45d2d82aec23f89c7172e7e6f994ff3d9c444fa/AccessPoint" + } + ], "posixUser": { "uid": "1001", "gid": "1001" @@ -3188,7 +3194,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.252" } }, "BootstrapVersion": { @@ -3226,7 +3232,7 @@ "path": "integ-test-bucket-deployments/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.252" } }, "DeployAssert": { @@ -3246,7 +3252,7 @@ "path": "integ-test-bucket-deployments/DefaultTest/DeployAssert/AwsApiCallS3listObjects/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.252" } } }, @@ -3318,7 +3324,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.252" } }, "BootstrapVersion": { @@ -3360,7 +3366,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.189" + "version": "10.1.252" } } }, diff --git a/packages/@aws-cdk/cfnspec/lib/schema/property.ts b/packages/@aws-cdk/cfnspec/lib/schema/property.ts index 5278b6300190f..d78e99971198e 100644 --- a/packages/@aws-cdk/cfnspec/lib/schema/property.ts +++ b/packages/@aws-cdk/cfnspec/lib/schema/property.ts @@ -96,7 +96,7 @@ export interface MapOfListsOfPrimitives extends MapPropertyBase { } export interface TagPropertyStandard extends PropertyBase { - ItemType: 'Tag' | 'TagsEntry' | 'TagRef' | 'ElasticFileSystemTag' | 'HostedZoneTag'; + ItemType: 'Tag' | 'TagsEntry' | 'TagRef' | 'ElasticFileSystemTag' | 'HostedZoneTag' | 'AccessPointTag'; Type: 'Tags'; } @@ -256,6 +256,7 @@ const tagPropertyNames = { HostedZoneTags: '', Tags: '', UserPoolTags: '', + AccessPointTags: '', }; export type TagPropertyName = keyof typeof tagPropertyNames; @@ -288,7 +289,8 @@ export function isTagPropertyStandard(prop: Property): prop is TagPropertyStanda (prop as TagPropertyStandard).Type === 'Tags' || (prop as TagPropertyStandard).ItemType === 'TagRef' || (prop as TagPropertyStandard).ItemType === 'ElasticFileSystemTag' || - (prop as TagPropertyStandard).ItemType === 'HostedZoneTag' + (prop as TagPropertyStandard).ItemType === 'HostedZoneTag' || + (prop as TagPropertyStandard).ItemType === 'AccessPointTag' ); } diff --git a/packages/@aws-cdk/cfnspec/lib/schema/resource-type.ts b/packages/@aws-cdk/cfnspec/lib/schema/resource-type.ts index 8a33571504545..0e817500bfeec 100644 --- a/packages/@aws-cdk/cfnspec/lib/schema/resource-type.ts +++ b/packages/@aws-cdk/cfnspec/lib/schema/resource-type.ts @@ -34,6 +34,7 @@ export interface TaggableResource extends ResourceType { HostedZoneTags: TagProperty; Tags: TagProperty; UserPoolTags: TagProperty; + AccessPointTags: TagProperty; [name: string]: Property; } }