From 4039a5d9cf5fa13576abc26d755eeedda1016b77 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 28 Apr 2024 08:11:09 +0900 Subject: [PATCH 01/13] feat: kmsKey for repository --- .../aws-cdk-lib/aws-codecommit/lib/repository.ts | 7 +++++++ .../aws-codecommit/test/codecommit.test.ts | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/packages/aws-cdk-lib/aws-codecommit/lib/repository.ts b/packages/aws-cdk-lib/aws-codecommit/lib/repository.ts index 873f32e719aaa..aa83d47b9f8ef 100644 --- a/packages/aws-cdk-lib/aws-codecommit/lib/repository.ts +++ b/packages/aws-cdk-lib/aws-codecommit/lib/repository.ts @@ -4,6 +4,7 @@ import { CfnRepository } from './codecommit.generated'; import * as notifications from '../../aws-codestarnotifications'; import * as events from '../../aws-events'; import * as iam from '../../aws-iam'; +import * as kms from '../../aws-kms'; import { ArnFormat, IResource, Lazy, Resource, Stack } from '../../core'; /** @@ -496,6 +497,11 @@ export interface RepositoryProps { * @default - No initialization (create empty repo) */ readonly code?: Code; + + /** + * The AWS Key Management Service encryption key used to encrypt and decrypt the repository. + */ + readonly kmsKey?: kms.IKey; } /** @@ -561,6 +567,7 @@ export class Repository extends RepositoryBase { repositoryDescription: props.description, triggers: Lazy.any({ produce: () => this.triggers }, { omitEmptyArray: true }), code: (props.code?.bind(this))?.code, + kmsKeyId: props.kmsKey?.keyArn, }); this.repositoryName = this.getResourceNameAttribute(repository.attrName); diff --git a/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts b/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts index 99d1676660404..feb300dc1f2b1 100644 --- a/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts +++ b/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts @@ -5,6 +5,7 @@ import { Role, ServicePrincipal } from '../../aws-iam'; import { Asset } from '../../aws-s3-assets'; import { App, Stack } from '../../core'; import { Code, Repository, RepositoryProps } from '../lib'; +import * as kms from 'aws-cdk-lib/aws-kms'; describe('codecommit', () => { describe('CodeCommit Repositories', () => { @@ -310,5 +311,20 @@ describe('codecommit', () => { }); }); + + test('specify a kms key', () => { + const stack = new Stack(); + + const key = new kms.Key(stack, 'Key'); + new Repository(stack, 'Repository', { + repositoryName: 'my-repo', + kmsKey: key, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::CodeCommit::Repository', { + RepositoryName: 'my-repo', + KmsKeyId: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] }, + }); + }); }); }); From 5788875d5c1f7761cb5f361e47aefa27f8caf204 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 28 Apr 2024 08:52:18 +0900 Subject: [PATCH 02/13] test: add unit test --- packages/aws-cdk-lib/aws-codecommit/lib/repository.ts | 4 +++- packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk-lib/aws-codecommit/lib/repository.ts b/packages/aws-cdk-lib/aws-codecommit/lib/repository.ts index aa83d47b9f8ef..a8518c2662e6d 100644 --- a/packages/aws-cdk-lib/aws-codecommit/lib/repository.ts +++ b/packages/aws-cdk-lib/aws-codecommit/lib/repository.ts @@ -499,7 +499,9 @@ export interface RepositoryProps { readonly code?: Code; /** - * The AWS Key Management Service encryption key used to encrypt and decrypt the repository. + * The customer managed key used to encrypt and decrypt the data in repository. + * + * @default - Use an AWS managed key */ readonly kmsKey?: kms.IKey; } diff --git a/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts b/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts index feb300dc1f2b1..c9ac2714507cd 100644 --- a/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts +++ b/packages/aws-cdk-lib/aws-codecommit/test/codecommit.test.ts @@ -2,10 +2,10 @@ import * as fs from 'fs'; import { join, resolve } from 'path'; import { Template } from '../../assertions'; import { Role, ServicePrincipal } from '../../aws-iam'; +import * as kms from '../../aws-kms'; import { Asset } from '../../aws-s3-assets'; import { App, Stack } from '../../core'; import { Code, Repository, RepositoryProps } from '../lib'; -import * as kms from 'aws-cdk-lib/aws-kms'; describe('codecommit', () => { describe('CodeCommit Repositories', () => { From aeaf987703f793f5ed9d75343802a3e0eca434b3 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 28 Apr 2024 08:52:35 +0900 Subject: [PATCH 03/13] test: integ test --- .../cdk.out | 1 + .../integ.json | 12 ++ .../manifest.json | 119 ++++++++++++ .../repositoryKmsKey.assets.json | 19 ++ .../repositoryKmsKey.template.json | 85 ++++++++ ...efaultTestDeployAssert26C34A5E.assets.json | 19 ++ ...aultTestDeployAssert26C34A5E.template.json | 36 ++++ .../tree.json | 182 ++++++++++++++++++ .../test/integ.repository-kms-key.ts | 19 ++ 9 files changed, 492 insertions(+) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json new file mode 100644 index 0000000000000..fd1a7fc1821b4 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "repositoryKmsKeyTest/DefaultTest": { + "stacks": [ + "repositoryKmsKey" + ], + "assertionStack": "repositoryKmsKeyTest/DefaultTest/DeployAssert", + "assertionStackName": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json new file mode 100644 index 0000000000000..da8484918aad8 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json @@ -0,0 +1,119 @@ +{ + "version": "36.0.0", + "artifacts": { + "repositoryKmsKey.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "repositoryKmsKey.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "repositoryKmsKey": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "repositoryKmsKey.template.json", + "terminationProtection": false, + "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}/768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "repositoryKmsKey.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": [ + "repositoryKmsKey.assets" + ], + "metadata": { + "/repositoryKmsKey/MyKey/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyKey6AB29FA6" + } + ], + "/repositoryKmsKey/MyCodecommitRepository/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyCodecommitRepository26DB372B" + } + ], + "/repositoryKmsKey/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/repositoryKmsKey/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "repositoryKmsKey" + }, + "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json", + "terminationProtection": false, + "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": [ + "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.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": [ + "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets" + ], + "metadata": { + "/repositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/repositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "repositoryKmsKeyTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json new file mode 100644 index 0000000000000..142c28731d1bb --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f": { + "source": { + "path": "repositoryKmsKey.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f.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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json new file mode 100644 index 0000000000000..70000edd5b374 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json @@ -0,0 +1,85 @@ +{ + "Resources": { + "MyKey6AB29FA6": { + "Type": "AWS::KMS::Key", + "Properties": { + "KeyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "MyCodecommitRepository26DB372B": { + "Type": "AWS::CodeCommit::Repository", + "Properties": { + "KmsKeyId": { + "Fn::GetAtt": [ + "MyKey6AB29FA6", + "Arn" + ] + }, + "RepositoryName": "my-test-repository" + } + } + }, + "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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json new file mode 100644 index 0000000000000..c96f5ab18d794 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json new file mode 100644 index 0000000000000..657cc9a0795e0 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json @@ -0,0 +1,182 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "repositoryKmsKey": { + "id": "repositoryKmsKey", + "path": "repositoryKmsKey", + "children": { + "MyKey": { + "id": "MyKey", + "path": "repositoryKmsKey/MyKey", + "children": { + "Resource": { + "id": "Resource", + "path": "repositoryKmsKey/MyKey/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::KMS::Key", + "aws:cdk:cloudformation:props": { + "keyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.CfnKey", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.Key", + "version": "0.0.0" + } + }, + "MyCodecommitRepository": { + "id": "MyCodecommitRepository", + "path": "repositoryKmsKey/MyCodecommitRepository", + "children": { + "Resource": { + "id": "Resource", + "path": "repositoryKmsKey/MyCodecommitRepository/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeCommit::Repository", + "aws:cdk:cloudformation:props": { + "kmsKeyId": { + "Fn::GetAtt": [ + "MyKey6AB29FA6", + "Arn" + ] + }, + "repositoryName": "my-test-repository" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codecommit.CfnRepository", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codecommit.Repository", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "repositoryKmsKey/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "repositoryKmsKey/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "repositoryKmsKeyTest": { + "id": "repositoryKmsKeyTest", + "path": "repositoryKmsKeyTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "repositoryKmsKeyTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "repositoryKmsKeyTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.ts new file mode 100644 index 0000000000000..f530805492c35 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.ts @@ -0,0 +1,19 @@ +#!/usr/bin/env node +import * as cdk from 'aws-cdk-lib'; +import * as codecommit from 'aws-cdk-lib/aws-codecommit'; +import * as integ from '@aws-cdk/integ-tests-alpha'; +import * as kms from 'aws-cdk-lib/aws-kms'; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'repositoryKmsKey'); + +const kmsKey = new kms.Key(stack, 'MyKey'); +new codecommit.Repository(stack, 'MyCodecommitRepository', { + repositoryName: 'my-test-repository', + kmsKey, +}); + +new integ.IntegTest(app, 'repositoryKmsKeyTest', { + testCases: [stack], +}); From c979deecc8cfa5aa8ccf3c9de13d896bae8c6cf5 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Sun, 28 Apr 2024 09:18:48 +0900 Subject: [PATCH 04/13] docs: update readme --- packages/aws-cdk-lib/aws-codecommit/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/aws-cdk-lib/aws-codecommit/README.md b/packages/aws-cdk-lib/aws-codecommit/README.md index 302b47cee79df..a1c255be852bc 100644 --- a/packages/aws-cdk-lib/aws-codecommit/README.md +++ b/packages/aws-cdk-lib/aws-codecommit/README.md @@ -27,6 +27,21 @@ declare const repo: codecommit.Repository; repo.notify('arn:aws:sns:*:123456789012:my_topic'); ``` +## Use customer managed key + +CodeCommit repositories are automatically encrypted with an AWS managed key. You can also [use a customer managed key](https://docs.aws.amazon.com/codecommit/latest/userguide/encryption.html) for encryption by specifying the `kmsKey` property. + +```ts +import * as kms from 'aws-cdk-lib/aws-kms'; + +declare const kmsKey: kms.IKey; + +const repo = new codecommit.Repository(this, 'Repository', { + repositoryName: 'MyRepositoryName', + kmsKey, +}); +``` + ## Add initial commit It is possible to initialize the Repository via the `Code` class. From 2dce96d63d2385d98b5301331e74903b4725fe2a Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 29 Apr 2024 09:22:40 +0900 Subject: [PATCH 05/13] chore: lower to upper --- .../test/aws-codecommit/test/integ.repository-kms-key.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.ts index f530805492c35..1431f3c846d1c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.ts @@ -6,7 +6,7 @@ import * as kms from 'aws-cdk-lib/aws-kms'; const app = new cdk.App(); -const stack = new cdk.Stack(app, 'repositoryKmsKey'); +const stack = new cdk.Stack(app, 'RepositoryKmsKey'); const kmsKey = new kms.Key(stack, 'MyKey'); new codecommit.Repository(stack, 'MyCodecommitRepository', { @@ -14,6 +14,6 @@ new codecommit.Repository(stack, 'MyCodecommitRepository', { kmsKey, }); -new integ.IntegTest(app, 'repositoryKmsKeyTest', { +new integ.IntegTest(app, 'RepositoryKmsKeyTest', { testCases: [stack], }); From 57bbc8ffc62121c492b80acd6d28217c615dd19e Mon Sep 17 00:00:00 2001 From: kazuho cryer-shinozuka Date: Mon, 29 Apr 2024 09:30:14 +0900 Subject: [PATCH 06/13] Update packages/aws-cdk-lib/aws-codecommit/README.md Co-authored-by: k.goto <24818752+go-to-k@users.noreply.github.com> --- packages/aws-cdk-lib/aws-codecommit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-codecommit/README.md b/packages/aws-cdk-lib/aws-codecommit/README.md index a1c255be852bc..f9091f1c58148 100644 --- a/packages/aws-cdk-lib/aws-codecommit/README.md +++ b/packages/aws-cdk-lib/aws-codecommit/README.md @@ -27,7 +27,7 @@ declare const repo: codecommit.Repository; repo.notify('arn:aws:sns:*:123456789012:my_topic'); ``` -## Use customer managed key +## Use a customer managed key CodeCommit repositories are automatically encrypted with an AWS managed key. You can also [use a customer managed key](https://docs.aws.amazon.com/codecommit/latest/userguide/encryption.html) for encryption by specifying the `kmsKey` property. From 292d1e6818b464894121087045461cf667ad3ea3 Mon Sep 17 00:00:00 2001 From: kazuho cryer-shinozuka Date: Mon, 29 Apr 2024 10:14:17 +0900 Subject: [PATCH 07/13] Update packages/aws-cdk-lib/aws-codecommit/README.md Co-authored-by: k.goto <24818752+go-to-k@users.noreply.github.com> --- packages/aws-cdk-lib/aws-codecommit/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-codecommit/README.md b/packages/aws-cdk-lib/aws-codecommit/README.md index f9091f1c58148..44d46106258c4 100644 --- a/packages/aws-cdk-lib/aws-codecommit/README.md +++ b/packages/aws-cdk-lib/aws-codecommit/README.md @@ -29,7 +29,11 @@ repo.notify('arn:aws:sns:*:123456789012:my_topic'); ## Use a customer managed key -CodeCommit repositories are automatically encrypted with an AWS managed key. You can also [use a customer managed key](https://docs.aws.amazon.com/codecommit/latest/userguide/encryption.html) for encryption by specifying the `kmsKey` property. +CodeCommit repositories are automatically encrypted with an AWS managed key. To use +a customer managed key, specify the `kmsKey` property. + +For more information, see +[AWS Key Management Service and encryption for AWS CodeCommit repositories](https://docs.aws.amazon.com/cdk/latest/guide/reference.html#versioning). ```ts import * as kms from 'aws-cdk-lib/aws-kms'; From 65aab20bb33c7fb126bfaf0e5e1ff32336fbdc2f Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 29 Apr 2024 10:18:02 +0900 Subject: [PATCH 08/13] docs: update readme --- packages/aws-cdk-lib/aws-codecommit/README.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/aws-cdk-lib/aws-codecommit/README.md b/packages/aws-cdk-lib/aws-codecommit/README.md index 44d46106258c4..6aab93ba71abe 100644 --- a/packages/aws-cdk-lib/aws-codecommit/README.md +++ b/packages/aws-cdk-lib/aws-codecommit/README.md @@ -27,6 +27,20 @@ declare const repo: codecommit.Repository; repo.notify('arn:aws:sns:*:123456789012:my_topic'); ``` +## Add initial commit + +It is possible to initialize the Repository via the `Code` class. +It provides methods for loading code from a directory, `.zip` file and from a pre-created CDK Asset. + +Example: + +```ts +const repo = new codecommit.Repository(this, 'Repository', { + repositoryName: 'MyRepositoryName', + code: codecommit.Code.fromDirectory(path.join(__dirname, 'directory/'), 'develop'), // optional property, branch parameter can be omitted +}); +``` + ## Use a customer managed key CodeCommit repositories are automatically encrypted with an AWS managed key. To use @@ -46,20 +60,6 @@ const repo = new codecommit.Repository(this, 'Repository', { }); ``` -## Add initial commit - -It is possible to initialize the Repository via the `Code` class. -It provides methods for loading code from a directory, `.zip` file and from a pre-created CDK Asset. - -Example: - -```ts -const repo = new codecommit.Repository(this, 'Repository', { - repositoryName: 'MyRepositoryName', - code: codecommit.Code.fromDirectory(path.join(__dirname, 'directory/'), 'develop'), // optional property, branch parameter can be omitted -}); -``` - ## Events CodeCommit repositories emit Amazon CloudWatch events for certain activities. From 886686803a926105a9d1575d2da1160ddbde9b43 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 29 Apr 2024 10:42:31 +0900 Subject: [PATCH 09/13] test: update integ test --- ...faultTestDeployAssertC5D9D647.assets.json} | 2 +- ...ultTestDeployAssertC5D9D647.template.json} | 0 .../integ.json | 8 ++-- .../manifest.json | 40 +++++++++---------- .../repositoryKmsKey.assets.json | 2 +- .../tree.json | 34 ++++++++-------- 6 files changed, 43 insertions(+), 43 deletions(-) rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/{repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json => RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json} (87%) rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/{repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json => RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json} (100%) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json similarity index 87% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json index c96f5ab18d794..8e1bfa9a903e2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json @@ -3,7 +3,7 @@ "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { - "path": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json", + "path": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json", "packaging": "file" }, "destinations": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json index fd1a7fc1821b4..7714becbcc91a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json @@ -1,12 +1,12 @@ { "version": "36.0.0", "testCases": { - "repositoryKmsKeyTest/DefaultTest": { + "RepositoryKmsKeyTest/DefaultTest": { "stacks": [ - "repositoryKmsKey" + "RepositoryKmsKey" ], - "assertionStack": "repositoryKmsKeyTest/DefaultTest/DeployAssert", - "assertionStackName": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E" + "assertionStack": "RepositoryKmsKeyTest/DefaultTest/DeployAssert", + "assertionStackName": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json index da8484918aad8..431652633f271 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json @@ -1,19 +1,19 @@ { "version": "36.0.0", "artifacts": { - "repositoryKmsKey.assets": { + "RepositoryKmsKey.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "repositoryKmsKey.assets.json", + "file": "RepositoryKmsKey.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "repositoryKmsKey": { + "RepositoryKmsKey": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "repositoryKmsKey.template.json", + "templateFile": "RepositoryKmsKey.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", @@ -22,7 +22,7 @@ "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "repositoryKmsKey.assets" + "RepositoryKmsKey.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -31,49 +31,49 @@ } }, "dependencies": [ - "repositoryKmsKey.assets" + "RepositoryKmsKey.assets" ], "metadata": { - "/repositoryKmsKey/MyKey/Resource": [ + "/RepositoryKmsKey/MyKey/Resource": [ { "type": "aws:cdk:logicalId", "data": "MyKey6AB29FA6" } ], - "/repositoryKmsKey/MyCodecommitRepository/Resource": [ + "/RepositoryKmsKey/MyCodecommitRepository/Resource": [ { "type": "aws:cdk:logicalId", "data": "MyCodecommitRepository26DB372B" } ], - "/repositoryKmsKey/BootstrapVersion": [ + "/RepositoryKmsKey/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/repositoryKmsKey/CheckBootstrapVersion": [ + "/RepositoryKmsKey/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "repositoryKmsKey" + "displayName": "RepositoryKmsKey" }, - "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets": { + "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json", + "file": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E": { + "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json", + "templateFile": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", @@ -82,7 +82,7 @@ "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets" + "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -91,23 +91,23 @@ } }, "dependencies": [ - "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets" + "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets" ], "metadata": { - "/repositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion": [ + "/RepositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/repositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + "/RepositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "repositoryKmsKeyTest/DefaultTest/DeployAssert" + "displayName": "RepositoryKmsKeyTest/DefaultTest/DeployAssert" }, "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json index 142c28731d1bb..41fe2b5e6c95f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json @@ -3,7 +3,7 @@ "files": { "768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f": { "source": { - "path": "repositoryKmsKey.template.json", + "path": "RepositoryKmsKey.template.json", "packaging": "file" }, "destinations": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json index 657cc9a0795e0..21ca7a85e82a7 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json @@ -4,17 +4,17 @@ "id": "App", "path": "", "children": { - "repositoryKmsKey": { - "id": "repositoryKmsKey", - "path": "repositoryKmsKey", + "RepositoryKmsKey": { + "id": "RepositoryKmsKey", + "path": "RepositoryKmsKey", "children": { "MyKey": { "id": "MyKey", - "path": "repositoryKmsKey/MyKey", + "path": "RepositoryKmsKey/MyKey", "children": { "Resource": { "id": "Resource", - "path": "repositoryKmsKey/MyKey/Resource", + "path": "RepositoryKmsKey/MyKey/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -61,11 +61,11 @@ }, "MyCodecommitRepository": { "id": "MyCodecommitRepository", - "path": "repositoryKmsKey/MyCodecommitRepository", + "path": "RepositoryKmsKey/MyCodecommitRepository", "children": { "Resource": { "id": "Resource", - "path": "repositoryKmsKey/MyCodecommitRepository/Resource", + "path": "RepositoryKmsKey/MyCodecommitRepository/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::CodeCommit::Repository", "aws:cdk:cloudformation:props": { @@ -91,7 +91,7 @@ }, "BootstrapVersion": { "id": "BootstrapVersion", - "path": "repositoryKmsKey/BootstrapVersion", + "path": "RepositoryKmsKey/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -99,7 +99,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "repositoryKmsKey/CheckBootstrapVersion", + "path": "RepositoryKmsKey/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" @@ -111,17 +111,17 @@ "version": "0.0.0" } }, - "repositoryKmsKeyTest": { - "id": "repositoryKmsKeyTest", - "path": "repositoryKmsKeyTest", + "RepositoryKmsKeyTest": { + "id": "RepositoryKmsKeyTest", + "path": "RepositoryKmsKeyTest", "children": { "DefaultTest": { "id": "DefaultTest", - "path": "repositoryKmsKeyTest/DefaultTest", + "path": "RepositoryKmsKeyTest/DefaultTest", "children": { "Default": { "id": "Default", - "path": "repositoryKmsKeyTest/DefaultTest/Default", + "path": "RepositoryKmsKeyTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", "version": "10.3.0" @@ -129,11 +129,11 @@ }, "DeployAssert": { "id": "DeployAssert", - "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert", + "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert", "children": { "BootstrapVersion": { "id": "BootstrapVersion", - "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion", + "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -141,7 +141,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" From d0ac1acfdb95121e35ed51dd8542f70a261a5e39 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 29 Apr 2024 12:03:39 +0900 Subject: [PATCH 10/13] temp --- ...efaultTestDeployAssertC5D9D647.assets.json | 19 -- ...aultTestDeployAssertC5D9D647.template.json | 36 ---- .../cdk.out | 1 - .../integ.json | 12 -- .../manifest.json | 119 ------------ .../repositoryKmsKey.assets.json | 19 -- .../repositoryKmsKey.template.json | 85 -------- .../tree.json | 182 ------------------ 8 files changed, 473 deletions(-) delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json deleted file mode 100644 index 8e1bfa9a903e2..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "36.0.0", - "files": { - "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { - "source": { - "path": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json deleted file mode 100644 index ad9d0fb73d1dd..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out deleted file mode 100644 index 1f0068d32659a..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out +++ /dev/null @@ -1 +0,0 @@ -{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json deleted file mode 100644 index 7714becbcc91a..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": "36.0.0", - "testCases": { - "RepositoryKmsKeyTest/DefaultTest": { - "stacks": [ - "RepositoryKmsKey" - ], - "assertionStack": "RepositoryKmsKeyTest/DefaultTest/DeployAssert", - "assertionStackName": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647" - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json deleted file mode 100644 index 431652633f271..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "version": "36.0.0", - "artifacts": { - "RepositoryKmsKey.assets": { - "type": "cdk:asset-manifest", - "properties": { - "file": "RepositoryKmsKey.assets.json", - "requiresBootstrapStackVersion": 6, - "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" - } - }, - "RepositoryKmsKey": { - "type": "aws:cloudformation:stack", - "environment": "aws://unknown-account/unknown-region", - "properties": { - "templateFile": "RepositoryKmsKey.template.json", - "terminationProtection": false, - "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}/768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f.json", - "requiresBootstrapStackVersion": 6, - "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", - "additionalDependencies": [ - "RepositoryKmsKey.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": [ - "RepositoryKmsKey.assets" - ], - "metadata": { - "/RepositoryKmsKey/MyKey/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "MyKey6AB29FA6" - } - ], - "/RepositoryKmsKey/MyCodecommitRepository/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "MyCodecommitRepository26DB372B" - } - ], - "/RepositoryKmsKey/BootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "BootstrapVersion" - } - ], - "/RepositoryKmsKey/CheckBootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "CheckBootstrapVersion" - } - ] - }, - "displayName": "RepositoryKmsKey" - }, - "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets": { - "type": "cdk:asset-manifest", - "properties": { - "file": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json", - "requiresBootstrapStackVersion": 6, - "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" - } - }, - "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647": { - "type": "aws:cloudformation:stack", - "environment": "aws://unknown-account/unknown-region", - "properties": { - "templateFile": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json", - "terminationProtection": false, - "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": [ - "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.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": [ - "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets" - ], - "metadata": { - "/RepositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "BootstrapVersion" - } - ], - "/RepositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "CheckBootstrapVersion" - } - ] - }, - "displayName": "RepositoryKmsKeyTest/DefaultTest/DeployAssert" - }, - "Tree": { - "type": "cdk:tree", - "properties": { - "file": "tree.json" - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json deleted file mode 100644 index 41fe2b5e6c95f..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "36.0.0", - "files": { - "768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f": { - "source": { - "path": "RepositoryKmsKey.template.json", - "packaging": "file" - }, - "destinations": { - "current_account-current_region": { - "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f.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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json deleted file mode 100644 index 70000edd5b374..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "Resources": { - "MyKey6AB29FA6": { - "Type": "AWS::KMS::Key", - "Properties": { - "KeyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - }, - "UpdateReplacePolicy": "Retain", - "DeletionPolicy": "Retain" - }, - "MyCodecommitRepository26DB372B": { - "Type": "AWS::CodeCommit::Repository", - "Properties": { - "KmsKeyId": { - "Fn::GetAtt": [ - "MyKey6AB29FA6", - "Arn" - ] - }, - "RepositoryName": "my-test-repository" - } - } - }, - "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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json deleted file mode 100644 index 21ca7a85e82a7..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "version": "tree-0.1", - "tree": { - "id": "App", - "path": "", - "children": { - "RepositoryKmsKey": { - "id": "RepositoryKmsKey", - "path": "RepositoryKmsKey", - "children": { - "MyKey": { - "id": "MyKey", - "path": "RepositoryKmsKey/MyKey", - "children": { - "Resource": { - "id": "Resource", - "path": "RepositoryKmsKey/MyKey/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::KMS::Key", - "aws:cdk:cloudformation:props": { - "keyPolicy": { - "Statement": [ - { - "Action": "kms:*", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - }, - "Resource": "*" - } - ], - "Version": "2012-10-17" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "0.0.0" - } - }, - "MyCodecommitRepository": { - "id": "MyCodecommitRepository", - "path": "RepositoryKmsKey/MyCodecommitRepository", - "children": { - "Resource": { - "id": "Resource", - "path": "RepositoryKmsKey/MyCodecommitRepository/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::CodeCommit::Repository", - "aws:cdk:cloudformation:props": { - "kmsKeyId": { - "Fn::GetAtt": [ - "MyKey6AB29FA6", - "Arn" - ] - }, - "repositoryName": "my-test-repository" - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_codecommit.CfnRepository", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_codecommit.Repository", - "version": "0.0.0" - } - }, - "BootstrapVersion": { - "id": "BootstrapVersion", - "path": "RepositoryKmsKey/BootstrapVersion", - "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" - } - }, - "CheckBootstrapVersion": { - "id": "CheckBootstrapVersion", - "path": "RepositoryKmsKey/CheckBootstrapVersion", - "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" - } - }, - "RepositoryKmsKeyTest": { - "id": "RepositoryKmsKeyTest", - "path": "RepositoryKmsKeyTest", - "children": { - "DefaultTest": { - "id": "DefaultTest", - "path": "RepositoryKmsKeyTest/DefaultTest", - "children": { - "Default": { - "id": "Default", - "path": "RepositoryKmsKeyTest/DefaultTest/Default", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DeployAssert": { - "id": "DeployAssert", - "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert", - "children": { - "BootstrapVersion": { - "id": "BootstrapVersion", - "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion", - "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" - } - }, - "CheckBootstrapVersion": { - "id": "CheckBootstrapVersion", - "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion", - "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "0.0.0" - } - }, - "Tree": { - "id": "Tree", - "path": "Tree", - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" - } - } -} \ No newline at end of file From 34df3afbd144e33712bfbb952fa47b2c38ce555c Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 29 Apr 2024 12:04:48 +0900 Subject: [PATCH 11/13] test: add snapshot --- .../cdk.out | 1 + .../integ.json | 12 ++ .../manifest.json | 119 ++++++++++++ .../repositoryKmsKey.assets.json | 19 ++ .../repositoryKmsKey.template.json | 85 ++++++++ ...efaultTestDeployAssert26C34A5E.assets.json | 19 ++ ...aultTestDeployAssert26C34A5E.template.json | 36 ++++ .../tree.json | 182 ++++++++++++++++++ 8 files changed, 473 insertions(+) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json new file mode 100644 index 0000000000000..fd1a7fc1821b4 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "repositoryKmsKeyTest/DefaultTest": { + "stacks": [ + "repositoryKmsKey" + ], + "assertionStack": "repositoryKmsKeyTest/DefaultTest/DeployAssert", + "assertionStackName": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json new file mode 100644 index 0000000000000..da8484918aad8 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json @@ -0,0 +1,119 @@ +{ + "version": "36.0.0", + "artifacts": { + "repositoryKmsKey.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "repositoryKmsKey.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "repositoryKmsKey": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "repositoryKmsKey.template.json", + "terminationProtection": false, + "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}/768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "repositoryKmsKey.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": [ + "repositoryKmsKey.assets" + ], + "metadata": { + "/repositoryKmsKey/MyKey/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyKey6AB29FA6" + } + ], + "/repositoryKmsKey/MyCodecommitRepository/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyCodecommitRepository26DB372B" + } + ], + "/repositoryKmsKey/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/repositoryKmsKey/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "repositoryKmsKey" + }, + "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json", + "terminationProtection": false, + "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": [ + "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.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": [ + "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets" + ], + "metadata": { + "/repositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/repositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "repositoryKmsKeyTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json new file mode 100644 index 0000000000000..142c28731d1bb --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f": { + "source": { + "path": "repositoryKmsKey.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f.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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json new file mode 100644 index 0000000000000..70000edd5b374 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json @@ -0,0 +1,85 @@ +{ + "Resources": { + "MyKey6AB29FA6": { + "Type": "AWS::KMS::Key", + "Properties": { + "KeyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "MyCodecommitRepository26DB372B": { + "Type": "AWS::CodeCommit::Repository", + "Properties": { + "KmsKeyId": { + "Fn::GetAtt": [ + "MyKey6AB29FA6", + "Arn" + ] + }, + "RepositoryName": "my-test-repository" + } + } + }, + "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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json new file mode 100644 index 0000000000000..c96f5ab18d794 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.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-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json new file mode 100644 index 0000000000000..657cc9a0795e0 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json @@ -0,0 +1,182 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "repositoryKmsKey": { + "id": "repositoryKmsKey", + "path": "repositoryKmsKey", + "children": { + "MyKey": { + "id": "MyKey", + "path": "repositoryKmsKey/MyKey", + "children": { + "Resource": { + "id": "Resource", + "path": "repositoryKmsKey/MyKey/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::KMS::Key", + "aws:cdk:cloudformation:props": { + "keyPolicy": { + "Statement": [ + { + "Action": "kms:*", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.CfnKey", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_kms.Key", + "version": "0.0.0" + } + }, + "MyCodecommitRepository": { + "id": "MyCodecommitRepository", + "path": "repositoryKmsKey/MyCodecommitRepository", + "children": { + "Resource": { + "id": "Resource", + "path": "repositoryKmsKey/MyCodecommitRepository/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeCommit::Repository", + "aws:cdk:cloudformation:props": { + "kmsKeyId": { + "Fn::GetAtt": [ + "MyKey6AB29FA6", + "Arn" + ] + }, + "repositoryName": "my-test-repository" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codecommit.CfnRepository", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_codecommit.Repository", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "repositoryKmsKey/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "repositoryKmsKey/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "repositoryKmsKeyTest": { + "id": "repositoryKmsKeyTest", + "path": "repositoryKmsKeyTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "repositoryKmsKeyTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "repositoryKmsKeyTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file From de67eb1c817438b1e9ae8135297f89490e8db8d8 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 29 Apr 2024 13:01:04 +0900 Subject: [PATCH 12/13] fix: integ test --- ...faultTestDeployAssertC5D9D647.assets.json} | 2 +- ...ultTestDeployAssertC5D9D647.template.json} | 0 .../integ.json | 8 ++-- .../manifest.json | 40 +++++++++---------- .../repositoryKmsKey.assets.json | 2 +- .../tree.json | 34 ++++++++-------- 6 files changed, 43 insertions(+), 43 deletions(-) rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/{repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json => RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json} (87%) rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/{repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json => RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json} (100%) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json similarity index 87% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json index c96f5ab18d794..8e1bfa9a903e2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json @@ -3,7 +3,7 @@ "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { - "path": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json", + "path": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json", "packaging": "file" }, "destinations": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json index fd1a7fc1821b4..7714becbcc91a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json @@ -1,12 +1,12 @@ { "version": "36.0.0", "testCases": { - "repositoryKmsKeyTest/DefaultTest": { + "RepositoryKmsKeyTest/DefaultTest": { "stacks": [ - "repositoryKmsKey" + "RepositoryKmsKey" ], - "assertionStack": "repositoryKmsKeyTest/DefaultTest/DeployAssert", - "assertionStackName": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E" + "assertionStack": "RepositoryKmsKeyTest/DefaultTest/DeployAssert", + "assertionStackName": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json index da8484918aad8..431652633f271 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json @@ -1,19 +1,19 @@ { "version": "36.0.0", "artifacts": { - "repositoryKmsKey.assets": { + "RepositoryKmsKey.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "repositoryKmsKey.assets.json", + "file": "RepositoryKmsKey.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "repositoryKmsKey": { + "RepositoryKmsKey": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "repositoryKmsKey.template.json", + "templateFile": "RepositoryKmsKey.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", @@ -22,7 +22,7 @@ "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "repositoryKmsKey.assets" + "RepositoryKmsKey.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -31,49 +31,49 @@ } }, "dependencies": [ - "repositoryKmsKey.assets" + "RepositoryKmsKey.assets" ], "metadata": { - "/repositoryKmsKey/MyKey/Resource": [ + "/RepositoryKmsKey/MyKey/Resource": [ { "type": "aws:cdk:logicalId", "data": "MyKey6AB29FA6" } ], - "/repositoryKmsKey/MyCodecommitRepository/Resource": [ + "/RepositoryKmsKey/MyCodecommitRepository/Resource": [ { "type": "aws:cdk:logicalId", "data": "MyCodecommitRepository26DB372B" } ], - "/repositoryKmsKey/BootstrapVersion": [ + "/RepositoryKmsKey/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/repositoryKmsKey/CheckBootstrapVersion": [ + "/RepositoryKmsKey/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "repositoryKmsKey" + "displayName": "RepositoryKmsKey" }, - "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets": { + "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets.json", + "file": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E": { + "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.template.json", + "templateFile": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", @@ -82,7 +82,7 @@ "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets" + "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -91,23 +91,23 @@ } }, "dependencies": [ - "repositoryKmsKeyTestDefaultTestDeployAssert26C34A5E.assets" + "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets" ], "metadata": { - "/repositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion": [ + "/RepositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/repositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + "/RepositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "repositoryKmsKeyTest/DefaultTest/DeployAssert" + "displayName": "RepositoryKmsKeyTest/DefaultTest/DeployAssert" }, "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json index 142c28731d1bb..41fe2b5e6c95f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json @@ -3,7 +3,7 @@ "files": { "768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f": { "source": { - "path": "repositoryKmsKey.template.json", + "path": "RepositoryKmsKey.template.json", "packaging": "file" }, "destinations": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json index 657cc9a0795e0..21ca7a85e82a7 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json @@ -4,17 +4,17 @@ "id": "App", "path": "", "children": { - "repositoryKmsKey": { - "id": "repositoryKmsKey", - "path": "repositoryKmsKey", + "RepositoryKmsKey": { + "id": "RepositoryKmsKey", + "path": "RepositoryKmsKey", "children": { "MyKey": { "id": "MyKey", - "path": "repositoryKmsKey/MyKey", + "path": "RepositoryKmsKey/MyKey", "children": { "Resource": { "id": "Resource", - "path": "repositoryKmsKey/MyKey/Resource", + "path": "RepositoryKmsKey/MyKey/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -61,11 +61,11 @@ }, "MyCodecommitRepository": { "id": "MyCodecommitRepository", - "path": "repositoryKmsKey/MyCodecommitRepository", + "path": "RepositoryKmsKey/MyCodecommitRepository", "children": { "Resource": { "id": "Resource", - "path": "repositoryKmsKey/MyCodecommitRepository/Resource", + "path": "RepositoryKmsKey/MyCodecommitRepository/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::CodeCommit::Repository", "aws:cdk:cloudformation:props": { @@ -91,7 +91,7 @@ }, "BootstrapVersion": { "id": "BootstrapVersion", - "path": "repositoryKmsKey/BootstrapVersion", + "path": "RepositoryKmsKey/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -99,7 +99,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "repositoryKmsKey/CheckBootstrapVersion", + "path": "RepositoryKmsKey/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" @@ -111,17 +111,17 @@ "version": "0.0.0" } }, - "repositoryKmsKeyTest": { - "id": "repositoryKmsKeyTest", - "path": "repositoryKmsKeyTest", + "RepositoryKmsKeyTest": { + "id": "RepositoryKmsKeyTest", + "path": "RepositoryKmsKeyTest", "children": { "DefaultTest": { "id": "DefaultTest", - "path": "repositoryKmsKeyTest/DefaultTest", + "path": "RepositoryKmsKeyTest/DefaultTest", "children": { "Default": { "id": "Default", - "path": "repositoryKmsKeyTest/DefaultTest/Default", + "path": "RepositoryKmsKeyTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", "version": "10.3.0" @@ -129,11 +129,11 @@ }, "DeployAssert": { "id": "DeployAssert", - "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert", + "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert", "children": { "BootstrapVersion": { "id": "BootstrapVersion", - "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion", + "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -141,7 +141,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "repositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" From 6b5c115702a4fbef6b45c82f079298d5f3d9d745 Mon Sep 17 00:00:00 2001 From: Kazuho CryerShinozuka Date: Mon, 29 Apr 2024 20:38:23 +0900 Subject: [PATCH 13/13] fix: update integ test --- .../RepositoryEncryption.assets.json} | 2 +- .../RepositoryEncryption.template.json} | 0 ...faultTestDeployAssert819A2226.assets.json} | 2 +- ...ultTestDeployAssert819A2226.template.json} | 0 .../cdk.out | 0 .../integ.json | 12 ++++++ .../manifest.json | 40 +++++++++---------- .../tree.json | 34 ++++++++-------- ...-key.ts => integ.repository-encryption.ts} | 4 +- .../integ.json | 12 ------ 10 files changed, 53 insertions(+), 53 deletions(-) rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/{integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json => integ.repository-encryption.js.snapshot/RepositoryEncryption.assets.json} (91%) rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/{integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json => integ.repository-encryption.js.snapshot/RepositoryEncryption.template.json} (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/{integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json => integ.repository-encryption.js.snapshot/RepositoryEncryptionTestDefaultTestDeployAssert819A2226.assets.json} (87%) rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/{integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json => integ.repository-encryption.js.snapshot/RepositoryEncryptionTestDefaultTestDeployAssert819A2226.template.json} (100%) rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/{integ.repository-kms-key.js.snapshot => integ.repository-encryption.js.snapshot}/cdk.out (100%) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/integ.json rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/{integ.repository-kms-key.js.snapshot => integ.repository-encryption.js.snapshot}/manifest.json (74%) rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/{integ.repository-kms-key.js.snapshot => integ.repository-encryption.js.snapshot}/tree.json (83%) rename packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/{integ.repository-kms-key.ts => integ.repository-encryption.ts} (79%) delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/RepositoryEncryption.assets.json similarity index 91% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/RepositoryEncryption.assets.json index 41fe2b5e6c95f..41edf05bdd534 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/RepositoryEncryption.assets.json @@ -3,7 +3,7 @@ "files": { "768c42cfd03f86c9416c69488b08f5ab428f042e921c8019c371f9a3353af94f": { "source": { - "path": "RepositoryKmsKey.template.json", + "path": "RepositoryEncryption.template.json", "packaging": "file" }, "destinations": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/RepositoryEncryption.template.json similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/repositoryKmsKey.template.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/RepositoryEncryption.template.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/RepositoryEncryptionTestDefaultTestDeployAssert819A2226.assets.json similarity index 87% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/RepositoryEncryptionTestDefaultTestDeployAssert819A2226.assets.json index 8e1bfa9a903e2..a4d3e749e8183 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/RepositoryEncryptionTestDefaultTestDeployAssert819A2226.assets.json @@ -3,7 +3,7 @@ "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { - "path": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json", + "path": "RepositoryEncryptionTestDefaultTestDeployAssert819A2226.template.json", "packaging": "file" }, "destinations": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/RepositoryEncryptionTestDefaultTestDeployAssert819A2226.template.json similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/RepositoryEncryptionTestDefaultTestDeployAssert819A2226.template.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/cdk.out similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/cdk.out rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/cdk.out diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/integ.json new file mode 100644 index 0000000000000..68e446d719272 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "RepositoryEncryptionTest/DefaultTest": { + "stacks": [ + "RepositoryEncryption" + ], + "assertionStack": "RepositoryEncryptionTest/DefaultTest/DeployAssert", + "assertionStackName": "RepositoryEncryptionTestDefaultTestDeployAssert819A2226" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/manifest.json similarity index 74% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/manifest.json index 431652633f271..eed4f1834e466 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/manifest.json @@ -1,19 +1,19 @@ { "version": "36.0.0", "artifacts": { - "RepositoryKmsKey.assets": { + "RepositoryEncryption.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "RepositoryKmsKey.assets.json", + "file": "RepositoryEncryption.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "RepositoryKmsKey": { + "RepositoryEncryption": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "RepositoryKmsKey.template.json", + "templateFile": "RepositoryEncryption.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", @@ -22,7 +22,7 @@ "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "RepositoryKmsKey.assets" + "RepositoryEncryption.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -31,49 +31,49 @@ } }, "dependencies": [ - "RepositoryKmsKey.assets" + "RepositoryEncryption.assets" ], "metadata": { - "/RepositoryKmsKey/MyKey/Resource": [ + "/RepositoryEncryption/MyKey/Resource": [ { "type": "aws:cdk:logicalId", "data": "MyKey6AB29FA6" } ], - "/RepositoryKmsKey/MyCodecommitRepository/Resource": [ + "/RepositoryEncryption/MyCodecommitRepository/Resource": [ { "type": "aws:cdk:logicalId", "data": "MyCodecommitRepository26DB372B" } ], - "/RepositoryKmsKey/BootstrapVersion": [ + "/RepositoryEncryption/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/RepositoryKmsKey/CheckBootstrapVersion": [ + "/RepositoryEncryption/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "RepositoryKmsKey" + "displayName": "RepositoryEncryption" }, - "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets": { + "RepositoryEncryptionTestDefaultTestDeployAssert819A2226.assets": { "type": "cdk:asset-manifest", "properties": { - "file": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets.json", + "file": "RepositoryEncryptionTestDefaultTestDeployAssert819A2226.assets.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } }, - "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647": { + "RepositoryEncryptionTestDefaultTestDeployAssert819A2226": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.template.json", + "templateFile": "RepositoryEncryptionTestDefaultTestDeployAssert819A2226.template.json", "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", @@ -82,7 +82,7 @@ "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ - "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets" + "RepositoryEncryptionTestDefaultTestDeployAssert819A2226.assets" ], "lookupRole": { "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", @@ -91,23 +91,23 @@ } }, "dependencies": [ - "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647.assets" + "RepositoryEncryptionTestDefaultTestDeployAssert819A2226.assets" ], "metadata": { - "/RepositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion": [ + "/RepositoryEncryptionTest/DefaultTest/DeployAssert/BootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "BootstrapVersion" } ], - "/RepositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + "/RepositoryEncryptionTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } ] }, - "displayName": "RepositoryKmsKeyTest/DefaultTest/DeployAssert" + "displayName": "RepositoryEncryptionTest/DefaultTest/DeployAssert" }, "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/tree.json similarity index 83% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/tree.json index 21ca7a85e82a7..7a6079bad0b51 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.js.snapshot/tree.json @@ -4,17 +4,17 @@ "id": "App", "path": "", "children": { - "RepositoryKmsKey": { - "id": "RepositoryKmsKey", - "path": "RepositoryKmsKey", + "RepositoryEncryption": { + "id": "RepositoryEncryption", + "path": "RepositoryEncryption", "children": { "MyKey": { "id": "MyKey", - "path": "RepositoryKmsKey/MyKey", + "path": "RepositoryEncryption/MyKey", "children": { "Resource": { "id": "Resource", - "path": "RepositoryKmsKey/MyKey/Resource", + "path": "RepositoryEncryption/MyKey/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::KMS::Key", "aws:cdk:cloudformation:props": { @@ -61,11 +61,11 @@ }, "MyCodecommitRepository": { "id": "MyCodecommitRepository", - "path": "RepositoryKmsKey/MyCodecommitRepository", + "path": "RepositoryEncryption/MyCodecommitRepository", "children": { "Resource": { "id": "Resource", - "path": "RepositoryKmsKey/MyCodecommitRepository/Resource", + "path": "RepositoryEncryption/MyCodecommitRepository/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::CodeCommit::Repository", "aws:cdk:cloudformation:props": { @@ -91,7 +91,7 @@ }, "BootstrapVersion": { "id": "BootstrapVersion", - "path": "RepositoryKmsKey/BootstrapVersion", + "path": "RepositoryEncryption/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -99,7 +99,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "RepositoryKmsKey/CheckBootstrapVersion", + "path": "RepositoryEncryption/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" @@ -111,17 +111,17 @@ "version": "0.0.0" } }, - "RepositoryKmsKeyTest": { - "id": "RepositoryKmsKeyTest", - "path": "RepositoryKmsKeyTest", + "RepositoryEncryptionTest": { + "id": "RepositoryEncryptionTest", + "path": "RepositoryEncryptionTest", "children": { "DefaultTest": { "id": "DefaultTest", - "path": "RepositoryKmsKeyTest/DefaultTest", + "path": "RepositoryEncryptionTest/DefaultTest", "children": { "Default": { "id": "Default", - "path": "RepositoryKmsKeyTest/DefaultTest/Default", + "path": "RepositoryEncryptionTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", "version": "10.3.0" @@ -129,11 +129,11 @@ }, "DeployAssert": { "id": "DeployAssert", - "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert", + "path": "RepositoryEncryptionTest/DefaultTest/DeployAssert", "children": { "BootstrapVersion": { "id": "BootstrapVersion", - "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert/BootstrapVersion", + "path": "RepositoryEncryptionTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" @@ -141,7 +141,7 @@ }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", - "path": "RepositoryKmsKeyTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "path": "RepositoryEncryptionTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.ts similarity index 79% rename from packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.ts rename to packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.ts index 1431f3c846d1c..49ee3fced5dbc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-encryption.ts @@ -6,7 +6,7 @@ import * as kms from 'aws-cdk-lib/aws-kms'; const app = new cdk.App(); -const stack = new cdk.Stack(app, 'RepositoryKmsKey'); +const stack = new cdk.Stack(app, 'RepositoryEncryption'); const kmsKey = new kms.Key(stack, 'MyKey'); new codecommit.Repository(stack, 'MyCodecommitRepository', { @@ -14,6 +14,6 @@ new codecommit.Repository(stack, 'MyCodecommitRepository', { kmsKey, }); -new integ.IntegTest(app, 'RepositoryKmsKeyTest', { +new integ.IntegTest(app, 'RepositoryEncryptionTest', { testCases: [stack], }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json deleted file mode 100644 index 7714becbcc91a..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codecommit/test/integ.repository-kms-key.js.snapshot/integ.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": "36.0.0", - "testCases": { - "RepositoryKmsKeyTest/DefaultTest": { - "stacks": [ - "RepositoryKmsKey" - ], - "assertionStack": "RepositoryKmsKeyTest/DefaultTest/DeployAssert", - "assertionStackName": "RepositoryKmsKeyTestDefaultTestDeployAssertC5D9D647" - } - } -} \ No newline at end of file