diff --git a/.github/workflows/issue-reprioritization.yml b/.github/workflows/issue-reprioritization.yml index 8c1495e3397ca..e8a68ec1276d1 100644 --- a/.github/workflows/issue-reprioritization.yml +++ b/.github/workflows/issue-reprioritization.yml @@ -1,5 +1,6 @@ name: issue-reprioritization -on: +on: + workflow_dispatch: {} schedule: - cron: "0 0 * * 0" diff --git a/.mergify.yml b/.mergify.yml index 487115e0aee56..c75f34e359160 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -10,7 +10,7 @@ pull_request_rules: label: add: [ contribution/core ] conditions: - - author~=^(RomainMuller|garnaat|skinny85|rix0rrr|NGL321|Jerry-AWS|MrArnoldPalmer|iliapolo|pkandasamy91|SoManyHs|uttarasridhar|otaviomacedo|madeline-k|kaizencc|comcalvi|Chriscbr|corymhall|peterwoodworth|ryparker|TheRealAmazonKendra|yuth|vinayak-kukreja)$ + - author~=^(RomainMuller|rix0rrr|Jerry-AWS|MrArnoldPalmer|iliapolo|uttarasridhar|otaviomacedo|madeline-k|kaizencc|comcalvi|corymhall|peterwoodworth|ryparker|TheRealAmazonKendra|yuth|vinayak-kukreja|Naumel|mrgrain)$ - -label~="contribution/core" - name: automatic merge actions: diff --git a/CHANGELOG.v2.alpha.md b/CHANGELOG.v2.alpha.md index bc3f74c5e7dfe..ab9b8fa3f9417 100644 --- a/CHANGELOG.v2.alpha.md +++ b/CHANGELOG.v2.alpha.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.31.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.31.0-alpha.0...v2.31.1-alpha.0) (2022-07-08) + +## [2.31.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.30.0-alpha.0...v2.31.0-alpha.0) (2022-07-06) + + +### Features + +* **batch:** add secrets props to job definition ([#20871](https://github.com/aws/aws-cdk/issues/20871)) ([9b1051f](https://github.com/aws/aws-cdk/commit/9b1051f86abdfa6448b14cdae8e1ef9acb1e6688)), closes [#19506](https://github.com/aws/aws-cdk/issues/19506) [#10976](https://github.com/aws/aws-cdk/issues/10976) + ## [2.30.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.29.1-alpha.0...v2.30.0-alpha.0) (2022-07-01) ## [2.29.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.29.0-alpha.0...v2.29.1-alpha.0) (2022-06-24) diff --git a/CHANGELOG.v2.md b/CHANGELOG.v2.md index 79980f5226830..cfe56b77ac27f 100644 --- a/CHANGELOG.v2.md +++ b/CHANGELOG.v2.md @@ -2,6 +2,35 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.31.1](https://github.com/aws/aws-cdk/compare/v2.31.0...v2.31.1) (2022-07-08) + + +### Bug Fixes + +* **custom-resources:** Custom resource provider framework not passing `ResponseURL` to user function ([#21065](https://github.com/aws/aws-cdk/issues/21065)) ([f7b25b6](https://github.com/aws/aws-cdk/commit/f7b25b671003b8d6c7400811484beb4284bebacb)), closes [#21058](https://github.com/aws/aws-cdk/issues/21058) + +## [2.31.0](https://github.com/aws/aws-cdk/compare/v2.30.0...v2.31.0) (2022-07-06) + + +### Features + +* **autoscaling:** step scaling policy supports estimatedInstanceWarmup property ([#20936](https://github.com/aws/aws-cdk/issues/20936)) ([e4c7b97](https://github.com/aws/aws-cdk/commit/e4c7b9770573e3c102e4be0c2ba0378a0b2b8767)) +* **aws-s3:** create default bucket policy when required (under feature flag) ([#20765](https://github.com/aws/aws-cdk/issues/20765)) ([cefa453](https://github.com/aws/aws-cdk/commit/cefa453bb3f98eb9c3f894c308ae703522de8f22)), closes [/docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-logs-infrastructure-S3](https://github.com/aws//docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html/issues/AWS-logs-infrastructure-S3) [#18816](https://github.com/aws/aws-cdk/issues/18816) +* **cfnspec:** cloudformation spec v78.1.0 ([#20952](https://github.com/aws/aws-cdk/issues/20952)) ([20d6e09](https://github.com/aws/aws-cdk/commit/20d6e0980ba9483fb0187a8cf5a256f5b59a7ba8)) +* **dynamodb:** imported tables always grant permissions for indexes ([#20682](https://github.com/aws/aws-cdk/issues/20682)) ([4d003a5](https://github.com/aws/aws-cdk/commit/4d003a50ae96a6c2be915edc2f6ca09eeb747fd5)), closes [#13703](https://github.com/aws/aws-cdk/issues/13703) +* **ec2:** add additional instance type classes ([#20972](https://github.com/aws/aws-cdk/issues/20972)) ([400ad91](https://github.com/aws/aws-cdk/commit/400ad91cb926fb0a6d71039f8eba3bb63e7c8ca8)), closes [#20924](https://github.com/aws/aws-cdk/issues/20924) +* **s3:** Event Bridge notification can be enabled after the bucket is created ([#20913](https://github.com/aws/aws-cdk/issues/20913)) ([b0b7a32](https://github.com/aws/aws-cdk/commit/b0b7a3217b1c110bcbe4580addf1ae2865ebfdf5)) + + +### Bug Fixes + +* **cli:** standard log messages are sent to stderr when CI=true ([#20957](https://github.com/aws/aws-cdk/issues/20957)) ([277340d](https://github.com/aws/aws-cdk/commit/277340d4a67f81d3b80907e1899001d091780698)), closes [#7717](https://github.com/aws/aws-cdk/issues/7717) +* **cloudfront:** fromOriginAccessIdentityName is a misnomer ([#20772](https://github.com/aws/aws-cdk/issues/20772)) ([3e58e5a](https://github.com/aws/aws-cdk/commit/3e58e5a3c5e12a859e4076b867444980d4b1e8e9)), closes [#20141](https://github.com/aws/aws-cdk/issues/20141) +* **eks:** latest `AlbController` version isn't compatible with the chart version ([#20826](https://github.com/aws/aws-cdk/issues/20826)) ([43a0cec](https://github.com/aws/aws-cdk/commit/43a0cec380f39618f18f15da8c60cb0a4a769d37)) +* **route53:** cannot delete existing alias record ([#20858](https://github.com/aws/aws-cdk/issues/20858)) ([22681b1](https://github.com/aws/aws-cdk/commit/22681b1bc29ee48b3092d60cfc22726912ae607a)), closes [#20847](https://github.com/aws/aws-cdk/issues/20847) +* **stepfunctions-tasks:** SqsSendMessage is missing KMS permissions ([#20990](https://github.com/aws/aws-cdk/issues/20990)) ([52b7019](https://github.com/aws/aws-cdk/commit/52b70194c946c3074b0205318564775be10f29a8)) +* custom resources log sensitive `ResponseURL` field ([#20899](https://github.com/aws/aws-cdk/issues/20899)) ([6b4f92f](https://github.com/aws/aws-cdk/commit/6b4f92f2437c7ff782c88ce23925a04168728d7c)) + ## [2.30.0](https://github.com/aws/aws-cdk/compare/v2.29.1...v2.30.0) (2022-07-01) ### Features diff --git a/packages/@aws-cdk/aws-backup/README.md b/packages/@aws-cdk/aws-backup/README.md index 5cf5bc4c1aa1a..687d0b9d800bd 100644 --- a/packages/@aws-cdk/aws-backup/README.md +++ b/packages/@aws-cdk/aws-backup/README.md @@ -176,6 +176,16 @@ backupVault.blockRecoveryPointDeletion(); By default access is not restricted. +Use the `lockConfiguration` property to enable [AWS Backup Vault Lock](https://docs.aws.amazon.com/aws-backup/latest/devguide/vault-lock.html): + +```ts +new BackupVault(stack, 'Vault', { + lockConfiguration: { + minRetention: Duration.days(30), + }, +}); +``` + ## Importing existing backup vault To import an existing backup vault into your CDK application, use the `BackupVault.fromBackupVaultArn` or `BackupVault.fromBackupVaultName` diff --git a/packages/@aws-cdk/aws-backup/lib/vault.ts b/packages/@aws-cdk/aws-backup/lib/vault.ts index 059b6ed6bb17f..001d29db6cd18 100644 --- a/packages/@aws-cdk/aws-backup/lib/vault.ts +++ b/packages/@aws-cdk/aws-backup/lib/vault.ts @@ -1,7 +1,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as sns from '@aws-cdk/aws-sns'; -import { ArnFormat, IResource, Lazy, Names, RemovalPolicy, Resource, Stack } from '@aws-cdk/core'; +import { ArnFormat, Duration, IResource, Lazy, Names, RemovalPolicy, Resource, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { CfnBackupVault } from './backup.generated'; @@ -91,6 +91,15 @@ export interface BackupVaultProps { * @default false */ readonly blockRecoveryPointDeletion?: boolean; + + /** + * Configuration for AWS Backup Vault Lock + * + * @see https://docs.aws.amazon.com/aws-backup/latest/devguide/vault-lock.html + * + * @default - AWS Backup Vault Lock is disabled + */ + readonly lockConfiguration?: LockConfiguration; } /** @@ -129,6 +138,55 @@ export enum BackupVaultEvents { BACKUP_PLAN_MODIFIED = 'BACKUP_PLAN_MODIFIED', } +/** + * Configuration for AWS Backup Vault Lock + * + * @see https://docs.aws.amazon.com/aws-backup/latest/devguide/vault-lock.html + */ +export interface LockConfiguration { + /** + * The minimum retention period that the vault retains its recovery points. + * + * If this parameter is specified, any backup or copy job to the vault must + * have a lifecycle policy with a retention period equal to or longer than + * the minimum retention period. If the job's retention period is shorter than + * that minimum retention period, then the vault fails that backup or copy job, + * and you should either modify your lifecycle settings or use a different + * vault. Recovery points already saved in the vault prior to Vault Lock are + * not affected. + */ + readonly minRetention: Duration; + + /** + * The maximum retention period that the vault retains its recovery points. + * + * If this parameter is specified, any backup or copy job to the vault must + * have a lifecycle policy with a retention period equal to or shorter than + * the maximum retention period. If the job's retention period is longer than + * that maximum retention period, then the vault fails the backup or copy job, + * and you should either modify your lifecycle settings or use a different + * vault. Recovery points already saved in the vault prior to Vault Lock are + * not affected. + * + * @default - Vault Lock does not enforce a maximum retention period + */ + readonly maxRetention?: Duration; + + /** + * The duration before the lock date. + * + * AWS Backup enforces a 72-hour cooling-off period before Vault Lock takes + * effect and becomes immutable. + * + * Before the lock date, you can delete Vault Lock from the vault or change + * the Vault Lock configuration. On and after the lock date, the Vault Lock + * becomes immutable and cannot be changed or deleted. + * + * @default - Vault Lock can be deleted or changed at any time + */ + readonly changeableFor?: Duration; +} + abstract class BackupVaultBase extends Resource implements IBackupVault { public abstract readonly backupVaultName: string; public abstract readonly backupVaultArn: string; @@ -226,6 +284,7 @@ export class BackupVault extends BackupVaultBase { accessPolicy: Lazy.any({ produce: () => this.accessPolicy.toJSON() }), encryptionKeyArn: props.encryptionKey && props.encryptionKey.keyArn, notifications, + lockConfiguration: renderLockConfiguration(props.lockConfiguration), }); vault.applyRemovalPolicy(props.removalPolicy); @@ -262,3 +321,32 @@ export class BackupVault extends BackupVaultBase { return id.substring(Math.max(id.length - 50, 0), id.length); } } + +function renderLockConfiguration(config?: LockConfiguration): CfnBackupVault.LockConfigurationTypeProperty | undefined { + if (!config) { + return undefined; + } + + if (config.changeableFor && config.changeableFor.toHours() < 72) { + throw new Error(`AWS Backup enforces a 72-hour cooling-off period before Vault Lock takes effect and becomes immutable, got ${config.changeableFor.toHours()} hours`); + } + + if (config.maxRetention) { + if (config.maxRetention.toDays() > 36500) { + throw new Error(`The longest maximum retention period you can specify is 36500 days, got ${config.maxRetention.toDays()} days`); + } + if (config.maxRetention.toDays() <= config.minRetention.toDays()) { + throw new Error(`The maximum retention period (${config.maxRetention.toDays()} days) must be greater than the minimum retention period (${config.minRetention.toDays()} days)`); + } + } + + if (config.minRetention.toHours() < 24) { + throw new Error(`The shortest minimum retention period you can specify is 1 day, got ${config.minRetention.toHours()} hours`); + } + + return { + minRetentionDays: config.minRetention.toDays(), + maxRetentionDays: config.maxRetention?.toDays(), + changeableForDays: config.changeableFor?.toDays(), + }; +} diff --git a/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/cdk-backup.template.json b/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/cdk-backup.template.json index a42ff516a5b73..a142eca42bad6 100644 --- a/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/cdk-backup.template.json +++ b/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/cdk-backup.template.json @@ -31,7 +31,10 @@ "Vault23237E5B": { "Type": "AWS::Backup::BackupVault", "Properties": { - "BackupVaultName": "cdkbackupVaultC2A6D3CB" + "BackupVaultName": "cdkbackupVaultC2A6D3CB", + "LockConfiguration": { + "MinRetentionDays": 5 + } }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/integ.json b/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/integ.json index 1c562a11594ba..c432d2f16d1fa 100644 --- a/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-backup/test/integ.backup": { + "integ.backup": { "stacks": [ "cdk-backup" ], diff --git a/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/manifest.json index 7c479fbabea2a..84b64e69b40c5 100644 --- a/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/tree.json b/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/tree.json index 28c85a58dc3e0..a380843ef8ec6 100644 --- a/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-backup/test/backup.integ.snapshot/tree.json @@ -8,8 +8,8 @@ "id": "Tree", "path": "Tree", "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.33" } }, "cdk-backup": { @@ -85,7 +85,10 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::Backup::BackupVault", "aws:cdk:cloudformation:props": { - "backupVaultName": "cdkbackupVaultC2A6D3CB" + "backupVaultName": "cdkbackupVaultC2A6D3CB", + "lockConfiguration": { + "minRetentionDays": 5 + } } }, "constructInfo": { diff --git a/packages/@aws-cdk/aws-backup/test/integ.backup.ts b/packages/@aws-cdk/aws-backup/test/integ.backup.ts index e04d3ba68671a..57de1d51750fc 100644 --- a/packages/@aws-cdk/aws-backup/test/integ.backup.ts +++ b/packages/@aws-cdk/aws-backup/test/integ.backup.ts @@ -1,6 +1,6 @@ import * as dynamodb from '@aws-cdk/aws-dynamodb'; import * as efs from '@aws-cdk/aws-efs'; -import { App, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core'; +import { App, Duration, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core'; import { Construct } from 'constructs'; import * as backup from '../lib'; @@ -21,6 +21,9 @@ class TestStack extends Stack { const vault = new backup.BackupVault(this, 'Vault', { removalPolicy: RemovalPolicy.DESTROY, + lockConfiguration: { + minRetention: Duration.days(5), + }, }); const plan = backup.BackupPlan.dailyWeeklyMonthly5YearRetention(this, 'Plan', vault); diff --git a/packages/@aws-cdk/aws-backup/test/vault.test.ts b/packages/@aws-cdk/aws-backup/test/vault.test.ts index ea63fb16323f2..1030d432f1364 100644 --- a/packages/@aws-cdk/aws-backup/test/vault.test.ts +++ b/packages/@aws-cdk/aws-backup/test/vault.test.ts @@ -2,7 +2,7 @@ import { Template } from '@aws-cdk/assertions'; import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as sns from '@aws-cdk/aws-sns'; -import { ArnFormat, Stack } from '@aws-cdk/core'; +import { ArnFormat, Duration, Stack } from '@aws-cdk/core'; import { BackupVault, BackupVaultEvents } from '../lib'; let stack: Stack; @@ -367,3 +367,58 @@ test('throws with too short name', () => { backupVaultName: 'x', })).toThrow(/Expected vault name to match pattern/); }); + +test('with lock configuration', () => { + // WHEN + new BackupVault(stack, 'Vault', { + lockConfiguration: { + minRetention: Duration.days(30), + maxRetention: Duration.days(365), + changeableFor: Duration.days(7), + }, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Backup::BackupVault', { + LockConfiguration: { + ChangeableForDays: 7, + MaxRetentionDays: 365, + MinRetentionDays: 30, + }, + }); +}); + +test('throws with incorrect lock configuration - min retention', () => { + expect(() => new BackupVault(stack, 'Vault', { + lockConfiguration: { + minRetention: Duration.hours(12), + }, + })).toThrow(/The shortest minimum retention period you can specify is 1 day/); +}); + +test('throws with incorrect lock configuration - max retention', () => { + expect(() => new BackupVault(stack, 'Vault', { + lockConfiguration: { + minRetention: Duration.days(7), + maxRetention: Duration.days(40000), + }, + })).toThrow(/The longest maximum retention period you can specify is 36500 days/); +}); + +test('throws with incorrect lock configuration - max and min retention', () => { + expect(() => new BackupVault(stack, 'Vault', { + lockConfiguration: { + minRetention: Duration.days(7), + maxRetention: Duration.days(4), + }, + })).toThrow(/The maximum retention period \(4 days\) must be greater than the minimum retention period \(7 days\)/); +}); + +test('throws with incorrect lock configuration - changeable for', () => { + expect(() => new BackupVault(stack, 'Vault', { + lockConfiguration: { + minRetention: Duration.days(7), + changeableFor: Duration.days(1), + }, + })).toThrow(/AWS Backup enforces a 72-hour cooling-off period before Vault Lock takes effect and becomes immutable/); +}); diff --git a/packages/@aws-cdk/aws-batch/README.md b/packages/@aws-cdk/aws-batch/README.md index 272c66d723092..0ef420a0422a5 100644 --- a/packages/@aws-cdk/aws-batch/README.md +++ b/packages/@aws-cdk/aws-batch/README.md @@ -119,8 +119,7 @@ The alternative would be to use the `BEST_FIT_PROGRESSIVE` strategy in order for Simply define your Launch Template: -```text -// This example is only available in TypeScript +```ts const myLaunchTemplate = new ec2.CfnLaunchTemplate(this, 'LaunchTemplate', { launchTemplateName: 'extra-storage-template', launchTemplateData: { @@ -138,7 +137,7 @@ const myLaunchTemplate = new ec2.CfnLaunchTemplate(this, 'LaunchTemplate', { }); ``` -and use it: +And provide `launchTemplateName`: ```ts declare const vpc: ec2.Vpc; @@ -155,6 +154,23 @@ const myComputeEnv = new batch.ComputeEnvironment(this, 'ComputeEnv', { }); ``` +Or provide `launchTemplateId` instead: + +```ts +declare const vpc: ec2.Vpc; +declare const myLaunchTemplate: ec2.CfnLaunchTemplate; + +const myComputeEnv = new batch.ComputeEnvironment(this, 'ComputeEnv', { + computeResources: { + launchTemplate: { + launchTemplateId: myLaunchTemplate.ref as string, + }, + vpc, + }, + computeEnvironmentName: 'MyStorageCapableComputeEnvironment', +}); +``` + ### Importing an existing Compute Environment To import an existing batch compute environment, call `ComputeEnvironment.fromComputeEnvironmentArn()`. diff --git a/packages/@aws-cdk/aws-batch/lib/compute-environment.ts b/packages/@aws-cdk/aws-batch/lib/compute-environment.ts index d73643a1d6320..7038923c0eae9 100644 --- a/packages/@aws-cdk/aws-batch/lib/compute-environment.ts +++ b/packages/@aws-cdk/aws-batch/lib/compute-environment.ts @@ -66,9 +66,17 @@ export enum AllocationStrategy { */ export interface LaunchTemplateSpecification { /** - * The Launch template name + * The Launch template ID. Mutually exclusive with `launchTemplateName`. + * + * @default - no launch template id provided */ - readonly launchTemplateName: string; + readonly launchTemplateId?: string; + /** + * The Launch template name. Mutually exclusive with `launchTemplateId` + * + * @default - no launch template name provided + */ + readonly launchTemplateName?: string; /** * The launch template version to be used (optional). * @@ -518,6 +526,19 @@ export class ComputeEnvironment extends Resource implements IComputeEnvironment throw new Error('Minimum vCpus cannot be greater than the maximum vCpus'); } } + + // Check if both launchTemplateId and launchTemplateName are provided + if (props.computeResources.launchTemplate && + (props.computeResources.launchTemplate.launchTemplateId && props.computeResources.launchTemplate.launchTemplateName)) { + throw new Error('You must specify either the launch template ID or launch template name in the request, but not both.'); + } + + // Check if both launchTemplateId and launchTemplateName are missing + if (props.computeResources.launchTemplate && + (!props.computeResources.launchTemplate.launchTemplateId && !props.computeResources.launchTemplate.launchTemplateName)) { + throw new Error('You must specify either the launch template ID or launch template name in the request.'); + } + // Setting a bid percentage is only allowed on SPOT resources + // Cannot use SPOT_CAPACITY_OPTIMIZED when using ON_DEMAND if (props.computeResources.type === ComputeResourceType.ON_DEMAND) { diff --git a/packages/@aws-cdk/aws-batch/test/batch.integ.snapshot/batch-stack.template.json b/packages/@aws-cdk/aws-batch/test/batch.integ.snapshot/batch-stack.template.json index 6ee6d41362455..363a7d93cb0ec 100644 --- a/packages/@aws-cdk/aws-batch/test/batch.integ.snapshot/batch-stack.template.json +++ b/packages/@aws-cdk/aws-batch/test/batch.integ.snapshot/batch-stack.template.json @@ -1002,6 +1002,281 @@ "vpcVPCGW7984C166" ] }, + "batchdemandcomputeenvlaunchtemplate2ResourceSecurityGroupBEA8DDD5": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "batch-stack/batch-demand-compute-env-launch-template-2/Resource-Security-Group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "vpcA2121C38" + } + }, + "DependsOn": [ + "vpcIGWE57CBDCA", + "vpcPrivateSubnet1DefaultRoute1AA8E2E5", + "vpcPrivateSubnet1RouteTableB41A48CC", + "vpcPrivateSubnet1RouteTableAssociation67945127", + "vpcPrivateSubnet1Subnet934893E8", + "vpcPrivateSubnet2DefaultRouteB0E07F99", + "vpcPrivateSubnet2RouteTable7280F23E", + "vpcPrivateSubnet2RouteTableAssociation007E94D3", + "vpcPrivateSubnet2Subnet7031C2BA", + "vpcPublicSubnet1DefaultRoute10708846", + "vpcPublicSubnet1EIPDA49DCBE", + "vpcPublicSubnet1NATGateway9C16659E", + "vpcPublicSubnet1RouteTable48A2DF9B", + "vpcPublicSubnet1RouteTableAssociation5D3F4579", + "vpcPublicSubnet1Subnet2E65531E", + "vpcPublicSubnet2DefaultRouteA1EC0F60", + "vpcPublicSubnet2EIP9B3743B1", + "vpcPublicSubnet2NATGateway9B8AE11A", + "vpcPublicSubnet2RouteTableEB40D4CB", + "vpcPublicSubnet2RouteTableAssociation21F81B59", + "vpcPublicSubnet2Subnet009B674F", + "vpcA2121C38", + "vpcVPCGW7984C166" + ] + }, + "batchdemandcomputeenvlaunchtemplate2EcsInstanceRoleEE146754": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": { + "Fn::Join": [ + "", + [ + "ec2.", + { + "Ref": "AWS::URLSuffix" + } + ] + ] + } + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role" + ] + ] + } + ] + }, + "DependsOn": [ + "vpcIGWE57CBDCA", + "vpcPrivateSubnet1DefaultRoute1AA8E2E5", + "vpcPrivateSubnet1RouteTableB41A48CC", + "vpcPrivateSubnet1RouteTableAssociation67945127", + "vpcPrivateSubnet1Subnet934893E8", + "vpcPrivateSubnet2DefaultRouteB0E07F99", + "vpcPrivateSubnet2RouteTable7280F23E", + "vpcPrivateSubnet2RouteTableAssociation007E94D3", + "vpcPrivateSubnet2Subnet7031C2BA", + "vpcPublicSubnet1DefaultRoute10708846", + "vpcPublicSubnet1EIPDA49DCBE", + "vpcPublicSubnet1NATGateway9C16659E", + "vpcPublicSubnet1RouteTable48A2DF9B", + "vpcPublicSubnet1RouteTableAssociation5D3F4579", + "vpcPublicSubnet1Subnet2E65531E", + "vpcPublicSubnet2DefaultRouteA1EC0F60", + "vpcPublicSubnet2EIP9B3743B1", + "vpcPublicSubnet2NATGateway9B8AE11A", + "vpcPublicSubnet2RouteTableEB40D4CB", + "vpcPublicSubnet2RouteTableAssociation21F81B59", + "vpcPublicSubnet2Subnet009B674F", + "vpcA2121C38", + "vpcVPCGW7984C166" + ] + }, + "batchdemandcomputeenvlaunchtemplate2InstanceProfileC5A36CBC": { + "Type": "AWS::IAM::InstanceProfile", + "Properties": { + "Roles": [ + { + "Ref": "batchdemandcomputeenvlaunchtemplate2EcsInstanceRoleEE146754" + } + ] + }, + "DependsOn": [ + "vpcIGWE57CBDCA", + "vpcPrivateSubnet1DefaultRoute1AA8E2E5", + "vpcPrivateSubnet1RouteTableB41A48CC", + "vpcPrivateSubnet1RouteTableAssociation67945127", + "vpcPrivateSubnet1Subnet934893E8", + "vpcPrivateSubnet2DefaultRouteB0E07F99", + "vpcPrivateSubnet2RouteTable7280F23E", + "vpcPrivateSubnet2RouteTableAssociation007E94D3", + "vpcPrivateSubnet2Subnet7031C2BA", + "vpcPublicSubnet1DefaultRoute10708846", + "vpcPublicSubnet1EIPDA49DCBE", + "vpcPublicSubnet1NATGateway9C16659E", + "vpcPublicSubnet1RouteTable48A2DF9B", + "vpcPublicSubnet1RouteTableAssociation5D3F4579", + "vpcPublicSubnet1Subnet2E65531E", + "vpcPublicSubnet2DefaultRouteA1EC0F60", + "vpcPublicSubnet2EIP9B3743B1", + "vpcPublicSubnet2NATGateway9B8AE11A", + "vpcPublicSubnet2RouteTableEB40D4CB", + "vpcPublicSubnet2RouteTableAssociation21F81B59", + "vpcPublicSubnet2Subnet009B674F", + "vpcA2121C38", + "vpcVPCGW7984C166" + ] + }, + "batchdemandcomputeenvlaunchtemplate2ResourceServiceInstanceRole41CADAC1": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "batch.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSBatchServiceRole" + ] + ] + } + ] + }, + "DependsOn": [ + "vpcIGWE57CBDCA", + "vpcPrivateSubnet1DefaultRoute1AA8E2E5", + "vpcPrivateSubnet1RouteTableB41A48CC", + "vpcPrivateSubnet1RouteTableAssociation67945127", + "vpcPrivateSubnet1Subnet934893E8", + "vpcPrivateSubnet2DefaultRouteB0E07F99", + "vpcPrivateSubnet2RouteTable7280F23E", + "vpcPrivateSubnet2RouteTableAssociation007E94D3", + "vpcPrivateSubnet2Subnet7031C2BA", + "vpcPublicSubnet1DefaultRoute10708846", + "vpcPublicSubnet1EIPDA49DCBE", + "vpcPublicSubnet1NATGateway9C16659E", + "vpcPublicSubnet1RouteTable48A2DF9B", + "vpcPublicSubnet1RouteTableAssociation5D3F4579", + "vpcPublicSubnet1Subnet2E65531E", + "vpcPublicSubnet2DefaultRouteA1EC0F60", + "vpcPublicSubnet2EIP9B3743B1", + "vpcPublicSubnet2NATGateway9B8AE11A", + "vpcPublicSubnet2RouteTableEB40D4CB", + "vpcPublicSubnet2RouteTableAssociation21F81B59", + "vpcPublicSubnet2Subnet009B674F", + "vpcA2121C38", + "vpcVPCGW7984C166" + ] + }, + "batchdemandcomputeenvlaunchtemplate2E12D5CBC": { + "Type": "AWS::Batch::ComputeEnvironment", + "Properties": { + "Type": "MANAGED", + "ComputeResources": { + "AllocationStrategy": "BEST_FIT", + "InstanceRole": { + "Fn::GetAtt": [ + "batchdemandcomputeenvlaunchtemplate2InstanceProfileC5A36CBC", + "Arn" + ] + }, + "InstanceTypes": [ + "optimal" + ], + "LaunchTemplate": { + "LaunchTemplateId": { + "Ref": "ec2launchtemplate" + } + }, + "MaxvCpus": 256, + "MinvCpus": 0, + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "batchdemandcomputeenvlaunchtemplate2ResourceSecurityGroupBEA8DDD5", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Ref": "vpcPrivateSubnet1Subnet934893E8" + }, + { + "Ref": "vpcPrivateSubnet2Subnet7031C2BA" + } + ], + "Tags": { + "compute-env-tag": "123XYZ" + }, + "Type": "EC2" + }, + "ServiceRole": { + "Fn::GetAtt": [ + "batchdemandcomputeenvlaunchtemplate2ResourceServiceInstanceRole41CADAC1", + "Arn" + ] + }, + "State": "ENABLED" + }, + "DependsOn": [ + "vpcIGWE57CBDCA", + "vpcPrivateSubnet1DefaultRoute1AA8E2E5", + "vpcPrivateSubnet1RouteTableB41A48CC", + "vpcPrivateSubnet1RouteTableAssociation67945127", + "vpcPrivateSubnet1Subnet934893E8", + "vpcPrivateSubnet2DefaultRouteB0E07F99", + "vpcPrivateSubnet2RouteTable7280F23E", + "vpcPrivateSubnet2RouteTableAssociation007E94D3", + "vpcPrivateSubnet2Subnet7031C2BA", + "vpcPublicSubnet1DefaultRoute10708846", + "vpcPublicSubnet1EIPDA49DCBE", + "vpcPublicSubnet1NATGateway9C16659E", + "vpcPublicSubnet1RouteTable48A2DF9B", + "vpcPublicSubnet1RouteTableAssociation5D3F4579", + "vpcPublicSubnet1Subnet2E65531E", + "vpcPublicSubnet2DefaultRouteA1EC0F60", + "vpcPublicSubnet2EIP9B3743B1", + "vpcPublicSubnet2NATGateway9B8AE11A", + "vpcPublicSubnet2RouteTableEB40D4CB", + "vpcPublicSubnet2RouteTableAssociation21F81B59", + "vpcPublicSubnet2Subnet009B674F", + "vpcA2121C38", + "vpcVPCGW7984C166" + ] + }, "batchjobqueueE3C528F2": { "Type": "AWS::Batch::JobQueue", "Properties": { @@ -1023,6 +1298,12 @@ "Ref": "batchspotcomputeenv2CE4DFD9" }, "Order": 3 + }, + { + "ComputeEnvironment": { + "Ref": "batchdemandcomputeenvlaunchtemplate2E12D5CBC" + }, + "Order": 4 } ], "Priority": 1, diff --git a/packages/@aws-cdk/aws-batch/test/compute-environment.test.ts b/packages/@aws-cdk/aws-batch/test/compute-environment.test.ts index e25f61bd06ded..82c4ca821e7d1 100644 --- a/packages/@aws-cdk/aws-batch/test/compute-environment.test.ts +++ b/packages/@aws-cdk/aws-batch/test/compute-environment.test.ts @@ -70,7 +70,6 @@ describe('Batch Compute Environment', () => { }); }); }); - test('should deny if creating a managed environment with no provided compute resource props', () => { // THEN throws(() => { @@ -80,6 +79,35 @@ describe('Batch Compute Environment', () => { }); }); }); + test('should fail setting launch template with name and id', () => { + // THEN + throws(() => { + // WHEN + new batch.ComputeEnvironment(stack, 'test-compute-env', { + managed: true, + computeResources: { + vpc, + launchTemplate: { + launchTemplateName: 'test-template-name', + launchTemplateId: 'test-template-id', + }, + }, + }); + }); + }); + test('should fail setting launch template missing both template name or id', () => { + // THEN + throws(() => { + // WHEN + new batch.ComputeEnvironment(stack, 'test-compute-env', { + managed: true, + computeResources: { + vpc, + launchTemplate: {}, + }, + }); + }); + }); }); describe('using fargate resources', () => { test('should deny setting bid percentage', () => { diff --git a/packages/@aws-cdk/aws-batch/test/integ.batch.ts b/packages/@aws-cdk/aws-batch/test/integ.batch.ts index 6de9a121b9b6d..47e21cb14ca53 100644 --- a/packages/@aws-cdk/aws-batch/test/integ.batch.ts +++ b/packages/@aws-cdk/aws-batch/test/integ.batch.ts @@ -63,6 +63,22 @@ new batch.JobQueue(stack, 'batch-job-queue', { }), order: 3, }, + { + computeEnvironment: new batch.ComputeEnvironment(stack, 'batch-demand-compute-env-launch-template-2', { + managed: true, + computeResources: { + type: batch.ComputeResourceType.ON_DEMAND, + vpc, + launchTemplate: { + launchTemplateId: launchTemplate.ref as string, + }, + computeResourcesTags: { + 'compute-env-tag': '123XYZ', + }, + }, + }), + order: 4, + }, ], }); diff --git a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.ts b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.ts index 56beb537969c8..c5f8227f9796b 100644 --- a/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.ts +++ b/packages/@aws-cdk/aws-cloudformation/test/integ.nested-stack.ts @@ -12,6 +12,7 @@ interface MyNestedStackProps { readonly siblingTopic?: sns.Topic; // a topic defined in a sibling nested stack readonly topicCount: number; readonly topicNamePrefix: string; + readonly description?: string; } class MyNestedStack extends NestedStack { @@ -22,6 +23,7 @@ class MyNestedStack extends NestedStack { parameters: { [topicNamePrefixLogicalId]: props.topicNamePrefix, // pass in a parameter to the nested stack }, + description: props.description, }); const topicNamePrefixParameter = new CfnParameter(this, 'TopicNamePrefix', { type: 'String' }); @@ -57,7 +59,7 @@ class MyTestStack extends Stack { const queue = new sqs.Queue(this, 'SubscriberQueue'); new MyNestedStack(this, 'NestedStack1', { topicCount: 3, topicNamePrefix: 'Prefix1', subscriber: queue }); - new MyNestedStack(this, 'NestedStack2', { topicCount: 2, topicNamePrefix: 'Prefix2' }); + new MyNestedStack(this, 'NestedStack2', { topicCount: 2, topicNamePrefix: 'Prefix2', description: 'This is secound nested stack.' }); } } diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 6712a4f362c55..af1404692a582 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -1690,11 +1690,15 @@ export class LinuxBuildImage implements IBuildImage { public static readonly STANDARD_4_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:4.0'); /** The `aws/codebuild/standard:5.0` build image. */ public static readonly STANDARD_5_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:5.0'); + /** The `aws/codebuild/standard:6.0` build image. */ + public static readonly STANDARD_6_0 = LinuxBuildImage.codeBuildImage('aws/codebuild/standard:6.0'); public static readonly AMAZON_LINUX_2 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:1.0'); public static readonly AMAZON_LINUX_2_2 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:2.0'); /** The Amazon Linux 2 x86_64 standard image, version `3.0`. */ public static readonly AMAZON_LINUX_2_3 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:3.0'); + /** The Amazon Linux 2 x86_64 standard image, version `4.0`. */ + public static readonly AMAZON_LINUX_2_4 = LinuxBuildImage.codeBuildImage('aws/codebuild/amazonlinux2-x86_64-standard:4.0'); /** @deprecated Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0 instead. */ public static readonly AMAZON_LINUX_2_ARM = LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0; diff --git a/packages/@aws-cdk/aws-codebuild/test/project.test.ts b/packages/@aws-cdk/aws-codebuild/test/project.test.ts index 06a1707048a16..101ebd49b6f2d 100644 --- a/packages/@aws-cdk/aws-codebuild/test/project.test.ts +++ b/packages/@aws-cdk/aws-codebuild/test/project.test.ts @@ -791,6 +791,33 @@ describe('Environment', () => { }), }); }); + + test.each([ + ['Standard 6.0', codebuild.LinuxBuildImage.STANDARD_6_0, 'aws/codebuild/standard:6.0'], + ['Amazon Linux 4.0', codebuild.LinuxBuildImage.AMAZON_LINUX_2_4, 'aws/codebuild/amazonlinux2-x86_64-standard:4.0'], + ])('has build image for %s', (_, buildImage, expected) => { + // GIVEN + const stack = new cdk.Stack(); + const bucket = s3.Bucket.fromBucketName(stack, 'Bucket', 'my-bucket'); // (stack, 'Bucket'); + + // WHEN + new codebuild.Project(stack, 'Project', { + source: codebuild.Source.s3({ + bucket, + path: 'path', + }), + environment: { + buildImage: buildImage, + }, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::CodeBuild::Project', { + Environment: Match.objectLike({ + Image: expected, + }), + }); + }); }); describe('EnvironmentVariables', () => { diff --git a/packages/@aws-cdk/aws-ec2/README.md b/packages/@aws-cdk/aws-ec2/README.md index 50bd8b40f623c..b9eeb3c364c7f 100644 --- a/packages/@aws-cdk/aws-ec2/README.md +++ b/packages/@aws-cdk/aws-ec2/README.md @@ -1356,6 +1356,20 @@ new ec2.FlowLog(this, 'FlowLogWithKeyPrefix', { }); ``` +When the S3 destination is configured, AWS will automatically create an S3 bucket policy +that allows the service to write logs to the bucket. This makes it impossible to later update +that bucket policy. To have CDK create the bucket policy so that future updates can be made, +the `@aws-cdk/aws-s3:createDefaultLoggingPolicy` [feature flag](https://docs.aws.amazon.com/cdk/v2/guide/featureflags.html) can be used. This can be set +in the `cdk.json` file. + +```json +{ + "context": { + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true + } +} +``` + ## User Data User data enables you to run a script when your instances start up. In order to configure these scripts you can add commands directly to the script diff --git a/packages/@aws-cdk/aws-ec2/lib/instance-types.ts b/packages/@aws-cdk/aws-ec2/lib/instance-types.ts index 7da3c1199db6d..ec6e6ebe96926 100644 --- a/packages/@aws-cdk/aws-ec2/lib/instance-types.ts +++ b/packages/@aws-cdk/aws-ec2/lib/instance-types.ts @@ -138,6 +138,16 @@ export enum InstanceClass { */ R6I = 'r6i', + /** + * Memory optimized instances with local NVME drive, 6th generation with Intel Xeon Scalable processors (3rd generation processors code named Ice Lake) + */ + MEMORY6_INTEL_NVME_DRIVE = 'memory6-intel-nvme-drive', + + /** + * Memory optimized instances with local NVME drive, 6th generation with Intel Xeon Scalable processors (3rd generation processors code named Ice Lake) + */ + R6ID = 'r6id', + /** * Memory optimized instances for high performance computing, 5th generation */ @@ -183,6 +193,16 @@ export enum InstanceClass { */ MEMORY5_AMD_NVME_DRIVE = 'memory5-amd-nvme-drive', + /** + * High memory instances (3TB) based on Intel Xeon Platinum 8176M (Skylake) processors, 1st generation + */ + HIGH_MEMORY_3TB_1 = 'high-memory-3tb-1', + + /** + * High memory instances (3TB) based on Intel Xeon Platinum 8176M (Skylake) processors, 1st generation + */ + U_3TB1 = 'u-3tb1', + /** * High memory instances (6TB) based on Intel Xeon Platinum 8176M (Skylake) processors, 1st generation */ @@ -348,6 +368,16 @@ export enum InstanceClass { */ C6I = 'c6i', + /** + * Compute optimized instances with local NVME drive, 6th generation + */ + COMPUTE6_INTEL_NVME_DRIVE = 'compute6-intel-nvme-drive', + + /** + * Compute optimized instances with local NVME drive, 6th generation + */ + C6ID = 'c6id', + /** * Compute optimized instances based on AMD EPYC (codename Milan), 6th generation */ @@ -623,6 +653,16 @@ export enum InstanceClass { */ F1 = 'f1', + /** + * Graphics-optimized instances, 3rd generation + */ + GRAPHICS3_SMALL = 'graphics3-small', + + /** + * Graphics-optimized instances, 3rd generation + */ + G3S = 'g3s', + /** * Graphics-optimized instances, 3rd generation */ @@ -693,6 +733,16 @@ export enum InstanceClass { */ P3 = 'p3', + /** + * Parallel-processing optimized instances with local NVME drive for high performance computing, 3nd generation + */ + PARALLEL3_NVME_DRIVE_HIGH_PERFORMANCE = 'parallel3-nvme-drive-high-performance', + + /** + * Parallel-processing optimized instances with local NVME drive for high performance computing, 3rd generation + */ + P3DN = 'p3dn', + /** * Parallel-processing optimized instances, 4th generation */ @@ -733,6 +783,16 @@ export enum InstanceClass { */ M6I = 'm6i', + /** + * Standard instances based on Intel (Ice Lake) with local NVME drive, 6th generation. + */ + STANDARD6_INTEL_NVME_DRIVE = 'standard6-intel-nvme-drive', + + /** + * Standard instances based on Intel (Ice Lake) with local NVME drive, 6th generation. + */ + M6ID = 'm6id', + /** * Standard instances based on 3rd Gen AMD EPYC processors, 6th generation. */ @@ -802,6 +862,16 @@ export enum InstanceClass { * High performance computing based on AMD EPYC, 6th generation */ HPC6A = 'hpc6a', + + /** + * Deep learning instances powered by Gaudi accelerators from Habana Labs (an Intel company), 1st generation + */ + DEEP_LEARNING1 = 'deep-learning1', + + /** + * Deep learning instances powered by Gaudi accelerators from Habana Labs (an Intel company), 1st generation + */ + DL1 = 'dl1', } /** @@ -978,6 +1048,8 @@ export class InstanceType { [InstanceClass.R5]: 'r5', [InstanceClass.MEMORY6_INTEL]: 'r6i', [InstanceClass.R6I]: 'r6i', + [InstanceClass.MEMORY6_INTEL_NVME_DRIVE]: 'r6id', + [InstanceClass.R6ID]: 'r6id', [InstanceClass.MEMORY5_HIGH_PERFORMANCE]: 'r5n', [InstanceClass.R5N]: 'r5n', [InstanceClass.MEMORY5_NVME_DRIVE]: 'r5d', @@ -988,6 +1060,8 @@ export class InstanceType { [InstanceClass.R5A]: 'r5a', [InstanceClass.MEMORY5_AMD_NVME_DRIVE]: 'r5ad', [InstanceClass.R5AD]: 'r5ad', + [InstanceClass.HIGH_MEMORY_3TB_1]: 'u-3tb1', + [InstanceClass.U_3TB1]: 'u-3tb1', [InstanceClass.HIGH_MEMORY_6TB_1]: 'u-6tb1', [InstanceClass.U_6TB1]: 'u-6tb1', [InstanceClass.HIGH_MEMORY_9TB_1]: 'u-9tb1', @@ -1020,6 +1094,8 @@ export class InstanceType { [InstanceClass.C5N]: 'c5n', [InstanceClass.COMPUTE6_INTEL]: 'c6i', [InstanceClass.C6I]: 'c6i', + [InstanceClass.COMPUTE6_INTEL_NVME_DRIVE]: 'c6id', + [InstanceClass.C6ID]: 'c6id', [InstanceClass.COMPUTE6_AMD]: 'c6a', [InstanceClass.C6A]: 'c6a', [InstanceClass.COMPUTE6_GRAVITON2]: 'c6g', @@ -1065,6 +1141,8 @@ export class InstanceType { [InstanceClass.X2GD]: 'x2gd', [InstanceClass.FPGA1]: 'f1', [InstanceClass.F1]: 'f1', + [InstanceClass.GRAPHICS3_SMALL]: 'g3s', + [InstanceClass.G3S]: 'g3s', [InstanceClass.GRAPHICS3]: 'g3', [InstanceClass.G3]: 'g3', [InstanceClass.GRAPHICS4_NVME_DRIVE_HIGH_PERFORMANCE]: 'g4dn', @@ -1079,6 +1157,8 @@ export class InstanceType { [InstanceClass.P2]: 'p2', [InstanceClass.PARALLEL3]: 'p3', [InstanceClass.P3]: 'p3', + [InstanceClass.PARALLEL3_NVME_DRIVE_HIGH_PERFORMANCE]: 'p3dn', + [InstanceClass.P3DN]: 'p3dn', [InstanceClass.PARALLEL4]: 'p4d', [InstanceClass.P4D]: 'p4d', [InstanceClass.ARM1]: 'a1', @@ -1087,6 +1167,8 @@ export class InstanceType { [InstanceClass.M6G]: 'm6g', [InstanceClass.STANDARD6_INTEL]: 'm6i', [InstanceClass.M6I]: 'm6i', + [InstanceClass.STANDARD6_INTEL_NVME_DRIVE]: 'm6id', + [InstanceClass.M6ID]: 'm6id', [InstanceClass.STANDARD6_AMD]: 'm6a', [InstanceClass.M6A]: 'm6a', [InstanceClass.STANDARD6_GRAVITON2_NVME_DRIVE]: 'm6gd', @@ -1109,6 +1191,8 @@ export class InstanceType { [InstanceClass.MEMORY_INTENSIVE_2_INTEL]: 'x2idn', [InstanceClass.X2IEZN]: 'x2iezn', [InstanceClass.MEMORY_INTENSIVE_2_XTZ_INTEL]: 'x2iezn', + [InstanceClass.DEEP_LEARNING1]: 'dl1', + [InstanceClass.DL1]: 'dl1', }; return new InstanceType(`${instanceClassMap[instanceClass] ?? instanceClass}.${instanceSize}`); } diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts index 85c77c4395c96..ccb23517c4ff6 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts @@ -316,10 +316,15 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ public static readonly XRAY = new InterfaceVpcEndpointAwsService('xray'); /** - * The name of the service. + * The name of the service. e.g. com.amazonaws.us-east-1.ecs */ public readonly name: string; + /** + * The short name of the service. e.g. ecs + */ + public readonly shortName: string; + /** * The port of the service. */ @@ -348,6 +353,7 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ }); this.name = `${prefix || defaultEndpointPrefix}.${region}.${name}${defaultEndpointSuffix}`; + this.shortName = name; this.port = port || 443; } diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc-flow-logs.ts b/packages/@aws-cdk/aws-ec2/lib/vpc-flow-logs.ts index 326d09304c495..c027d4424ccd4 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc-flow-logs.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc-flow-logs.ts @@ -1,15 +1,14 @@ import * as iam from '@aws-cdk/aws-iam'; import * as logs from '@aws-cdk/aws-logs'; import * as s3 from '@aws-cdk/aws-s3'; -import { IResource, PhysicalName, RemovalPolicy, Resource } from '@aws-cdk/core'; +import { IResource, PhysicalName, RemovalPolicy, Resource, FeatureFlags, Stack } from '@aws-cdk/core'; +import { S3_CREATE_DEFAULT_LOGGING_POLICY } from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; import { CfnFlowLog } from './ec2.generated'; import { ISubnet, IVpc } from './vpc'; /** * A FlowLog - * - * */ export interface IFlowLog extends IResource { /** @@ -22,8 +21,6 @@ export interface IFlowLog extends IResource { /** * The type of VPC traffic to log - * - * */ export enum FlowLogTrafficType { /** @@ -44,7 +41,6 @@ export enum FlowLogTrafficType { /** * The available destination types for Flow Logs - * */ export enum FlowLogDestinationType { /** @@ -60,8 +56,6 @@ export enum FlowLogDestinationType { /** * The type of resource to create the flow log for - * - * */ export abstract class FlowLogResourceType { /** @@ -106,9 +100,60 @@ export abstract class FlowLogResourceType { } /** - * The destination type for the flow log - * + * The file format for flow logs written to an S3 bucket destination + */ +export enum FlowLogFileFormat { + /** + * File will be written as plain text + * + * This is the default value + */ + PLAIN_TEXT = 'plain-text', + + /** + * File will be written in parquet format + */ + PARQUET = 'parquet', +} + +/** + * Options for writing logs to a S3 destination + */ +export interface S3DestinationOptions { + /** + * Use Hive-compatible prefixes for flow logs + * stored in Amazon S3 + * + * @default false + */ + readonly hiveCompatiblePartitions?: boolean; + + /** + * The format for the flow log + * + * @default FlowLogFileFormat.PLAIN_TEXT + */ + readonly fileFormat?: FlowLogFileFormat; + + /** + * Partition the flow log per hour + * + * @default false + */ + readonly perHourPartition?: boolean; +} + +/** + * Options for writing logs to a destination * + * TODO: there are other destination options, currently they are + * only for s3 destinations (not sure if that will change) + */ +export interface DestinationOptions extends S3DestinationOptions { } + + +/** + * The destination type for the flow log */ export abstract class FlowLogDestination { /** @@ -124,12 +169,18 @@ export abstract class FlowLogDestination { /** * Use S3 as the destination + * + * @param bucket optional s3 bucket to publish logs to. If one is not provided + * a default bucket will be created + * @param keyPrefix optional prefix within the bucket to write logs to + * @param options additional s3 destination options */ - public static toS3(bucket?: s3.IBucket, keyPrefix?: string): FlowLogDestination { + public static toS3(bucket?: s3.IBucket, keyPrefix?: string, options?: S3DestinationOptions): FlowLogDestination { return new S3Destination({ logDestinationType: FlowLogDestinationType.S3, s3Bucket: bucket, keyPrefix, + destinationOptions: options, }); } @@ -141,8 +192,6 @@ export abstract class FlowLogDestination { /** * Flow Log Destination configuration - * - * */ export interface FlowLogDestinationConfig { /** @@ -179,6 +228,13 @@ export interface FlowLogDestinationConfig { * @default - undefined */ readonly keyPrefix?: string; + + /** + * Options for writing flow logs to a supported destination + * + * @default - undefined + */ + readonly destinationOptions?: DestinationOptions; } /** @@ -196,13 +252,79 @@ class S3Destination extends FlowLogDestination { encryption: s3.BucketEncryption.UNENCRYPTED, removalPolicy: RemovalPolicy.RETAIN, }); + } else { s3Bucket = this.props.s3Bucket; } + + // https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-s3.html#flow-logs-s3-permissions + if (FeatureFlags.of(scope).isEnabled(S3_CREATE_DEFAULT_LOGGING_POLICY)) { + const stack = Stack.of(scope); + let keyPrefix = this.props.keyPrefix ?? ''; + if (keyPrefix && !keyPrefix.endsWith('/')) { + keyPrefix = keyPrefix + '/'; + } + const prefix = this.props.destinationOptions?.hiveCompatiblePartitions + ? s3Bucket.arnForObjects(`${keyPrefix}AWSLogs/aws-account-id=${stack.account}/*`) + : s3Bucket.arnForObjects(`${keyPrefix}AWSLogs/${stack.account}/*`); + + s3Bucket.addToResourcePolicy(new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + principals: [ + new iam.ServicePrincipal('delivery.logs.amazonaws.com'), + ], + resources: [ + prefix, + ], + actions: ['s3:PutObject'], + conditions: { + StringEquals: { + 's3:x-amz-acl': 'bucket-owner-full-control', + 'aws:SourceAccount': stack.account, + }, + ArnLike: { + 'aws:SourceArn': stack.formatArn({ + service: 'logs', + resource: '*', + }), + }, + }, + })); + + s3Bucket.addToResourcePolicy(new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + principals: [ + new iam.ServicePrincipal('delivery.logs.amazonaws.com'), + ], + resources: [s3Bucket.bucketArn], + actions: [ + 's3:GetBucketAcl', + 's3:ListBucket', + ], + conditions: { + StringEquals: { + 'aws:SourceAccount': stack.account, + }, + ArnLike: { + 'aws:SourceArn': stack.formatArn({ + service: 'logs', + resource: '*', + }), + }, + }, + })); + } return { logDestinationType: FlowLogDestinationType.S3, s3Bucket, keyPrefix: this.props.keyPrefix, + destinationOptions: (this.props.destinationOptions?.fileFormat || this.props.destinationOptions?.perHourPartition + || this.props.destinationOptions?.hiveCompatiblePartitions) + ? { + fileFormat: this.props.destinationOptions.fileFormat ?? FlowLogFileFormat.PLAIN_TEXT, + perHourPartition: this.props.destinationOptions.perHourPartition ?? false, + hiveCompatiblePartitions: this.props.destinationOptions.hiveCompatiblePartitions ?? false, + } : undefined, }; } } @@ -263,8 +385,6 @@ class CloudWatchLogsDestination extends FlowLogDestination { /** * Options to add a flow log to a VPC - * - * */ export interface FlowLogOptions { /** @@ -285,8 +405,6 @@ export interface FlowLogOptions { /** * Properties of a VPC Flow Log - * - * */ export interface FlowLogProps extends FlowLogOptions { /** @@ -307,8 +425,6 @@ export interface FlowLogProps extends FlowLogOptions { /** * The base class for a Flow Log - * - * */ abstract class FlowLogBase extends Resource implements IFlowLog { /** @@ -322,8 +438,6 @@ abstract class FlowLogBase extends Resource implements IFlowLog { /** * A VPC flow log. * @resource AWS::EC2::FlowLog - * - * */ export class FlowLog extends FlowLogBase { /** @@ -383,6 +497,7 @@ export class FlowLog extends FlowLogBase { } const flowLog = new CfnFlowLog(this, 'FlowLog', { + destinationOptions: destinationConfig.destinationOptions, deliverLogsPermissionArn: this.iamRole ? this.iamRole.roleArn : undefined, logDestinationType: destinationConfig.logDestinationType, logGroupName: this.logGroup ? this.logGroup.logGroupName : undefined, @@ -395,5 +510,6 @@ export class FlowLog extends FlowLogBase { }); this.flowLogId = flowLog.ref; + this.node.defaultChild = flowLog; } } diff --git a/packages/@aws-cdk/aws-ec2/package.json b/packages/@aws-cdk/aws-ec2/package.json index 891582a8c2ce3..aaffd42848657 100644 --- a/packages/@aws-cdk/aws-ec2/package.json +++ b/packages/@aws-cdk/aws-ec2/package.json @@ -83,6 +83,7 @@ "@aws-cdk/assertions": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", + "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", diff --git a/packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.ts b/packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.ts index 6ce95c09bb662..c6a46a157c30d 100644 --- a/packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.ts +++ b/packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.ts @@ -1,11 +1,41 @@ -/// !cdk-integ * import { PolicyStatement, Effect, ServicePrincipal } from '@aws-cdk/aws-iam'; import * as s3 from '@aws-cdk/aws-s3'; import { App, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core'; -import { FlowLog, FlowLogDestination, FlowLogResourceType, Vpc } from '../lib'; +import { IntegTest, ExpectedResult, AssertionsProvider } from '@aws-cdk/integ-tests'; +import { FlowLog, FlowLogDestination, FlowLogResourceType, Vpc, Instance, InstanceType, InstanceClass, InstanceSize, MachineImage, AmazonLinuxGeneration } from '../lib'; const app = new App(); +class FeatureFlagStack extends Stack { + public readonly bucketArn: string; + public readonly bucket: s3.IBucket; + constructor(scope: App, id: string, props?: StackProps) { + super(scope, id, props); + + const vpc = new Vpc(this, 'VPC'); + + const flowLog = vpc.addFlowLog('FlowLogsS3', { + destination: FlowLogDestination.toS3(), + }); + this.bucket = flowLog.bucket!; + this.bucketArn = this.exportValue(flowLog.bucket!.bucketArn); + + vpc.addFlowLog('FlowLogsS3WithDestinationOptions', { + destination: FlowLogDestination.toS3(undefined, undefined, { + hiveCompatiblePartitions: true, + }), + }); + + new Instance(this, 'FlowLogsInstance', { + vpc, + instanceType: InstanceType.of(InstanceClass.T3, InstanceSize.SMALL), + machineImage: MachineImage.latestAmazonLinux({ + generation: AmazonLinuxGeneration.AMAZON_LINUX_2, + }), + }); + } +} + class TestStack extends Stack { constructor(scope: App, id: string, props?: StackProps) { super(scope, id, props); @@ -66,6 +96,27 @@ class TestStack extends Stack { } } -new TestStack(app, 'FlowLogsTestStack'); +const featureFlagTest = new FeatureFlagStack(app, 'FlowLogsFeatureFlag'); + +const integ = new IntegTest(app, 'FlowLogs', { + testCases: [ + new TestStack(app, 'FlowLogsTestStack'), + featureFlagTest, + ], +}); + + +const objects = integ.assertions.awsApiCall('S3', 'listObjectsV2', { + Bucket: featureFlagTest.bucket.bucketName, + MaxKeys: 1, + Prefix: `AWSLogs/${featureFlagTest.account}/vpcflowlogs`, +}); +const assertionProvider = objects.node.tryFindChild('SdkProvider') as AssertionsProvider; +assertionProvider.addPolicyStatementFromSdkCall('s3', 'ListBucket', [featureFlagTest.bucketArn]); +assertionProvider.addPolicyStatementFromSdkCall('s3', 'GetObject', [`${featureFlagTest.bucketArn}/*`]); + +objects.expect(ExpectedResult.objectLike({ + KeyCount: 1, +})); app.synth(); diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-endpoint.test.ts b/packages/@aws-cdk/aws-ec2/test/vpc-endpoint.test.ts index 9baa7c9e7e437..7ad9568478b51 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-endpoint.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/vpc-endpoint.test.ts @@ -268,6 +268,13 @@ describe('vpc endpoint', () => { }); + describe('interface endpoint retains service name in shortName property', () => { + test('shortName property', () => { + expect(InterfaceVpcEndpointAwsService.ECS.shortName).toBe('ecs'); + expect(InterfaceVpcEndpointAwsService.ECR_DOCKER.shortName).toBe('ecr.dkr'); + }); + }); + describe('add interface endpoint to looked-up VPC', () => { test('initial run', () => { // GIVEN diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsDefaultTestDeployAssert6AFD1854.template.json b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsDefaultTestDeployAssert6AFD1854.template.json new file mode 100644 index 0000000000000..5bdb8827e352b --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsDefaultTestDeployAssert6AFD1854.template.json @@ -0,0 +1,207 @@ +{ + "Resources": { + "AwsApiCallS3listObjectsV2": { + "Type": "Custom::DeployAssert@SdkCallS3listObjectsV2", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "S3", + "api": "listObjectsV2", + "parameters": { + "Bucket": { + "Fn::ImportValue": "FlowLogsFeatureFlag:ExportsOutputRefVPCFlowLogsS3BucketFB7DC2BE6C269563" + }, + "MaxKeys": 1, + "Prefix": { + "Fn::Join": [ + "", + [ + "AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/vpcflowlogs" + ] + ] + } + }, + "flattenResponse": "false", + "salt": "1657219152690" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AwsApiCallS3listObjectsV2AssertEqualsS3listObjectsV26A93E391": { + "Type": "Custom::DeployAssert@AssertEquals", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "actual": { + "Fn::GetAtt": [ + "AwsApiCallS3listObjectsV2", + "apiCallResponse" + ] + }, + "expected": "{\"$ObjectLike\":{\"KeyCount\":1}}", + "salt": "1657219152690" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ], + "Policies": [ + { + "PolicyName": "Inline", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "s3:ListObjectsV2" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "s3:ListBucket" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::ImportValue": "FlowLogsFeatureFlag:ExportsOutputFnGetAttVPCFlowLogsS3BucketFB7DC2BEArn0818560B" + } + ] + }, + { + "Action": [ + "s3:GetObject" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::ImportValue": "FlowLogsFeatureFlag:ExportsOutputFnGetAttVPCFlowLogsS3BucketFB7DC2BEArn0818560B" + }, + "/*" + ] + ] + } + ] + } + ] + } + } + ] + } + }, + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Runtime": "nodejs14.x", + "Code": { + "S3Bucket": { + "Ref": "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3S3Bucket5F1832C4" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3S3VersionKeyA04E23E6" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3S3VersionKeyA04E23E6" + } + ] + } + ] + } + ] + ] + } + }, + "Timeout": 120, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + } + }, + "Outputs": { + "AssertionResultsAssertEqualsS3listObjectsV2": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallS3listObjectsV2AssertEqualsS3listObjectsV26A93E391", + "data" + ] + } + } + }, + "Parameters": { + "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3S3Bucket5F1832C4": { + "Type": "String", + "Description": "S3 bucket for asset \"ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3\"" + }, + "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3S3VersionKeyA04E23E6": { + "Type": "String", + "Description": "S3 key for asset version \"ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3\"" + }, + "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3ArtifactHash000AF521": { + "Type": "String", + "Description": "Artifact hash for asset \"ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3\"" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsFeatureFlag.template.json b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsFeatureFlag.template.json new file mode 100644 index 0000000000000..83d4a2245d467 --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsFeatureFlag.template.json @@ -0,0 +1,825 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "VPCFlowLogsS3BucketFB7DC2BE": { + "Type": "AWS::S3::Bucket", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC" + } + ] + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "VPCFlowLogsS3BucketPolicyB2C2A045": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "VPCFlowLogsS3BucketFB7DC2BE" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control", + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "VPCFlowLogsS3BucketFB7DC2BE", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + }, + { + "Action": [ + "s3:GetBucketAcl", + "s3:ListBucket" + ], + "Condition": { + "StringEquals": { + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "VPCFlowLogsS3BucketFB7DC2BE", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "VPCFlowLogsS3FlowLogB5256CFF": { + "Type": "AWS::EC2::FlowLog", + "Properties": { + "ResourceId": { + "Ref": "VPCB9E5F0B4" + }, + "ResourceType": "VPC", + "TrafficType": "ALL", + "LogDestination": { + "Fn::GetAtt": [ + "VPCFlowLogsS3BucketFB7DC2BE", + "Arn" + ] + }, + "LogDestinationType": "s3", + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC" + } + ] + } + }, + "VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456": { + "Type": "AWS::S3::Bucket", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC" + } + ] + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "VPCFlowLogsS3WithDestinationOptionsBucketPolicy35257B71": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control", + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456", + "Arn" + ] + }, + "/AWSLogs/aws-account-id=", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + }, + { + "Action": [ + "s3:GetBucketAcl", + "s3:ListBucket" + ], + "Condition": { + "StringEquals": { + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "VPCFlowLogsS3WithDestinationOptionsFlowLog030C15B2": { + "Type": "AWS::EC2::FlowLog", + "Properties": { + "ResourceId": { + "Ref": "VPCB9E5F0B4" + }, + "ResourceType": "VPC", + "TrafficType": "ALL", + "DestinationOptions": { + "fileFormat": "plain-text", + "perHourPartition": false, + "hiveCompatiblePartitions": true + }, + "LogDestination": { + "Fn::GetAtt": [ + "VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456", + "Arn" + ] + }, + "LogDestinationType": "s3", + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/VPC" + } + ] + } + }, + "FlowLogsInstanceInstanceSecurityGroupF61782E0": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "FlowLogsFeatureFlag/FlowLogsInstance/InstanceSecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/FlowLogsInstance" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "FlowLogsInstanceInstanceRole1E8242D9": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": { + "Fn::Join": [ + "", + [ + "ec2.", + { + "Ref": "AWS::URLSuffix" + } + ] + ] + } + } + } + ], + "Version": "2012-10-17" + }, + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/FlowLogsInstance" + } + ] + } + }, + "FlowLogsInstanceInstanceProfile5CDC5493": { + "Type": "AWS::IAM::InstanceProfile", + "Properties": { + "Roles": [ + { + "Ref": "FlowLogsInstanceInstanceRole1E8242D9" + } + ] + } + }, + "FlowLogsInstanceB14CA11F": { + "Type": "AWS::EC2::Instance", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "IamInstanceProfile": { + "Ref": "FlowLogsInstanceInstanceProfile5CDC5493" + }, + "ImageId": { + "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" + }, + "InstanceType": "t3.small", + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "FlowLogsInstanceInstanceSecurityGroupF61782E0", + "GroupId" + ] + } + ], + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + "Tags": [ + { + "Key": "Name", + "Value": "FlowLogsFeatureFlag/FlowLogsInstance" + } + ], + "UserData": { + "Fn::Base64": "#!/bin/bash" + } + }, + "DependsOn": [ + "FlowLogsInstanceInstanceRole1E8242D9" + ] + } + }, + "Outputs": { + "ExportsOutputFnGetAttVPCFlowLogsS3BucketFB7DC2BEArn0818560B": { + "Value": { + "Fn::GetAtt": [ + "VPCFlowLogsS3BucketFB7DC2BE", + "Arn" + ] + }, + "Export": { + "Name": "FlowLogsFeatureFlag:ExportsOutputFnGetAttVPCFlowLogsS3BucketFB7DC2BEArn0818560B" + } + }, + "ExportsOutputRefVPCFlowLogsS3BucketFB7DC2BE6C269563": { + "Value": { + "Ref": "VPCFlowLogsS3BucketFB7DC2BE" + }, + "Export": { + "Name": "FlowLogsFeatureFlag:ExportsOutputRefVPCFlowLogsS3BucketFB7DC2BE6C269563" + } + } + }, + "Parameters": { + "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsTestStack.template.json b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsTestStack.template.json index a45e0c4e657fc..4c669d0bc61c7 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsTestStack.template.json +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsTestStack.template.json @@ -396,6 +396,119 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, + "VPCFlowLogsS3BucketPolicyB2C2A045": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "VPCFlowLogsS3BucketFB7DC2BE" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control", + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "VPCFlowLogsS3BucketFB7DC2BE", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + }, + { + "Action": [ + "s3:GetBucketAcl", + "s3:ListBucket" + ], + "Condition": { + "StringEquals": { + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "VPCFlowLogsS3BucketFB7DC2BE", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, "VPCFlowLogsS3FlowLogB5256CFF": { "Type": "AWS::EC2::FlowLog", "Properties": { @@ -630,24 +743,44 @@ "Principal": { "Service": "delivery.logs.amazonaws.com" }, - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/AWSLogs/", - { - "Ref": "AWS::AccountId" - }, - "/*" + "Resource": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "Bucket83908E77", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] ] - ] - } + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "Bucket83908E77", + "Arn" + ] + }, + "/prefix/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + ] }, { "Action": [ @@ -745,7 +878,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" + "Ref": "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26S3Bucket180EC6B2" }, "S3Key": { "Fn::Join": [ @@ -758,7 +891,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" + "Ref": "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26S3VersionKeyF1ADAF48" } ] } @@ -771,7 +904,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" + "Ref": "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26S3VersionKeyF1ADAF48" } ] } @@ -810,17 +943,17 @@ } }, "Parameters": { - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232": { + "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26S3Bucket180EC6B2": { "Type": "String", - "Description": "S3 bucket for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" + "Description": "S3 bucket for asset \"60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26\"" }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE": { + "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26S3VersionKeyF1ADAF48": { "Type": "String", - "Description": "S3 key for asset version \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" + "Description": "S3 key for asset version \"60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26\"" }, - "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2": { + "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26ArtifactHashF709D3CB": { "Type": "String", - "Description": "Artifact hash for asset \"be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824\"" + "Description": "Artifact hash for asset \"60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/__entrypoint__.js b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/__entrypoint__.js new file mode 100644 index 0000000000000..9df94382cc74e --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/__entrypoint__.js @@ -0,0 +1,118 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = exports.external = void 0; +const https = require("https"); +const url = require("url"); +// for unit tests +exports.external = { + sendHttpRequest: defaultSendHttpRequest, + log: defaultLog, + includeStackTraces: true, + userHandlerIndex: './index', +}; +const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; +const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; +async function handler(event, context) { + const sanitizedEvent = { ...event, ResponseURL: '...' }; + exports.external.log(JSON.stringify(sanitizedEvent, undefined, 2)); + // ignore DELETE event when the physical resource ID is the marker that + // indicates that this DELETE is a subsequent DELETE to a failed CREATE + // operation. + if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { + exports.external.log('ignoring DELETE event caused by a failed CREATE event'); + await submitResponse('SUCCESS', event); + return; + } + try { + // invoke the user handler. this is intentionally inside the try-catch to + // ensure that if there is an error it's reported as a failure to + // cloudformation (otherwise cfn waits). + // eslint-disable-next-line @typescript-eslint/no-require-imports + const userHandler = require(exports.external.userHandlerIndex).handler; + const result = await userHandler(sanitizedEvent, context); + // validate user response and create the combined event + const responseEvent = renderResponse(event, result); + // submit to cfn as success + await submitResponse('SUCCESS', responseEvent); + } + catch (e) { + const resp = { + ...event, + Reason: exports.external.includeStackTraces ? e.stack : e.message, + }; + if (!resp.PhysicalResourceId) { + // special case: if CREATE fails, which usually implies, we usually don't + // have a physical resource id. in this case, the subsequent DELETE + // operation does not have any meaning, and will likely fail as well. to + // address this, we use a marker so the provider framework can simply + // ignore the subsequent DELETE. + if (event.RequestType === 'Create') { + exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); + resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; + } + else { + // otherwise, if PhysicalResourceId is not specified, something is + // terribly wrong because all other events should have an ID. + exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); + } + } + // this is an actual error, fail the activity altogether and exist. + await submitResponse('FAILED', resp); + } +} +exports.handler = handler; +function renderResponse(cfnRequest, handlerResponse = {}) { + // if physical ID is not returned, we have some defaults for you based + // on the request type. + const physicalResourceId = handlerResponse.PhysicalResourceId ?? cfnRequest.PhysicalResourceId ?? cfnRequest.RequestId; + // if we are in DELETE and physical ID was changed, it's an error. + if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); + } + // merge request event and result event (result prevails). + return { + ...cfnRequest, + ...handlerResponse, + PhysicalResourceId: physicalResourceId, + }; +} +async function submitResponse(status, event) { + const json = { + Status: status, + Reason: event.Reason ?? status, + StackId: event.StackId, + RequestId: event.RequestId, + PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, + LogicalResourceId: event.LogicalResourceId, + NoEcho: event.NoEcho, + Data: event.Data, + }; + exports.external.log('submit response to cloudformation', json); + const responseBody = JSON.stringify(json); + const parsedUrl = url.parse(event.ResponseURL); + const req = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { 'content-type': '', 'content-length': responseBody.length }, + }; + await exports.external.sendHttpRequest(req, responseBody); +} +async function defaultSendHttpRequest(options, responseBody) { + return new Promise((resolve, reject) => { + try { + const request = https.request(options, _ => resolve()); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); +} +function defaultLog(fmt, ...params) { + // eslint-disable-next-line no-console + console.log(fmt, ...params); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBRTNCLGlCQUFpQjtBQUN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KTtcbn1cblxuZnVuY3Rpb24gZGVmYXVsdExvZyhmbXQ6IHN0cmluZywgLi4ucGFyYW1zOiBhbnlbXSkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tY29uc29sZVxuICBjb25zb2xlLmxvZyhmbXQsIC4uLnBhcmFtcyk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/index.d.ts b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.d.ts similarity index 100% rename from packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/index.d.ts rename to packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.d.ts diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/index.js b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.js similarity index 100% rename from packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/index.js rename to packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.js diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/index.ts b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.ts similarity index 100% rename from packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/index.ts rename to packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.ts diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/__entrypoint__.js b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/__entrypoint__.js deleted file mode 100644 index 3475719002c73..0000000000000 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/__entrypoint__.js +++ /dev/null @@ -1,119 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = exports.external = void 0; -const https = require("https"); -const url = require("url"); -// for unit tests -exports.external = { - sendHttpRequest: defaultSendHttpRequest, - log: defaultLog, - includeStackTraces: true, - userHandlerIndex: './index', -}; -const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; -const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; -async function handler(event, context) { - exports.external.log(JSON.stringify(event, undefined, 2)); - // ignore DELETE event when the physical resource ID is the marker that - // indicates that this DELETE is a subsequent DELETE to a failed CREATE - // operation. - if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { - exports.external.log('ignoring DELETE event caused by a failed CREATE event'); - await submitResponse('SUCCESS', event); - return; - } - try { - // invoke the user handler. this is intentionally inside the try-catch to - // ensure that if there is an error it's reported as a failure to - // cloudformation (otherwise cfn waits). - // eslint-disable-next-line @typescript-eslint/no-require-imports - const userHandler = require(exports.external.userHandlerIndex).handler; - const result = await userHandler(event, context); - // validate user response and create the combined event - const responseEvent = renderResponse(event, result); - // submit to cfn as success - await submitResponse('SUCCESS', responseEvent); - } - catch (e) { - const resp = { - ...event, - Reason: exports.external.includeStackTraces ? e.stack : e.message, - }; - if (!resp.PhysicalResourceId) { - // special case: if CREATE fails, which usually implies, we usually don't - // have a physical resource id. in this case, the subsequent DELETE - // operation does not have any meaning, and will likely fail as well. to - // address this, we use a marker so the provider framework can simply - // ignore the subsequent DELETE. - if (event.RequestType === 'Create') { - exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); - resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; - } - else { - // otherwise, if PhysicalResourceId is not specified, something is - // terribly wrong because all other events should have an ID. - exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); - } - } - // this is an actual error, fail the activity altogether and exist. - await submitResponse('FAILED', resp); - } -} -exports.handler = handler; -function renderResponse(cfnRequest, handlerResponse = {}) { - var _a, _b; - // if physical ID is not returned, we have some defaults for you based - // on the request type. - const physicalResourceId = (_b = (_a = handlerResponse.PhysicalResourceId) !== null && _a !== void 0 ? _a : cfnRequest.PhysicalResourceId) !== null && _b !== void 0 ? _b : cfnRequest.RequestId; - // if we are in DELETE and physical ID was changed, it's an error. - if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { - throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); - } - // merge request event and result event (result prevails). - return { - ...cfnRequest, - ...handlerResponse, - PhysicalResourceId: physicalResourceId, - }; -} -async function submitResponse(status, event) { - var _a; - const json = { - Status: status, - Reason: (_a = event.Reason) !== null && _a !== void 0 ? _a : status, - StackId: event.StackId, - RequestId: event.RequestId, - PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, - LogicalResourceId: event.LogicalResourceId, - NoEcho: event.NoEcho, - Data: event.Data, - }; - exports.external.log('submit response to cloudformation', json); - const responseBody = JSON.stringify(json); - const parsedUrl = url.parse(event.ResponseURL); - const req = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { 'content-type': '', 'content-length': responseBody.length }, - }; - await exports.external.sendHttpRequest(req, responseBody); -} -async function defaultSendHttpRequest(options, responseBody) { - return new Promise((resolve, reject) => { - try { - const request = https.request(options, _ => resolve()); - request.on('error', reject); - request.write(responseBody); - request.end(); - } - catch (e) { - reject(e); - } - }); -} -function defaultLog(fmt, ...params) { - // eslint-disable-next-line no-console - console.log(fmt, ...params); -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBRTNCLGlCQUFpQjtBQUNKLFFBQUEsUUFBUSxHQUFHO0lBQ3RCLGVBQWUsRUFBRSxzQkFBc0I7SUFDdkMsR0FBRyxFQUFFLFVBQVU7SUFDZixrQkFBa0IsRUFBRSxJQUFJO0lBQ3hCLGdCQUFnQixFQUFFLFNBQVM7Q0FDNUIsQ0FBQztBQUVGLE1BQU0sZ0NBQWdDLEdBQUcsd0RBQXdELENBQUM7QUFDbEcsTUFBTSwwQkFBMEIsR0FBRyw4REFBOEQsQ0FBQztBQVczRixLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtELEVBQUUsT0FBMEI7SUFDMUcsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxLQUFLLEVBQUUsU0FB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G5hc3luYyBmdW5jdGlvbiBkZWZhdWx0U2VuZEh0dHBSZXF1ZXN0KG9wdGlvbnM6IGh0dHBzLlJlcXVlc3RPcHRpb25zLCByZXNwb25zZUJvZHk6IHN0cmluZyk6IFByb21pc2U8dm9pZD4ge1xuICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgIHRyeSB7XG4gICAgICBjb25zdCByZXF1ZXN0ID0gaHR0cHMucmVxdWVzdChvcHRpb25zLCBfID0+IHJlc29sdmUoKSk7XG4gICAgICByZXF1ZXN0Lm9uKCdlcnJvcicsIHJlamVjdCk7XG4gICAgICByZXF1ZXN0LndyaXRlKHJlc3BvbnNlQm9keSk7XG4gICAgICByZXF1ZXN0LmVuZCgpO1xuICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgIHJlamVjdChlKTtcbiAgICB9XG4gIH0pO1xufVxuXG5mdW5jdGlvbiBkZWZhdWx0TG9nKGZtdDogc3RyaW5nLCAuLi5wYXJhbXM6IGFueVtdKSB7XG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1jb25zb2xlXG4gIGNvbnNvbGUubG9nKGZtdCwgLi4ucGFyYW1zKTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3.bundle/index.js b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3.bundle/index.js new file mode 100644 index 0000000000000..394eb62dcc75e --- /dev/null +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3.bundle/index.js @@ -0,0 +1,620 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __defProps = Object.defineProperties; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; +}; +var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/assertions/providers/lambda-handler/index.ts +var lambda_handler_exports = {}; +__export(lambda_handler_exports, { + handler: () => handler +}); +module.exports = __toCommonJS(lambda_handler_exports); + +// ../assertions/lib/matcher.ts +var Matcher = class { + static isMatcher(x) { + return x && x instanceof Matcher; + } +}; +var MatchResult = class { + constructor(target) { + this.failures = []; + this.captures = /* @__PURE__ */ new Map(); + this.finalized = false; + this.target = target; + } + push(matcher, path, message) { + return this.recordFailure({ matcher, path, message }); + } + recordFailure(failure) { + this.failures.push(failure); + return this; + } + hasFailed() { + return this.failures.length !== 0; + } + get failCount() { + return this.failures.length; + } + compose(id, inner) { + const innerF = inner.failures; + this.failures.push(...innerF.map((f) => { + return { path: [id, ...f.path], message: f.message, matcher: f.matcher }; + })); + inner.captures.forEach((vals, capture) => { + vals.forEach((value) => this.recordCapture({ capture, value })); + }); + return this; + } + finished() { + if (this.finalized) { + return this; + } + if (this.failCount === 0) { + this.captures.forEach((vals, cap) => cap._captured.push(...vals)); + } + this.finalized = true; + return this; + } + toHumanStrings() { + return this.failures.map((r) => { + const loc = r.path.length === 0 ? "" : ` at ${r.path.join("")}`; + return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`; + }); + } + recordCapture(options) { + let values = this.captures.get(options.capture); + if (values === void 0) { + values = []; + } + values.push(options.value); + this.captures.set(options.capture, values); + } +}; + +// ../assertions/lib/private/matchers/absent.ts +var AbsentMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual !== void 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Received ${actual}, but key should be absent` + }); + } + return result; + } +}; + +// ../assertions/lib/private/type.ts +function getType(obj) { + return Array.isArray(obj) ? "array" : typeof obj; +} + +// ../assertions/lib/match.ts +var Match = class { + static absent() { + return new AbsentMatch("absent"); + } + static arrayWith(pattern) { + return new ArrayMatch("arrayWith", pattern); + } + static arrayEquals(pattern) { + return new ArrayMatch("arrayEquals", pattern, { subsequence: false }); + } + static exact(pattern) { + return new LiteralMatch("exact", pattern, { partialObjects: false }); + } + static objectLike(pattern) { + return new ObjectMatch("objectLike", pattern); + } + static objectEquals(pattern) { + return new ObjectMatch("objectEquals", pattern, { partial: false }); + } + static not(pattern) { + return new NotMatch("not", pattern); + } + static serializedJson(pattern) { + return new SerializedJson("serializedJson", pattern); + } + static anyValue() { + return new AnyMatch("anyValue"); + } + static stringLikeRegexp(pattern) { + return new StringLikeRegexpMatch("stringLikeRegexp", pattern); + } +}; +var LiteralMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partialObjects = options.partialObjects ?? false; + if (Matcher.isMatcher(this.pattern)) { + throw new Error("LiteralMatch cannot directly contain another matcher. Remove the top-level matcher or nest it more deeply."); + } + } + test(actual) { + if (Array.isArray(this.pattern)) { + return new ArrayMatch(this.name, this.pattern, { subsequence: false, partialObjects: this.partialObjects }).test(actual); + } + if (typeof this.pattern === "object") { + return new ObjectMatch(this.name, this.pattern, { partial: this.partialObjects }).test(actual); + } + const result = new MatchResult(actual); + if (typeof this.pattern !== typeof actual) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected type ${typeof this.pattern} but received ${getType(actual)}` + }); + return result; + } + if (actual !== this.pattern) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected ${this.pattern} but received ${actual}` + }); + } + return result; + } +}; +var ArrayMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.subsequence = options.subsequence ?? true; + this.partialObjects = options.partialObjects ?? false; + } + test(actual) { + if (!Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type array but received ${getType(actual)}` + }); + } + if (!this.subsequence && this.pattern.length !== actual.length) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected array of length ${this.pattern.length} but received ${actual.length}` + }); + } + let patternIdx = 0; + let actualIdx = 0; + const result = new MatchResult(actual); + while (patternIdx < this.pattern.length && actualIdx < actual.length) { + const patternElement = this.pattern[patternIdx]; + const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); + const matcherName = matcher.name; + if (this.subsequence && (matcherName == "absent" || matcherName == "anyValue")) { + throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`); + } + const innerResult = matcher.test(actual[actualIdx]); + if (!this.subsequence || !innerResult.hasFailed()) { + result.compose(`[${actualIdx}]`, innerResult); + patternIdx++; + actualIdx++; + } else { + actualIdx++; + } + } + for (; patternIdx < this.pattern.length; patternIdx++) { + const pattern = this.pattern[patternIdx]; + const element = Matcher.isMatcher(pattern) || typeof pattern === "object" ? " " : ` [${pattern}] `; + result.recordFailure({ + matcher: this, + path: [], + message: `Missing element${element}at pattern index ${patternIdx}` + }); + } + return result; + } +}; +var ObjectMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partial = options.partial ?? true; + } + test(actual) { + if (typeof actual !== "object" || Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type object but received ${getType(actual)}` + }); + } + const result = new MatchResult(actual); + if (!this.partial) { + for (const a of Object.keys(actual)) { + if (!(a in this.pattern)) { + result.recordFailure({ + matcher: this, + path: [`/${a}`], + message: "Unexpected key" + }); + } + } + } + for (const [patternKey, patternVal] of Object.entries(this.pattern)) { + if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) { + result.recordFailure({ + matcher: this, + path: [`/${patternKey}`], + message: `Missing key '${patternKey}' among {${Object.keys(actual).join(",")}}` + }); + continue; + } + const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial }); + const inner = matcher.test(actual[patternKey]); + result.compose(`/${patternKey}`, inner); + } + return result; + } +}; +var SerializedJson = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + if (getType(actual) !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected JSON as a string but found ${getType(actual)}` + }); + return result; + } + let parsed; + try { + parsed = JSON.parse(actual); + } catch (err) { + if (err instanceof SyntaxError) { + result.recordFailure({ + matcher: this, + path: [], + message: `Invalid JSON string: ${actual}` + }); + return result; + } else { + throw err; + } + } + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(parsed); + result.compose(`(${this.name})`, innerResult); + return result; + } +}; +var NotMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(actual); + const result = new MatchResult(actual); + if (innerResult.failCount === 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Found unexpected match: ${JSON.stringify(actual, void 0, 2)}` + }); + } + return result; + } +}; +var AnyMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual == null) { + result.recordFailure({ + matcher: this, + path: [], + message: "Expected a value but found none" + }); + } + return result; + } +}; +var StringLikeRegexpMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + const regex = new RegExp(this.pattern, "gm"); + if (typeof actual !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected a string, but got '${typeof actual}'` + }); + } + if (!regex.test(actual)) { + result.recordFailure({ + matcher: this, + path: [], + message: `String '${actual}' did not match pattern '${this.pattern}'` + }); + } + return result; + } +}; + +// lib/assertions/providers/lambda-handler/base.ts +var https = __toESM(require("https")); +var url = __toESM(require("url")); +var CustomResourceHandler = class { + constructor(event, context) { + this.event = event; + this.context = context; + this.timedOut = false; + this.timeout = setTimeout(async () => { + await this.respond({ + status: "FAILED", + reason: "Lambda Function Timeout", + data: this.context.logStreamName + }); + this.timedOut = true; + }, context.getRemainingTimeInMillis() - 1200); + this.event = event; + this.physicalResourceId = extractPhysicalResourceId(event); + } + async handle() { + try { + console.log(`Event: ${JSON.stringify(__spreadProps(__spreadValues({}, this.event), { ResponseURL: "..." }))}`); + const response = await this.processEvent(this.event.ResourceProperties); + console.log(`Event output : ${JSON.stringify(response)}`); + await this.respond({ + status: "SUCCESS", + reason: "OK", + data: response + }); + } catch (e) { + console.log(e); + await this.respond({ + status: "FAILED", + reason: e.message ?? "Internal Error" + }); + } finally { + clearTimeout(this.timeout); + } + } + respond(response) { + if (this.timedOut) { + return; + } + const cfResponse = { + Status: response.status, + Reason: response.reason, + PhysicalResourceId: this.physicalResourceId, + StackId: this.event.StackId, + RequestId: this.event.RequestId, + LogicalResourceId: this.event.LogicalResourceId, + NoEcho: false, + Data: response.data + }; + const responseBody = JSON.stringify(cfResponse); + console.log("Responding to CloudFormation", responseBody); + const parsedUrl = url.parse(this.event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: "PUT", + headers: { "content-type": "", "content-length": responseBody.length } + }; + return new Promise((resolve, reject) => { + try { + const request2 = https.request(requestOptions, resolve); + request2.on("error", reject); + request2.write(responseBody); + request2.end(); + } catch (e) { + reject(e); + } + }); + } +}; +function extractPhysicalResourceId(event) { + switch (event.RequestType) { + case "Create": + return event.LogicalResourceId; + case "Update": + case "Delete": + return event.PhysicalResourceId; + } +} + +// lib/assertions/providers/lambda-handler/assertion.ts +var AssertionHandler = class extends CustomResourceHandler { + async processEvent(request2) { + let actual = decodeCall(request2.actual); + const expected = decodeCall(request2.expected); + let result; + const matcher = new MatchCreator(expected).getMatcher(); + console.log(`Testing equality between ${JSON.stringify(request2.actual)} and ${JSON.stringify(request2.expected)}`); + const matchResult = matcher.test(actual); + matchResult.finished(); + if (matchResult.hasFailed()) { + result = { + data: JSON.stringify({ + status: "fail", + message: [ + ...matchResult.toHumanStrings(), + JSON.stringify(matchResult.target, void 0, 2) + ].join("\n") + }) + }; + if (request2.failDeployment) { + throw new Error(result.data); + } + } else { + result = { + data: JSON.stringify({ + status: "pass" + }) + }; + } + return result; + } +}; +var MatchCreator = class { + constructor(obj) { + this.parsedObj = { + matcher: obj + }; + } + getMatcher() { + try { + const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) { + const nested = Object.keys(v)[0]; + switch (nested) { + case "$ArrayWith": + return Match.arrayWith(v[nested]); + case "$ObjectLike": + return Match.objectLike(v[nested]); + case "$StringLike": + return Match.stringLikeRegexp(v[nested]); + default: + return v; + } + }); + if (Matcher.isMatcher(final.matcher)) { + return final.matcher; + } + return Match.exact(final.matcher); + } catch { + return Match.exact(this.parsedObj.matcher); + } + } +}; +function decodeCall(call) { + if (!call) { + return void 0; + } + try { + const parsed = JSON.parse(call); + return parsed; + } catch (e) { + return call; + } +} + +// lib/assertions/providers/lambda-handler/utils.ts +function decode(object) { + return JSON.parse(JSON.stringify(object), (_k, v) => { + switch (v) { + case "TRUE:BOOLEAN": + return true; + case "FALSE:BOOLEAN": + return false; + default: + return v; + } + }); +} + +// lib/assertions/providers/lambda-handler/sdk.ts +function flatten(object) { + return Object.assign({}, ...function _flatten(child, path = []) { + return [].concat(...Object.keys(child).map((key) => { + const childKey = Buffer.isBuffer(child[key]) ? child[key].toString("utf8") : child[key]; + return typeof childKey === "object" && childKey !== null ? _flatten(childKey, path.concat([key])) : { [path.concat([key]).join(".")]: childKey }; + })); + }(object)); +} +var AwsApiCallHandler = class extends CustomResourceHandler { + async processEvent(request2) { + const AWS = require("aws-sdk"); + console.log(`AWS SDK VERSION: ${AWS.VERSION}`); + const service = new AWS[request2.service](); + const response = await service[request2.api](request2.parameters && decode(request2.parameters)).promise(); + console.log(`SDK response received ${JSON.stringify(response)}`); + delete response.ResponseMetadata; + const respond = { + apiCallResponse: response + }; + const flatData = __spreadValues({}, flatten(respond)); + return request2.flattenResponse === "true" ? flatData : respond; + } +}; + +// lib/assertions/providers/lambda-handler/types.ts +var ASSERT_RESOURCE_TYPE = "Custom::DeployAssert@AssertEquals"; +var SDK_RESOURCE_TYPE_PREFIX = "Custom::DeployAssert@SdkCall"; + +// lib/assertions/providers/lambda-handler/index.ts +async function handler(event, context) { + const provider = createResourceHandler(event, context); + await provider.handle(); +} +function createResourceHandler(event, context) { + if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) { + return new AwsApiCallHandler(event, context); + } + switch (event.ResourceType) { + case ASSERT_RESOURCE_TYPE: + return new AssertionHandler(event, context); + default: + throw new Error(`Unsupported resource type "${event.ResourceType}`); + } +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + handler +}); diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/integ.json b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/integ.json index 231259b9b687f..4a4cabee977fd 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/integ.json @@ -1,14 +1,12 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-ec2/test/integ.vpc-flow-logs": { + "FlowLogs/DefaultTest": { "stacks": [ - "*" + "FlowLogsTestStack", + "FlowLogsFeatureFlag" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "FlowLogsDefaultTestDeployAssert6AFD1854" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/manifest.json index 0608c59f18dad..d84f530a50fcb 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -7,6 +7,233 @@ "file": "tree.json" } }, + "FlowLogsFeatureFlag": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "FlowLogsFeatureFlag.template.json", + "validateOnSynth": false + }, + "metadata": { + "/FlowLogsFeatureFlag/VPC/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCB9E5F0B4" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1SubnetB4246D30" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableFEE4B781" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1DefaultRoute91CEF279" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1EIP6AD938E8" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1NATGatewayE0556630" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2Subnet74179F39" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTable6F1A15F1" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTableAssociation5A808732" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2DefaultRouteB7481BBA" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2EIP4947BC00" + } + ], + "/FlowLogsFeatureFlag/VPC/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2NATGateway3C070193" + } + ], + "/FlowLogsFeatureFlag/VPC/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1Subnet8BCA10E0" + } + ], + "/FlowLogsFeatureFlag/VPC/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableBE8A6027" + } + ], + "/FlowLogsFeatureFlag/VPC/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" + } + ], + "/FlowLogsFeatureFlag/VPC/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" + } + ], + "/FlowLogsFeatureFlag/VPC/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ], + "/FlowLogsFeatureFlag/VPC/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTable0A19E10E" + } + ], + "/FlowLogsFeatureFlag/VPC/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" + } + ], + "/FlowLogsFeatureFlag/VPC/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" + } + ], + "/FlowLogsFeatureFlag/VPC/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCIGWB7E252D3" + } + ], + "/FlowLogsFeatureFlag/VPC/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCVPCGW99B986DC" + } + ], + "/FlowLogsFeatureFlag/VPC/FlowLogsS3/Bucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCFlowLogsS3BucketFB7DC2BE" + } + ], + "/FlowLogsFeatureFlag/VPC/FlowLogsS3/Bucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCFlowLogsS3BucketPolicyB2C2A045" + } + ], + "/FlowLogsFeatureFlag/VPC/FlowLogsS3/FlowLog": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCFlowLogsS3FlowLogB5256CFF" + } + ], + "/FlowLogsFeatureFlag/VPC/FlowLogsS3WithDestinationOptions/Bucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456" + } + ], + "/FlowLogsFeatureFlag/VPC/FlowLogsS3WithDestinationOptions/Bucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCFlowLogsS3WithDestinationOptionsBucketPolicy35257B71" + } + ], + "/FlowLogsFeatureFlag/VPC/FlowLogsS3WithDestinationOptions/FlowLog": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCFlowLogsS3WithDestinationOptionsFlowLog030C15B2" + } + ], + "/FlowLogsFeatureFlag/Exports/Output{\"Fn::GetAtt\":[\"VPCFlowLogsS3BucketFB7DC2BE\",\"Arn\"]}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputFnGetAttVPCFlowLogsS3BucketFB7DC2BEArn0818560B" + } + ], + "/FlowLogsFeatureFlag/Exports/Output{\"Ref\":\"VPCFlowLogsS3BucketFB7DC2BE\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefVPCFlowLogsS3BucketFB7DC2BE6C269563" + } + ], + "/FlowLogsFeatureFlag/FlowLogsInstance/InstanceSecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FlowLogsInstanceInstanceSecurityGroupF61782E0" + } + ], + "/FlowLogsFeatureFlag/FlowLogsInstance/InstanceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FlowLogsInstanceInstanceRole1E8242D9" + } + ], + "/FlowLogsFeatureFlag/FlowLogsInstance/InstanceProfile": [ + { + "type": "aws:cdk:logicalId", + "data": "FlowLogsInstanceInstanceProfile5CDC5493" + } + ], + "/FlowLogsFeatureFlag/FlowLogsInstance/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FlowLogsInstanceB14CA11F" + } + ], + "/FlowLogsFeatureFlag/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": [ + { + "type": "aws:cdk:logicalId", + "data": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" + } + ] + }, + "displayName": "FlowLogsFeatureFlag" + }, "FlowLogsTestStack": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", @@ -19,13 +246,13 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824", - "id": "be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824", + "path": "asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26", + "id": "60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26", "packaging": "zip", - "sourceHash": "be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824", - "s3BucketParameter": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232", - "s3KeyParameter": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE", - "artifactHashParameter": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2" + "sourceHash": "60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26", + "s3BucketParameter": "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26S3Bucket180EC6B2", + "s3KeyParameter": "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26S3VersionKeyF1ADAF48", + "artifactHashParameter": "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26ArtifactHashF709D3CB" } } ], @@ -173,6 +400,12 @@ "data": "VPCFlowLogsS3BucketFB7DC2BE" } ], + "/FlowLogsTestStack/VPC/FlowLogsS3/Bucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCFlowLogsS3BucketPolicyB2C2A045" + } + ], "/FlowLogsTestStack/VPC/FlowLogsS3/FlowLog": [ { "type": "aws:cdk:logicalId", @@ -239,26 +472,102 @@ "data": "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F" } ], - "/FlowLogsTestStack/AssetParameters/be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/S3Bucket": [ + "/FlowLogsTestStack/AssetParameters/60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3Bucket09A62232" + "data": "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26S3Bucket180EC6B2" } ], - "/FlowLogsTestStack/AssetParameters/be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/S3VersionKey": [ + "/FlowLogsTestStack/AssetParameters/60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824S3VersionKeyA28118BE" + "data": "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26S3VersionKeyF1ADAF48" } ], - "/FlowLogsTestStack/AssetParameters/be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/ArtifactHash": [ + "/FlowLogsTestStack/AssetParameters/60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersbe270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824ArtifactHash76F8FCF2" + "data": "AssetParameters60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26ArtifactHashF709D3CB" } ] }, "displayName": "FlowLogsTestStack" + }, + "FlowLogsDefaultTestDeployAssert6AFD1854": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "FlowLogsDefaultTestDeployAssert6AFD1854.template.json", + "validateOnSynth": false + }, + "dependencies": [ + "FlowLogsFeatureFlag" + ], + "metadata": { + "/FlowLogs/DefaultTest/DeployAssert": [ + { + "type": "aws:cdk:asset", + "data": { + "path": "asset.ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3.bundle", + "id": "ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3", + "packaging": "zip", + "sourceHash": "ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3", + "s3BucketParameter": "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3S3Bucket5F1832C4", + "s3KeyParameter": "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3S3VersionKeyA04E23E6", + "artifactHashParameter": "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3ArtifactHash000AF521" + } + } + ], + "/FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallS3listObjectsV2" + } + ], + "/FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallS3listObjectsV2AssertEqualsS3listObjectsV26A93E391" + } + ], + "/FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsAssertEqualsS3listObjectsV2" + } + ], + "/FlowLogs/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73" + } + ], + "/FlowLogs/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" + } + ], + "/FlowLogs/DefaultTest/DeployAssert/AssetParameters/ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3/S3Bucket": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3S3Bucket5F1832C4" + } + ], + "/FlowLogs/DefaultTest/DeployAssert/AssetParameters/ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3/S3VersionKey": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3S3VersionKeyA04E23E6" + } + ], + "/FlowLogs/DefaultTest/DeployAssert/AssetParameters/ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3/ArtifactHash": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParametersec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3ArtifactHash000AF521" + } + ] + }, + "displayName": "FlowLogs/DefaultTest/DeployAssert" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/tree.json b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/tree.json index 1a4430fb17622..8d666ce2d9680 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/tree.json @@ -9,7 +9,1276 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" + } + }, + "FlowLogsFeatureFlag": { + "id": "FlowLogsFeatureFlag", + "path": "FlowLogsFeatureFlag", + "children": { + "VPC": { + "id": "VPC", + "path": "FlowLogsFeatureFlag/VPC", + "children": { + "Resource": { + "id": "Resource", + "path": "FlowLogsFeatureFlag/VPC/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "FlowLogsFeatureFlag/VPC/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PrivateSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PrivateSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PrivateSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC/PrivateSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "FlowLogsFeatureFlag/VPC/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "FlowLogsFeatureFlag/VPC/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "internetGatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + }, + "FlowLogsS3": { + "id": "FlowLogsS3", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3", + "children": { + "Bucket": { + "id": "Bucket", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3/Bucket", + "children": { + "Resource": { + "id": "Resource", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3/Bucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + }, + "Policy": { + "id": "Policy", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3/Bucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3/Bucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "VPCFlowLogsS3BucketFB7DC2BE" + }, + "policyDocument": { + "Statement": [ + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control", + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "VPCFlowLogsS3BucketFB7DC2BE", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + }, + { + "Action": [ + "s3:GetBucketAcl", + "s3:ListBucket" + ], + "Condition": { + "StringEquals": { + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "VPCFlowLogsS3BucketFB7DC2BE", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "0.0.0" + } + }, + "FlowLog": { + "id": "FlowLog", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3/FlowLog", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::FlowLog", + "aws:cdk:cloudformation:props": { + "resourceId": { + "Ref": "VPCB9E5F0B4" + }, + "resourceType": "VPC", + "trafficType": "ALL", + "logDestination": { + "Fn::GetAtt": [ + "VPCFlowLogsS3BucketFB7DC2BE", + "Arn" + ] + }, + "logDestinationType": "s3", + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnFlowLog", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.FlowLog", + "version": "0.0.0" + } + }, + "FlowLogsS3WithDestinationOptions": { + "id": "FlowLogsS3WithDestinationOptions", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3WithDestinationOptions", + "children": { + "Bucket": { + "id": "Bucket", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3WithDestinationOptions/Bucket", + "children": { + "Resource": { + "id": "Resource", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3WithDestinationOptions/Bucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + }, + "Policy": { + "id": "Policy", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3WithDestinationOptions/Bucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3WithDestinationOptions/Bucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456" + }, + "policyDocument": { + "Statement": [ + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control", + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456", + "Arn" + ] + }, + "/AWSLogs/aws-account-id=", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + }, + { + "Action": [ + "s3:GetBucketAcl", + "s3:ListBucket" + ], + "Condition": { + "StringEquals": { + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "0.0.0" + } + }, + "FlowLog": { + "id": "FlowLog", + "path": "FlowLogsFeatureFlag/VPC/FlowLogsS3WithDestinationOptions/FlowLog", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::FlowLog", + "aws:cdk:cloudformation:props": { + "resourceId": { + "Ref": "VPCB9E5F0B4" + }, + "resourceType": "VPC", + "trafficType": "ALL", + "destinationOptions": { + "fileFormat": "plain-text", + "perHourPartition": false, + "hiveCompatiblePartitions": true + }, + "logDestination": { + "Fn::GetAtt": [ + "VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456", + "Arn" + ] + }, + "logDestinationType": "s3", + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnFlowLog", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.FlowLog", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Vpc", + "version": "0.0.0" + } + }, + "Exports": { + "id": "Exports", + "path": "FlowLogsFeatureFlag/Exports", + "children": { + "Output{\"Fn::GetAtt\":[\"VPCFlowLogsS3BucketFB7DC2BE\",\"Arn\"]}": { + "id": "Output{\"Fn::GetAtt\":[\"VPCFlowLogsS3BucketFB7DC2BE\",\"Arn\"]}", + "path": "FlowLogsFeatureFlag/Exports/Output{\"Fn::GetAtt\":[\"VPCFlowLogsS3BucketFB7DC2BE\",\"Arn\"]}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"VPCFlowLogsS3BucketFB7DC2BE\"}": { + "id": "Output{\"Ref\":\"VPCFlowLogsS3BucketFB7DC2BE\"}", + "path": "FlowLogsFeatureFlag/Exports/Output{\"Ref\":\"VPCFlowLogsS3BucketFB7DC2BE\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "FlowLogsInstance": { + "id": "FlowLogsInstance", + "path": "FlowLogsFeatureFlag/FlowLogsInstance", + "children": { + "InstanceSecurityGroup": { + "id": "InstanceSecurityGroup", + "path": "FlowLogsFeatureFlag/FlowLogsInstance/InstanceSecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "FlowLogsFeatureFlag/FlowLogsInstance/InstanceSecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "FlowLogsFeatureFlag/FlowLogsInstance/InstanceSecurityGroup", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/FlowLogsInstance" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "InstanceRole": { + "id": "InstanceRole", + "path": "FlowLogsFeatureFlag/FlowLogsInstance/InstanceRole", + "children": { + "Resource": { + "id": "Resource", + "path": "FlowLogsFeatureFlag/FlowLogsInstance/InstanceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": { + "Fn::Join": [ + "", + [ + "ec2.", + { + "Ref": "AWS::URLSuffix" + } + ] + ] + } + } + } + ], + "Version": "2012-10-17" + }, + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/FlowLogsInstance" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.Role", + "version": "0.0.0" + } + }, + "InstanceProfile": { + "id": "InstanceProfile", + "path": "FlowLogsFeatureFlag/FlowLogsInstance/InstanceProfile", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::InstanceProfile", + "aws:cdk:cloudformation:props": { + "roles": [ + { + "Ref": "FlowLogsInstanceInstanceRole1E8242D9" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnInstanceProfile", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "FlowLogsFeatureFlag/FlowLogsInstance/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Instance", + "aws:cdk:cloudformation:props": { + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "iamInstanceProfile": { + "Ref": "FlowLogsInstanceInstanceProfile5CDC5493" + }, + "imageId": { + "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amihvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter" + }, + "instanceType": "t3.small", + "securityGroupIds": [ + { + "Fn::GetAtt": [ + "FlowLogsInstanceInstanceSecurityGroupF61782E0", + "GroupId" + ] + } + ], + "subnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + }, + "tags": [ + { + "key": "Name", + "value": "FlowLogsFeatureFlag/FlowLogsInstance" + } + ], + "userData": { + "Fn::Base64": "#!/bin/bash" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnInstance", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Instance", + "version": "0.0.0" + } + }, + "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { + "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", + "path": "FlowLogsFeatureFlag/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118": { + "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", + "path": "FlowLogsFeatureFlag/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } }, "FlowLogsTestStack": { @@ -679,6 +1948,137 @@ "fqn": "@aws-cdk/aws-s3.CfnBucket", "version": "0.0.0" } + }, + "Policy": { + "id": "Policy", + "path": "FlowLogsTestStack/VPC/FlowLogsS3/Bucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "FlowLogsTestStack/VPC/FlowLogsS3/Bucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "VPCFlowLogsS3BucketFB7DC2BE" + }, + "policyDocument": { + "Statement": [ + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control", + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "VPCFlowLogsS3BucketFB7DC2BE", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + }, + { + "Action": [ + "s3:GetBucketAcl", + "s3:ListBucket" + ], + "Condition": { + "StringEquals": { + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "VPCFlowLogsS3BucketFB7DC2BE", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketPolicy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1045,24 +2445,44 @@ "Principal": { "Service": "delivery.logs.amazonaws.com" }, - "Resource": { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Bucket83908E77", - "Arn" - ] - }, - "/AWSLogs/", - { - "Ref": "AWS::AccountId" - }, - "/*" + "Resource": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "Bucket83908E77", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] ] - ] - } + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "Bucket83908E77", + "Arn" + ] + }, + "/prefix/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + ] }, { "Action": [ @@ -1187,13 +2607,13 @@ "id": "AssetParameters", "path": "FlowLogsTestStack/AssetParameters", "children": { - "be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824": { - "id": "be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824", - "path": "FlowLogsTestStack/AssetParameters/be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824", + "60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26": { + "id": "60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26", + "path": "FlowLogsTestStack/AssetParameters/60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "FlowLogsTestStack/AssetParameters/be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/S3Bucket", + "path": "FlowLogsTestStack/AssetParameters/60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -1201,7 +2621,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "FlowLogsTestStack/AssetParameters/be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/S3VersionKey", + "path": "FlowLogsTestStack/AssetParameters/60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -1209,7 +2629,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "FlowLogsTestStack/AssetParameters/be270bbdebe0851c887569796e3997437cca54ce86893ed94788500448e92824/ArtifactHash", + "path": "FlowLogsTestStack/AssetParameters/60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -1218,13 +2638,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } } }, @@ -1232,6 +2652,222 @@ "fqn": "@aws-cdk/core.Stack", "version": "0.0.0" } + }, + "FlowLogs": { + "id": "FlowLogs", + "path": "FlowLogs", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "FlowLogs/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "FlowLogs/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "FlowLogs/DefaultTest/DeployAssert", + "children": { + "AwsApiCallS3listObjectsV2": { + "id": "AwsApiCallS3listObjectsV2", + "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/Default", + "children": { + "Default": { + "id": "Default", + "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "AssertEqualsS3listObjectsV2": { + "id": "AssertEqualsS3listObjectsV2", + "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2", + "children": { + "AssertionProvider": { + "id": "AssertionProvider", + "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/AssertionProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/AssertionProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/Default", + "children": { + "Default": { + "id": "Default", + "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.EqualsAssertion", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AwsApiCall", + "version": "0.0.0" + } + }, + "SingletonFunction1488541a7b23466481b69b4408076b81": { + "id": "SingletonFunction1488541a7b23466481b69b4408076b81", + "path": "FlowLogs/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81", + "children": { + "Staging": { + "id": "Staging", + "path": "FlowLogs/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "FlowLogs/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "FlowLogs/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "AssetParameters": { + "id": "AssetParameters", + "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters", + "children": { + "ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3": { + "id": "ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3", + "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3", + "children": { + "S3Bucket": { + "id": "S3Bucket", + "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3/S3Bucket", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "S3VersionKey": { + "id": "S3VersionKey", + "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3/S3VersionKey", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "ArtifactHash": { + "id": "ArtifactHash", + "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/ec094b96e98289a8faed4f4280a8531224c0191f583bc684c21c91a65319e4a3/ArtifactHash", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTest", + "version": "0.0.0" + } } }, "constructInfo": { diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.test.ts b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.test.ts index 88e9cc8705f8e..ce27cd5f0eb30 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.test.ts @@ -1,4 +1,4 @@ -import { Template } from '@aws-cdk/assertions'; +import { Template, Match } from '@aws-cdk/assertions'; import * as iam from '@aws-cdk/aws-iam'; import * as logs from '@aws-cdk/aws-logs'; import * as s3 from '@aws-cdk/aws-s3'; @@ -67,6 +67,9 @@ describe('vpc flow logs', () => { ), }); + Template.fromStack(stack).hasResourceProperties('AWS::EC2::FlowLog', { + DestinationOptions: Match.absent(), + }); Template.fromStack(stack).resourceCountIs('AWS::Logs::LogGroup', 0); Template.fromStack(stack).resourceCountIs('AWS::IAM::Role', 0); Template.fromStack(stack).hasResourceProperties('AWS::S3::Bucket', { @@ -74,6 +77,284 @@ describe('vpc flow logs', () => { }); }); + + test('allows setting destination options', () => { + const stack = getTestStack(); + + new FlowLog(stack, 'FlowLogs', { + resourceType: FlowLogResourceType.fromNetworkInterfaceId('eni-123456'), + destination: FlowLogDestination.toS3(undefined, undefined, { + hiveCompatiblePartitions: true, + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::EC2::FlowLog', { + ResourceType: 'NetworkInterface', + TrafficType: 'ALL', + ResourceId: 'eni-123456', + DestinationOptions: { + hiveCompatiblePartitions: true, + fileFormat: 'plain-text', + perHourPartition: false, + }, + LogDestination: { + 'Fn::GetAtt': [ + 'FlowLogsBucket87F67F60', + 'Arn', + ], + }, + LogDestinationType: 's3', + }); + }); + + describe('s3 bucket policy - @aws-cdk/aws-s3:createDefaultLoggingPolicy feature flag', () => { + test('creates default S3 bucket policy with options', () => { + const stack = new Stack(); + stack.node.setContext('@aws-cdk/aws-s3:createDefaultLoggingPolicy', true); + new FlowLog(stack, 'FlowLogs', { + resourceType: FlowLogResourceType.fromNetworkInterfaceId('eni-123456'), + destination: FlowLogDestination.toS3(undefined, 'custom-prefix', { + hiveCompatiblePartitions: true, + }), + }); + + const template = Template.fromStack(stack); + template.hasResourceProperties('AWS::S3::BucketPolicy', { + PolicyDocument: { + Statement: [ + { + Action: 's3:PutObject', + Effect: 'Allow', + Condition: { + StringEquals: { + 's3:x-amz-acl': 'bucket-owner-full-control', + 'aws:SourceAccount': { + Ref: 'AWS::AccountId', + }, + }, + ArnLike: { + 'aws:SourceArn': { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':logs:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':*', + ], + ], + }, + }, + }, + Principal: { + Service: 'delivery.logs.amazonaws.com', + }, + Resource: { + 'Fn::Join': [ + '', + [ + { + 'Fn::GetAtt': [ + 'FlowLogsBucket87F67F60', + 'Arn', + ], + }, + '/custom-prefix/AWSLogs/aws-account-id=', + { + Ref: 'AWS::AccountId', + }, + '/*', + ], + ], + }, + }, + { + Action: [ + 's3:GetBucketAcl', + 's3:ListBucket', + ], + Condition: { + StringEquals: { + 'aws:SourceAccount': { + Ref: 'AWS::AccountId', + }, + }, + ArnLike: { + 'aws:SourceArn': { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':logs:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':*', + ], + ], + }, + }, + }, + Effect: 'Allow', + Principal: { + Service: 'delivery.logs.amazonaws.com', + }, + Resource: { + 'Fn::GetAtt': [ + 'FlowLogsBucket87F67F60', + 'Arn', + ], + }, + }, + ], + }, + }); + }); + + test('creates default S3 bucket policy', () => { + const stack = new Stack(); + stack.node.setContext('@aws-cdk/aws-s3:createDefaultLoggingPolicy', true); + new FlowLog(stack, 'FlowLogs', { + resourceType: FlowLogResourceType.fromNetworkInterfaceId('eni-123456'), + destination: FlowLogDestination.toS3(), + }); + + const template = Template.fromStack(stack); + template.hasResourceProperties('AWS::S3::BucketPolicy', { + PolicyDocument: { + Statement: [ + { + Action: 's3:PutObject', + Effect: 'Allow', + Condition: { + StringEquals: { + 's3:x-amz-acl': 'bucket-owner-full-control', + 'aws:SourceAccount': { + Ref: 'AWS::AccountId', + }, + }, + ArnLike: { + 'aws:SourceArn': { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':logs:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':*', + ], + ], + }, + }, + }, + Principal: { + Service: 'delivery.logs.amazonaws.com', + }, + Resource: { + 'Fn::Join': [ + '', + [ + { + 'Fn::GetAtt': [ + 'FlowLogsBucket87F67F60', + 'Arn', + ], + }, + '/AWSLogs/', + { + Ref: 'AWS::AccountId', + }, + '/*', + ], + ], + }, + }, + { + Action: [ + 's3:GetBucketAcl', + 's3:ListBucket', + ], + Condition: { + StringEquals: { + 'aws:SourceAccount': { + Ref: 'AWS::AccountId', + }, + }, + ArnLike: { + 'aws:SourceArn': { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':logs:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':*', + ], + ], + }, + }, + }, + Effect: 'Allow', + Principal: { + Service: 'delivery.logs.amazonaws.com', + }, + Resource: { + 'Fn::GetAtt': [ + 'FlowLogsBucket87F67F60', + 'Arn', + ], + }, + }, + ], + }, + }); + }); + + test('without future flag, does not create default bucket policy', () => { + const stack = new Stack(); + new FlowLog(stack, 'FlowLogs', { + resourceType: FlowLogResourceType.fromNetworkInterfaceId('eni-123456'), + destination: FlowLogDestination.toS3(), + }); + + Template.fromStack(stack).resourceCountIs('AWS::S3::BucketPolicy', 0); + }); + }); + test('with s3 as the destination, allows use of key prefix', () => { const stack = getTestStack(); @@ -161,6 +442,16 @@ describe('vpc flow logs', () => { }, }); }); + test('flowlog has defaultchild', () => { + const stack = new Stack(); + const vpc = new Vpc(stack, 'VPC'); + + const flowlog = new FlowLog(stack, 'FlowLog', { + resourceType: FlowLogResourceType.fromVpc(vpc), + }); + + expect(flowlog.node.defaultChild).toBeDefined(); + }); }); function getTestStack(): Stack { diff --git a/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts b/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts index 73b5ff45b6c3b..c48f7bef7b59a 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts +++ b/packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts @@ -89,7 +89,8 @@ export interface ApplicationLoadBalancedServiceBaseProps { * * @default - No certificate associated with the load balancer, if using * the HTTP protocol. For HTTPS, a DNS-validated certificate will be - * created for the load balancer's specified domain name. + * created for the load balancer's specified domain name if a domain name + * and domain zone are specified. */ readonly certificate?: ICertificate; @@ -105,8 +106,8 @@ export interface ApplicationLoadBalancedServiceBaseProps { /** * The protocol for connections from clients to the load balancer. * The load balancer port is determined from the protocol (port 80 for - * HTTP, port 443 for HTTPS). A domain name and zone must be also be - * specified if using HTTPS. + * HTTP, port 443 for HTTPS). If HTTPS, either a certificate or domain + * name and domain zone must also be specified. * * @default HTTP. If a certificate is specified, the protocol will be * set by default to HTTPS. diff --git a/packages/@aws-cdk/aws-ecs/README.md b/packages/@aws-cdk/aws-ecs/README.md index 71a1c4e91c133..7f6a0766253fe 100644 --- a/packages/@aws-cdk/aws-ecs/README.md +++ b/packages/@aws-cdk/aws-ecs/README.md @@ -167,6 +167,36 @@ const autoScalingGroup = new autoscaling.AutoScalingGroup(this, 'ASG', { }); ``` +To use `LaunchTemplate` with `AsgCapacityProvider`, make sure to specify the `userData` in the `LaunchTemplate`: + +```ts +const launchTemplate = new ec2.LaunchTemplate(this, 'ASG-LaunchTemplate', { + instanceType: new ec2.InstanceType('t3.medium'), + machineImage: ecs.EcsOptimizedImage.amazonLinux2(), + userData: ec2.UserData.forLinux(), +}); + +const autoScalingGroup = new autoscaling.AutoScalingGroup(this, 'ASG', { + vpc, + mixedInstancesPolicy: { + instancesDistribution: { + onDemandPercentageAboveBaseCapacity: 50, + }, + launchTemplate: launchTemplate, + }, +}); + +const cluster = new ecs.Cluster(this, 'Cluster', { vpc }); + +const capacityProvider = new ecs.AsgCapacityProvider(this, 'AsgCapacityProvider', { + autoScalingGroup, + machineImageType: ecs.MachineImageType.AMAZON_LINUX_2, +}); + +cluster.addAsgCapacityProvider(capacityProvider); +``` + + ### Bottlerocket [Bottlerocket](https://aws.amazon.com/bottlerocket/) is a Linux-based open source operating system that is diff --git a/packages/@aws-cdk/aws-eks/README.md b/packages/@aws-cdk/aws-eks/README.md index 050ea01cfa4d6..271b42e78b517 100644 --- a/packages/@aws-cdk/aws-eks/README.md +++ b/packages/@aws-cdk/aws-eks/README.md @@ -535,7 +535,7 @@ From the docs: > * It satisfies Kubernetes Service resources by provisioning Network Load Balancers. To deploy the controller on your EKS cluster, configure the `albController` property: - + ```ts new eks.Cluster(this, 'HelloEKS', { version: eks.KubernetesVersion.V1_21, @@ -1219,32 +1219,29 @@ To get started, add the following dependencies to your `package.json` file: ```json "dependencies": { - "cdk8s": "^1.0.0", - "cdk8s-plus-21": "^1.0.0-beta.38", - "constructs": "^3.3.69" + "cdk8s": "^2.0.0", + "cdk8s-plus-22": "^2.0.0-rc.30", + "constructs": "^10.0.0" } ``` -Note that here we are using `cdk8s-plus-21` as we are targeting Kubernetes version 1.21.0. If you operate a different kubernetes version, you should +Note that here we are using `cdk8s-plus-22` as we are targeting Kubernetes version 1.22.0. If you operate a different kubernetes version, you should use the corresponding `cdk8s-plus-XX` library. See [Select the appropriate cdk8s+ library](https://cdk8s.io/docs/latest/plus/#i-operate-kubernetes-version-1xx-which-cdk8s-library-should-i-be-using) for more details. -Similarly to how you would create a stack by extending `@aws-cdk/core.Stack`, we recommend you create a chart of your own that extends `cdk8s.Chart`, +Similarly to how you would create a stack by extending `aws-cdk-lib.Stack`, we recommend you create a chart of your own that extends `cdk8s.Chart`, and add your kubernetes resources to it. You can use `aws-cdk` construct attributes and properties inside your `cdk8s` construct freely. In this example we create a chart that accepts an `s3.Bucket` and passes its name to a kubernetes pod as an environment variable. -Notice that the chart must accept a `constructs.Construct` type as its scope, not an `@aws-cdk/core.Construct` as you would normally use. -For this reason, to avoid possible confusion, we will create the chart in a separate file: - `+ my-chart.ts` ```ts nofixture -import * as s3 from '@aws-cdk/aws-s3'; +import { aws_s3 as s3 } from 'aws-cdk-lib'; import * as constructs from 'constructs'; import * as cdk8s from 'cdk8s'; -import * as kplus from 'cdk8s-plus-21'; +import * as kplus from 'cdk8s-plus-22'; export interface MyChartProps { readonly bucket: s3.Bucket; @@ -1256,12 +1253,12 @@ export class MyChart extends cdk8s.Chart { new kplus.Pod(this, 'Pod', { containers: [ - new kplus.Container({ + { image: 'my-image', env: { BUCKET_NAME: kplus.EnvValue.fromValue(props.bucket.bucketName), }, - }), + } ], }); } diff --git a/packages/@aws-cdk/aws-eks/lib/alb-controller.ts b/packages/@aws-cdk/aws-eks/lib/alb-controller.ts index 5c0aa4b46779d..bc0c3032a82b7 100644 --- a/packages/@aws-cdk/aws-eks/lib/alb-controller.ts +++ b/packages/@aws-cdk/aws-eks/lib/alb-controller.ts @@ -231,7 +231,7 @@ export class AlbController extends Construct { // want to expose this since helm here is just an implementation detail // for installing a specific version of the controller itself. // https://github.com/aws/eks-charts/blob/v0.0.65/stable/aws-load-balancer-controller/Chart.yaml - version: '1.2.7', + version: '1.4.1', wait: true, timeout: Duration.minutes(15), diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 4500028606ae6..0b94df6b523b4 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -90,8 +90,8 @@ "@types/sinon": "^9.0.11", "@types/yaml": "1.9.6", "aws-sdk": "^2.848.0", - "cdk8s": "^1.6.21", - "cdk8s-plus-21": "^1.0.0-beta.186", + "cdk8s": "^2.3.37", + "cdk8s-plus-21": "^2.0.0-beta.12", "jest": "^27.5.1", "sinon": "^9.2.4" }, diff --git a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/aws-cdk-eks-cluster-alb-controller-test.assets.json b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/aws-cdk-eks-cluster-alb-controller-test.assets.json index cec21ffa11922..ce560bc1d4195 100644 --- a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/aws-cdk-eks-cluster-alb-controller-test.assets.json +++ b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/aws-cdk-eks-cluster-alb-controller-test.assets.json @@ -14,54 +14,54 @@ } } }, - "4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6": { + "2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6": { "source": { - "path": "asset.4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6", + "path": "asset.2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6.zip", + "objectKey": "2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9": { + "17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4": { "source": { - "path": "asset.8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9", + "path": "asset.17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9.zip", + "objectKey": "17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963": { + "d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb": { "source": { - "path": "asset.07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963", + "path": "asset.d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963.zip", + "objectKey": "d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "02927fd0ce5bb130cbc8d11f17469e74496526efe5186a9ab36e8a8138e9a557": { + "823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66": { "source": { - "path": "asset.02927fd0ce5bb130cbc8d11f17469e74496526efe5186a9ab36e8a8138e9a557.zip", + "path": "asset.823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66.zip", "packaging": "file" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "02927fd0ce5bb130cbc8d11f17469e74496526efe5186a9ab36e8a8138e9a557.zip", + "objectKey": "823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -79,28 +79,28 @@ } } }, - "5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2": { + "78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7": { "source": { - "path": "asset.5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2", + "path": "asset.78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2.zip", + "objectKey": "78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4": { + "2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2": { "source": { - "path": "asset.f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4", + "path": "asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4.zip", + "objectKey": "2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -118,7 +118,7 @@ } } }, - "3571b6fced520be1defe9cd06805c09f96012219694b3f88b3b11bc52adcb1cd": { + "e5930d924b2c56bb0893c31c742a080203a4340da3651e9ac2393c50217b7cad": { "source": { "path": "awscdkeksclusteralbcontrollertestawscdkawseksClusterResourceProvider5DBBAFBB.nested.template.json", "packaging": "file" @@ -126,12 +126,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3571b6fced520be1defe9cd06805c09f96012219694b3f88b3b11bc52adcb1cd.json", + "objectKey": "e5930d924b2c56bb0893c31c742a080203a4340da3651e9ac2393c50217b7cad.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "fbcc3d602482535849c257b6171f9c8e5952d856a1a732a4a6c1125d14428e5e": { + "ef6075084b19f67d2502c55f41c6aac41955743b16a7287a42386f1e33a40223": { "source": { "path": "awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderA1AC28D1.nested.template.json", "packaging": "file" @@ -139,12 +139,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fbcc3d602482535849c257b6171f9c8e5952d856a1a732a4a6c1125d14428e5e.json", + "objectKey": "ef6075084b19f67d2502c55f41c6aac41955743b16a7287a42386f1e33a40223.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "dcdec4ec0f7e3bedf8c53014e6f19a3151e950ebcbdaa8e27aa7be95ddaba360": { + "164f67416d8a9315434209ff139467e00668395013c0ef0b07fc11d4adb24526": { "source": { "path": "aws-cdk-eks-cluster-alb-controller-test.template.json", "packaging": "file" @@ -152,7 +152,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dcdec4ec0f7e3bedf8c53014e6f19a3151e950ebcbdaa8e27aa7be95ddaba360.json", + "objectKey": "164f67416d8a9315434209ff139467e00668395013c0ef0b07fc11d4adb24526.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/aws-cdk-eks-cluster-alb-controller-test.template.json b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/aws-cdk-eks-cluster-alb-controller-test.template.json index d801eb258a6c9..a9bfa3c67fc1f 100644 --- a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/aws-cdk-eks-cluster-alb-controller-test.template.json +++ b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/aws-cdk-eks-cluster-alb-controller-test.template.json @@ -1,2190 +1,2190 @@ { - "Resources": { - "Vpc8378EB38": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc" - } - ] - } - }, - "VpcPublicSubnet1Subnet5C2D37C4": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": { - "Fn::Select": [ - 0, - { - "Fn::GetAZs": "" - } - ] - }, - "CidrBlock": "10.0.0.0/18", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTable6C95E38E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" - } - ] - } - }, - "VpcPublicSubnet1RouteTableAssociation97140677": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - } - } - }, - "VpcPublicSubnet1DefaultRoute3DA9E72A": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" - ] - }, - "VpcPublicSubnet1EIPD7E02669": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" - } - ] + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" } - }, - "VpcPublicSubnet1NATGateway4D7517AA": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VpcPublicSubnet1EIPD7E02669", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" - } - ] + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "kubernetes.io/role/elb", + "Value": "1" + }, + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "kubernetes.io/role/elb", + "Value": "1" + }, + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "kubernetes.io/role/elb", + "Value": "1" + }, + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "kubernetes.io/role/elb", + "Value": "1" + }, + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" } - }, - "VpcPublicSubnet2Subnet691E08A3": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": { - "Fn::Select": [ - 1, - { - "Fn::GetAZs": "" - } - ] - }, - "CidrBlock": "10.0.64.0/18", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet2" - } - ] + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "kubernetes.io/role/elb", + "Value": "1" + }, + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "kubernetes.io/role/elb", + "Value": "1" + }, + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" } - }, - "VpcPublicSubnet2RouteTable94F7E489": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PublicSubnet2" - } - ] + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "kubernetes.io/role/internal-elb", + "Value": "1" + }, + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "kubernetes.io/role/internal-elb", + "Value": "1" + }, + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" } - }, - "VpcPublicSubnet2RouteTableAssociationDD5762D8": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "kubernetes.io/role/internal-elb", + "Value": "1" + }, + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "kubernetes.io/role/internal-elb", + "Value": "1" + }, + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "ClusterRoleFA261979": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "eks.amazonaws.com" + } } - }, - "VpcPublicSubnet2DefaultRoute97F91067": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VpcIGWD7BA715C" - } - }, - "DependsOn": [ - "VpcVPCGWBF912B6E" + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/AmazonEKSClusterPolicy" + ] ] - }, - "VpcPrivateSubnet1Subnet536B997A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": { - "Fn::Select": [ - 0, - { - "Fn::GetAZs": "" - } - ] - }, - "CidrBlock": "10.0.128.0/18", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableB2C5B500": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet1" - } - ] - } - }, - "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - } - } - }, - "VpcPrivateSubnet1DefaultRouteBE02A9ED": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcPrivateSubnet2Subnet3788AAA1": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "AvailabilityZone": { - "Fn::Select": [ - 1, - { - "Fn::GetAZs": "" - } + } + ] + } + }, + "ClusterControlPlaneSecurityGroupD274242C": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "EKS Control Plane Security Group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "ClusterCreationRole360249B6": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" ] - }, - "CidrBlock": "10.0.192.0/18", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableA678073B": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "Tags": [ - { - "Key": "kubernetes.io/role/internal-elb", - "Value": "1" - }, - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc/PrivateSubnet2" - } - ] - } - }, - "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "SubnetId": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - } - }, - "VpcPrivateSubnet2DefaultRoute060D2087": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VpcPublicSubnet1NATGateway4D7517AA" - } - } - }, - "VpcIGWD7BA715C": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "aws-cdk-eks-cluster-alb-controller-test/Vpc" - } - ] - } - }, - "VpcVPCGWBF912B6E": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, - "InternetGatewayId": { - "Ref": "VpcIGWD7BA715C" - } - } - }, - "ClusterRoleFA261979": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "eks.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSClusterPolicy" - ] - ] - } - ] - } - }, - "ClusterControlPlaneSecurityGroupD274242C": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "EKS Control Plane Security Group", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" + ] } + } } - }, - "ClusterCreationRole360249B6": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "ClusterCreationRoleDefaultPolicyE8BDFC7B": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:PassRole", - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - } - }, - { - "Action": [ - "eks:CreateCluster", - "eks:CreateFargateProfile", - "eks:DeleteCluster", - "eks:DescribeCluster", - "eks:DescribeUpdate", - "eks:TagResource", - "eks:UntagResource", - "eks:UpdateClusterConfig", - "eks:UpdateClusterVersion" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "eks:DeleteFargateProfile", - "eks:DescribeFargateProfile" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ec2:DescribeDhcpOptions", - "ec2:DescribeInstances", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeRouteTables", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeVpcs", - "iam:CreateServiceLinkedRole", - "iam:GetRole", - "iam:listAttachedRolePolicies" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "Roles": [ - { - "Ref": "ClusterCreationRole360249B6" - } + ], + "Version": "2012-10-17" + } + }, + "DependsOn": [ + "VpcIGWD7BA715C", + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableB2C5B500", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet1Subnet536B997A", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableA678073B", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56", + "VpcPrivateSubnet2Subnet3788AAA1", + "VpcPublicSubnet1DefaultRoute3DA9E72A", + "VpcPublicSubnet1EIPD7E02669", + "VpcPublicSubnet1NATGateway4D7517AA", + "VpcPublicSubnet1RouteTable6C95E38E", + "VpcPublicSubnet1RouteTableAssociation97140677", + "VpcPublicSubnet1Subnet5C2D37C4", + "VpcPublicSubnet2DefaultRoute97F91067", + "VpcPublicSubnet2RouteTable94F7E489", + "VpcPublicSubnet2RouteTableAssociationDD5762D8", + "VpcPublicSubnet2Subnet691E08A3", + "Vpc8378EB38", + "VpcVPCGWBF912B6E" + ] + }, + "ClusterCreationRoleDefaultPolicyE8BDFC7B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "iam:PassRole", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterRoleFA261979", + "Arn" ] + } }, - "DependsOn": [ - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ] - }, - "Cluster9EE0221C": { - "Type": "Custom::AWSCDK-EKS-Cluster", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksClusterResourceProviderframeworkonEventB8A2CF0DArn" - ] - }, - "Config": { - "version": "1.21", - "roleArn": { - "Fn::GetAtt": [ - "ClusterRoleFA261979", - "Arn" - ] - }, - "resourcesVpcConfig": { - "subnetIds": [ - { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, - { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ], - "securityGroupIds": [ - { - "Fn::GetAtt": [ - "ClusterControlPlaneSecurityGroupD274242C", - "GroupId" - ] - } - ], - "endpointPublicAccess": true, - "endpointPrivateAccess": true - } - }, - "AssumeRoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "AttributesRevision": 2 + { + "Action": [ + "eks:CreateCluster", + "eks:CreateFargateProfile", + "eks:DeleteCluster", + "eks:DescribeCluster", + "eks:DescribeUpdate", + "eks:TagResource", + "eks:UntagResource", + "eks:UpdateClusterConfig", + "eks:UpdateClusterVersion" + ], + "Effect": "Allow", + "Resource": "*" }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "VpcIGWD7BA715C", - "VpcPrivateSubnet1DefaultRouteBE02A9ED", - "VpcPrivateSubnet1RouteTableB2C5B500", - "VpcPrivateSubnet1RouteTableAssociation70C59FA6", - "VpcPrivateSubnet1Subnet536B997A", - "VpcPrivateSubnet2DefaultRoute060D2087", - "VpcPrivateSubnet2RouteTableA678073B", - "VpcPrivateSubnet2RouteTableAssociationA89CAD56", - "VpcPrivateSubnet2Subnet3788AAA1", - "VpcPublicSubnet1DefaultRoute3DA9E72A", - "VpcPublicSubnet1EIPD7E02669", - "VpcPublicSubnet1NATGateway4D7517AA", - "VpcPublicSubnet1RouteTable6C95E38E", - "VpcPublicSubnet1RouteTableAssociation97140677", - "VpcPublicSubnet1Subnet5C2D37C4", - "VpcPublicSubnet2DefaultRoute97F91067", - "VpcPublicSubnet2RouteTable94F7E489", - "VpcPublicSubnet2RouteTableAssociationDD5762D8", - "VpcPublicSubnet2Subnet691E08A3", - "Vpc8378EB38", - "VpcVPCGWBF912B6E" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterKubectlReadyBarrier200052AF": { - "Type": "AWS::SSM::Parameter", - "Properties": { - "Type": "String", - "Value": "aws:cdk:eks:kubectl-ready" + { + "Action": [ + "eks:DeleteFargateProfile", + "eks:DescribeFargateProfile" + ], + "Effect": "Allow", + "Resource": "*" }, - "DependsOn": [ - "ClusterCreationRoleDefaultPolicyE8BDFC7B", - "ClusterCreationRole360249B6", - "Cluster9EE0221C" - ] - }, - "ClusterMastersRole9AA35625": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "AWS": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":root" - ] - ] - } - } - } - ], - "Version": "2012-10-17" - } + { + "Action": [ + "ec2:DescribeDhcpOptions", + "ec2:DescribeInstances", + "ec2:DescribeNetworkInterfaces", + "ec2:DescribeRouteTables", + "ec2:DescribeSecurityGroups", + "ec2:DescribeSubnets", + "ec2:DescribeVpcs", + "iam:CreateServiceLinkedRole", + "iam:GetRole", + "iam:listAttachedRolePolicies" + ], + "Effect": "Allow", + "Resource": "*" } - }, - "ClusterAwsAuthmanifestFE51F8AE": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c86d8ad0bb8e20754211361dd51b3b9516ab079f0c\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] - }, - "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", - { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c86d8ad0bb8e20754211361dd51b3b9516ab079f0c", - "Overwrite": true - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterCreationRoleDefaultPolicyE8BDFC7B", + "Roles": [ + { + "Ref": "ClusterCreationRole360249B6" + } + ] + }, + "DependsOn": [ + "VpcIGWD7BA715C", + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableB2C5B500", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet1Subnet536B997A", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableA678073B", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56", + "VpcPrivateSubnet2Subnet3788AAA1", + "VpcPublicSubnet1DefaultRoute3DA9E72A", + "VpcPublicSubnet1EIPD7E02669", + "VpcPublicSubnet1NATGateway4D7517AA", + "VpcPublicSubnet1RouteTable6C95E38E", + "VpcPublicSubnet1RouteTableAssociation97140677", + "VpcPublicSubnet1Subnet5C2D37C4", + "VpcPublicSubnet2DefaultRoute97F91067", + "VpcPublicSubnet2RouteTable94F7E489", + "VpcPublicSubnet2RouteTableAssociationDD5762D8", + "VpcPublicSubnet2Subnet691E08A3", + "Vpc8378EB38", + "VpcVPCGWBF912B6E" + ] + }, + "Cluster9EE0221C": { + "Type": "Custom::AWSCDK-EKS-Cluster", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454", + "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksClusterResourceProviderframeworkonEventB8A2CF0DArn" + ] + }, + "Config": { + "version": "1.21", + "roleArn": { + "Fn::GetAtt": [ + "ClusterRoleFA261979", + "Arn" + ] + }, + "resourcesVpcConfig": { + "subnetIds": [ + { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterOpenIdConnectProviderE7EB0530": { - "Type": "Custom::AWSCDKOpenIdConnectProvider", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0", - "Arn" - ] - }, - "ClientIDList": [ - "sts.amazonaws.com" - ], - "ThumbprintList": [ - "9e99a48a9960b14926bb7f3b02e22da2b0ab7280" - ], - "Url": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "OpenIdConnectIssuerUrl" - ] - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": { - "Fn::Join": [ - "", - [ - "ec2.", - { - "Ref": "AWS::URLSuffix" - } - ] - ] - } - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKSWorkerNodePolicy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEKS_CNI_Policy" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } + "securityGroupIds": [ + { + "Fn::GetAtt": [ + "ClusterControlPlaneSecurityGroupD274242C", + "GroupId" ] - } - }, - "ClusterNodegroupDefaultCapacityDA0920A3": { - "Type": "AWS::EKS::Nodegroup", - "Properties": { - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "NodeRole": { - "Fn::GetAtt": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "Arn" - ] - }, - "Subnets": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - } - ], - "AmiType": "AL2_x86_64", - "ForceUpdateEnabled": true, - "InstanceTypes": [ - "m5.large" - ], - "ScalingConfig": { - "DesiredSize": 2, - "MaxSize": 2, - "MinSize": 2 - } - } - }, - "Clusterechoserver5815619F": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"name\":\"hello-server-deployment-c852e88c\",\"labels\":{\"aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04\":\"\"}},\"spec\":{\"minReadySeconds\":0,\"progressDeadlineSeconds\":600,\"replicas\":1,\"selector\":{\"matchExpressions\":[],\"matchLabels\":{\"cdk8s.deployment\":\"hello-server-Deployment-c8659a74\"}},\"strategy\":{\"rollingUpdate\":{\"maxSurge\":\"25%\",\"maxUnavailable\":\"25%\"},\"type\":\"RollingUpdate\"},\"template\":{\"metadata\":{\"labels\":{\"cdk8s.deployment\":\"hello-server-Deployment-c8659a74\"}},\"spec\":{\"automountServiceAccountToken\":true,\"containers\":[{\"args\":[\"-text\",\"hello\"],\"image\":\"hashicorp/http-echo\",\"imagePullPolicy\":\"Always\",\"name\":\"main\",\"ports\":[{\"containerPort\":5678}],\"securityContext\":{\"privileged\":false,\"readOnlyRootFilesystem\":false,\"runAsNonRoot\":false},\"volumeMounts\":[]}],\"dnsConfig\":{\"nameservers\":[],\"options\":[],\"searches\":[]},\"dnsPolicy\":\"ClusterFirst\",\"hostAliases\":[],\"initContainers\":[],\"securityContext\":{\"fsGroupChangePolicy\":\"Always\",\"runAsNonRoot\":false,\"sysctls\":[]},\"setHostnameAsFQDN\":false,\"volumes\":[]}}}},{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"name\":\"hello-server-deployment-service-c8fd9c61\",\"labels\":{\"aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04\":\"\"}},\"spec\":{\"externalIPs\":[],\"ports\":[{\"port\":5678,\"targetPort\":5678}],\"selector\":{\"cdk8s.deployment\":\"hello-server-Deployment-c8659a74\"},\"type\":\"NodePort\"}},{\"apiVersion\":\"networking.k8s.io/v1beta1\",\"kind\":\"Ingress\",\"metadata\":{\"annotations\":{\"kubernetes.io/ingress.class\":\"alb\",\"alb.ingress.kubernetes.io/scheme\":\"internal\",\"alb.ingress.kubernetes.io/inbound-cidrs\":\"", - { - "Fn::GetAtt": [ - "Vpc8378EB38", - "CidrBlock" - ] - }, - "\"},\"name\":\"hello-server-deployment-service-ingress-c896bd7e\",\"labels\":{\"aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04\":\"\"}},\"spec\":{\"rules\":[{\"http\":{\"paths\":[{\"backend\":{\"serviceName\":\"hello-server-deployment-service-c8fd9c61\",\"servicePort\":5678},\"path\":\"/\"}]}}]}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04" - }, - "DependsOn": [ - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsamanifestalbsaServiceAccountResourceED5FA069", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControllerF943CD86", - "ClusterKubectlReadyBarrier200052AF" + } ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "Clusterhelloserverdeploymentserviceingressc896bd7eLoadBalancerAddress142F1CB0": { - "Type": "Custom::AWSCDK-EKS-KubernetesObjectValue", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "ObjectType": "ingress", - "ObjectName": "hello-server-deployment-service-ingress-c896bd7e", - "ObjectNamespace": "default", - "JsonPath": ".status.loadBalancer.ingress[0].hostname", - "TimeoutSeconds": 600 - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3Bucket99CE547F" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3VersionKey7C7ADEAE" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3VersionKey7C7ADEAE" - } - ] - } - ] - } - ] - ] - }, - "Parameters": { - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket11BD506ARef": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKeyCDACFD96Ref": { - "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" - }, - "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref": { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket40DFAF90" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref": { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey36104212" - } - } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { - "Type": "AWS::CloudFormation::Stack", - "Properties": { - "TemplateURL": { - "Fn::Join": [ - "", - [ - "https://s3.", - { - "Ref": "AWS::Region" - }, - ".", - { - "Ref": "AWS::URLSuffix" - }, - "/", - { - "Ref": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3Bucket788867B6" - }, - "/", - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3VersionKey0A2E0327" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3VersionKey0A2E0327" - } - ] - } - ] - } - ] + "endpointPublicAccess": true, + "endpointPrivateAccess": true + } + }, + "AssumeRoleArn": { + "Fn::GetAtt": [ + "ClusterCreationRole360249B6", + "Arn" + ] + }, + "AttributesRevision": 2 + }, + "DependsOn": [ + "ClusterCreationRoleDefaultPolicyE8BDFC7B", + "ClusterCreationRole360249B6", + "VpcIGWD7BA715C", + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableB2C5B500", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet1Subnet536B997A", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableA678073B", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56", + "VpcPrivateSubnet2Subnet3788AAA1", + "VpcPublicSubnet1DefaultRoute3DA9E72A", + "VpcPublicSubnet1EIPD7E02669", + "VpcPublicSubnet1NATGateway4D7517AA", + "VpcPublicSubnet1RouteTable6C95E38E", + "VpcPublicSubnet1RouteTableAssociation97140677", + "VpcPublicSubnet1Subnet5C2D37C4", + "VpcPublicSubnet2DefaultRoute97F91067", + "VpcPublicSubnet2RouteTable94F7E489", + "VpcPublicSubnet2RouteTableAssociationDD5762D8", + "VpcPublicSubnet2Subnet691E08A3", + "Vpc8378EB38", + "VpcVPCGWBF912B6E" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterKubectlReadyBarrier200052AF": { + "Type": "AWS::SSM::Parameter", + "Properties": { + "Type": "String", + "Value": "aws:cdk:eks:kubectl-ready" + }, + "DependsOn": [ + "ClusterCreationRoleDefaultPolicyE8BDFC7B", + "ClusterCreationRole360249B6", + "Cluster9EE0221C" + ] + }, + "ClusterMastersRole9AA35625": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" ] - }, - "Parameters": { - "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64Arn": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "Arn" - ] - }, - "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket8DC8E5ACRef": { - "Ref": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket9BDF5881" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref": { - "Ref": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKey63AC53A2" - }, - "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet1Subnet7C7DBEE5Ref": { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, - "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet2Subnet7FBE197ERef": { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" - }, - "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64ClusterSecurityGroupId": { - "Fn::GetAtt": [ - "Cluster9EE0221C", - "ClusterSecurityGroupId" - ] - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3BucketE1B85B28Ref": { - "Ref": "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3Bucket16472AE2" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref": { - "Ref": "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyFAAA537A" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3BucketCD1CB66DRef": { - "Ref": "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3Bucket83B8778F" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKey62FE5136Ref": { - "Ref": "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKeyADF6A055" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref": { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket40DFAF90" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref": { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey36104212" - } + ] } - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A": { - "Type": "Custom::AWSCDKCfnJson", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57", - "Arn" - ] - }, - "Value": { - "Fn::Join": [ - "", - [ - "{\"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":oidc-provider/", - { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - ] - } - ] - }, - ":aud\":\"sts.amazonaws.com\",\"", - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - ":oidc-provider/", - { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - ] - } - ] - }, - ":sub\":\"system:serviceaccount:kube-system:aws-load-balancer-controller\"}" - ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "ClusterAwsAuthmanifestFE51F8AE": { + "Type": "Custom::AWSCDK-EKS-KubernetesResource", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", + "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" + ] + }, + "Manifest": { + "Fn::Join": [ + "", + [ + "[{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"aws-auth\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c86d8ad0bb8e20754211361dd51b3b9516ab079f0c\":\"\"}},\"data\":{\"mapRoles\":\"[{\\\"rolearn\\\":\\\"", + { + "Fn::GetAtt": [ + "ClusterMastersRole9AA35625", + "Arn" + ] + }, + "\\\",\\\"username\\\":\\\"", + { + "Fn::GetAtt": [ + "ClusterMastersRole9AA35625", + "Arn" + ] + }, + "\\\",\\\"groups\\\":[\\\"system:masters\\\"]},{\\\"rolearn\\\":\\\"", + { + "Fn::GetAtt": [ + "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", + "Arn" + ] + }, + "\\\",\\\"username\\\":\\\"system:node:{{EC2PrivateDNSName}}\\\",\\\"groups\\\":[\\\"system:bootstrappers\\\",\\\"system:nodes\\\"]}]\",\"mapUsers\":\"[]\",\"mapAccounts\":\"[]\"}}]" + ] + ] + }, + "ClusterName": { + "Ref": "Cluster9EE0221C" + }, + "RoleArn": { + "Fn::GetAtt": [ + "ClusterCreationRole360249B6", + "Arn" + ] + }, + "PruneLabel": "aws.cdk.eks/prune-c86d8ad0bb8e20754211361dd51b3b9516ab079f0c", + "Overwrite": true + }, + "DependsOn": [ + "ClusterKubectlReadyBarrier200052AF" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterOpenIdConnectProviderE7EB0530": { + "Type": "Custom::AWSCDKOpenIdConnectProvider", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0", + "Arn" + ] + }, + "ClientIDList": [ + "sts.amazonaws.com" + ], + "ThumbprintList": [ + "9e99a48a9960b14926bb7f3b02e22da2b0ab7280" + ], + "Url": { + "Fn::GetAtt": [ + "Cluster9EE0221C", + "OpenIdConnectIssuerUrl" + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": { + "Fn::Join": [ + "", + [ + "ec2.", + { + "Ref": "AWS::URLSuffix" + } ] + ] } - }, - "DependsOn": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRoleWithWebIdentity", - "Condition": { - "StringEquals": { - "Fn::GetAtt": [ - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A", - "Value" - ] - } - }, - "Effect": "Allow", - "Principal": { - "Federated": { - "Ref": "ClusterOpenIdConnectProviderE7EB0530" - } - } - } - ], - "Version": "2012-10-17" - } - }, - "DependsOn": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/AmazonEKSWorkerNodePolicy" + ] ] - }, - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "iam:CreateServiceLinkedRole", - "Condition": { - "StringEquals": { - "iam:AWSServiceName": "elasticloadbalancing.amazonaws.com" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "acm:DescribeCertificate", - "acm:ListCertificates", - "cognito-idp:DescribeUserPoolClient", - "ec2:AuthorizeSecurityGroupIngress", - "ec2:CreateSecurityGroup", - "ec2:DescribeAccountAttributes", - "ec2:DescribeAddresses", - "ec2:DescribeAvailabilityZones", - "ec2:DescribeCoipPools", - "ec2:DescribeInstances", - "ec2:DescribeInternetGateways", - "ec2:DescribeNetworkInterfaces", - "ec2:DescribeSecurityGroups", - "ec2:DescribeSubnets", - "ec2:DescribeTags", - "ec2:DescribeVpcPeeringConnections", - "ec2:DescribeVpcs", - "ec2:GetCoipPoolUsage", - "ec2:RevokeSecurityGroupIngress", - "elasticloadbalancing:AddListenerCertificates", - "elasticloadbalancing:CreateListener", - "elasticloadbalancing:CreateRule", - "elasticloadbalancing:DeleteListener", - "elasticloadbalancing:DeleteRule", - "elasticloadbalancing:DescribeListenerCertificates", - "elasticloadbalancing:DescribeListeners", - "elasticloadbalancing:DescribeLoadBalancerAttributes", - "elasticloadbalancing:DescribeLoadBalancers", - "elasticloadbalancing:DescribeRules", - "elasticloadbalancing:DescribeSSLPolicies", - "elasticloadbalancing:DescribeTags", - "elasticloadbalancing:DescribeTargetGroupAttributes", - "elasticloadbalancing:DescribeTargetGroups", - "elasticloadbalancing:DescribeTargetHealth", - "elasticloadbalancing:ModifyListener", - "elasticloadbalancing:ModifyRule", - "elasticloadbalancing:RemoveListenerCertificates", - "elasticloadbalancing:SetWebAcl", - "iam:GetServerCertificate", - "iam:ListServerCertificates", - "shield:CreateProtection", - "shield:DeleteProtection", - "shield:DescribeProtection", - "shield:GetSubscriptionState", - "waf-regional:AssociateWebACL", - "waf-regional:DisassociateWebACL", - "waf-regional:GetWebACL", - "waf-regional:GetWebACLForResource", - "wafv2:AssociateWebACL", - "wafv2:DisassociateWebACL", - "wafv2:GetWebACL", - "wafv2:GetWebACLForResource" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "ec2:CreateTags", - "Condition": { - "StringEquals": { - "ec2:CreateAction": "CreateSecurityGroup" - }, - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "arn:aws:ec2:*:*:security-group/*" - }, - { - "Action": [ - "ec2:CreateTags", - "ec2:DeleteTags" - ], - "Condition": { - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "true", - "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "arn:aws:ec2:*:*:security-group/*" - }, - { - "Action": [ - "ec2:AuthorizeSecurityGroupIngress", - "ec2:DeleteSecurityGroup", - "ec2:RevokeSecurityGroupIngress", - "elasticloadbalancing:DeleteLoadBalancer", - "elasticloadbalancing:DeleteTargetGroup", - "elasticloadbalancing:ModifyLoadBalancerAttributes", - "elasticloadbalancing:ModifyTargetGroup", - "elasticloadbalancing:ModifyTargetGroupAttributes", - "elasticloadbalancing:SetIpAddressType", - "elasticloadbalancing:SetSecurityGroups", - "elasticloadbalancing:SetSubnets" - ], - "Condition": { - "Null": { - "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "elasticloadbalancing:CreateLoadBalancer", - "elasticloadbalancing:CreateTargetGroup" - ], - "Condition": { - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "elasticloadbalancing:AddTags", - "elasticloadbalancing:RemoveTags" - ], - "Condition": { - "Null": { - "aws:RequestTag/elbv2.k8s.aws/cluster": "true", - "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" - } - }, - "Effect": "Allow", - "Resource": [ - "arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*", - "arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*", - "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*" - ] - }, - { - "Action": [ - "elasticloadbalancing:AddTags", - "elasticloadbalancing:RemoveTags" - ], - "Effect": "Allow", - "Resource": [ - "arn:aws:elasticloadbalancing:*:*:listener-rule/app/*/*/*", - "arn:aws:elasticloadbalancing:*:*:listener-rule/net/*/*/*", - "arn:aws:elasticloadbalancing:*:*:listener/app/*/*/*", - "arn:aws:elasticloadbalancing:*:*:listener/net/*/*/*" - ] - }, - { - "Action": [ - "elasticloadbalancing:DeregisterTargets", - "elasticloadbalancing:RegisterTargets" - ], - "Effect": "Allow", - "Resource": "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC", - "Roles": [ - { - "Ref": "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927" - } - ] - }, - "DependsOn": [ - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/AmazonEKS_CNI_Policy" + ] ] - }, - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsamanifestalbsaServiceAccountResourceED5FA069": { - "Type": "Custom::AWSCDK-EKS-KubernetesResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" - ] - }, - "Manifest": { - "Fn::Join": [ - "", - [ - "[{\"apiVersion\":\"v1\",\"kind\":\"ServiceAccount\",\"metadata\":{\"name\":\"aws-load-balancer-controller\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c87ed3e4d1c4d777a5673be4909059213f1c53a6f0\":\"\",\"app.kubernetes.io/name\":\"aws-load-balancer-controller\"},\"annotations\":{\"eks.amazonaws.com/role-arn\":\"", - { - "Fn::GetAtt": [ - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927", - "Arn" - ] - }, - "\"}}}]" - ] - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" - ] - }, - "PruneLabel": "aws.cdk.eks/prune-c87ed3e4d1c4d777a5673be4909059213f1c53a6f0" - }, - "DependsOn": [ - "ClusterKubectlReadyBarrier200052AF", - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControllerF943CD86": { - "Type": "Custom::AWSCDK-EKS-HelmChart", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", - "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" - ] - }, - "ClusterName": { - "Ref": "Cluster9EE0221C" - }, - "RoleArn": { - "Fn::GetAtt": [ - "ClusterCreationRole360249B6", - "Arn" + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" + ] + ] + } + ] + } + }, + "ClusterNodegroupDefaultCapacityDA0920A3": { + "Type": "AWS::EKS::Nodegroup", + "Properties": { + "ClusterName": { + "Ref": "Cluster9EE0221C" + }, + "NodeRole": { + "Fn::GetAtt": [ + "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", + "Arn" + ] + }, + "Subnets": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "AmiType": "AL2_x86_64", + "ForceUpdateEnabled": true, + "InstanceTypes": [ + "m5.large" + ], + "ScalingConfig": { + "DesiredSize": 2, + "MaxSize": 2, + "MinSize": 2 + } + } + }, + "Clusterechoserver5815619F": { + "Type": "Custom::AWSCDK-EKS-KubernetesResource", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", + "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" + ] + }, + "Manifest": { + "Fn::Join": [ + "", + [ + "[{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"name\":\"hello-server-deployment-c852e88c\",\"labels\":{\"aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04\":\"\"}},\"spec\":{\"minReadySeconds\":0,\"progressDeadlineSeconds\":600,\"replicas\":1,\"selector\":{\"matchLabels\":{\"cdk8s.io/metadata.addr\":\"hello-server-Deployment-c8659a74\"}},\"strategy\":{\"rollingUpdate\":{\"maxSurge\":\"25%\",\"maxUnavailable\":\"25%\"},\"type\":\"RollingUpdate\"},\"template\":{\"metadata\":{\"labels\":{\"cdk8s.io/metadata.addr\":\"hello-server-Deployment-c8659a74\"}},\"spec\":{\"automountServiceAccountToken\":true,\"containers\":[{\"args\":[\"-text\",\"hello\"],\"image\":\"hashicorp/http-echo\",\"imagePullPolicy\":\"Always\",\"name\":\"main\",\"ports\":[{\"containerPort\":5678}],\"securityContext\":{\"privileged\":false,\"readOnlyRootFilesystem\":false,\"runAsNonRoot\":false}}],\"dnsPolicy\":\"ClusterFirst\",\"securityContext\":{\"fsGroupChangePolicy\":\"Always\",\"runAsNonRoot\":false},\"setHostnameAsFQDN\":false}}}},{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"name\":\"hello-server-deployment-service-c8fd9c61\",\"labels\":{\"aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04\":\"\"}},\"spec\":{\"externalIPs\":[],\"ports\":[{\"port\":5678,\"targetPort\":5678}],\"selector\":{\"cdk8s.io/metadata.addr\":\"hello-server-Deployment-c8659a74\"},\"type\":\"NodePort\"}},{\"apiVersion\":\"networking.k8s.io/v1beta1\",\"kind\":\"Ingress\",\"metadata\":{\"annotations\":{\"kubernetes.io/ingress.class\":\"alb\",\"alb.ingress.kubernetes.io/scheme\":\"internal\",\"alb.ingress.kubernetes.io/inbound-cidrs\":\"", + { + "Fn::GetAtt": [ + "Vpc8378EB38", + "CidrBlock" + ] + }, + "\"},\"name\":\"hello-server-deployment-service-ingress-c896bd7e\",\"labels\":{\"aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04\":\"\"}},\"spec\":{\"rules\":[{\"http\":{\"paths\":[{\"backend\":{\"serviceName\":\"hello-server-deployment-service-c8fd9c61\",\"servicePort\":5678},\"path\":\"/\"}]}}]}}]" + ] + ] + }, + "ClusterName": { + "Ref": "Cluster9EE0221C" + }, + "RoleArn": { + "Fn::GetAtt": [ + "ClusterCreationRole360249B6", + "Arn" + ] + }, + "PruneLabel": "aws.cdk.eks/prune-c88b1dfeeaf63e3024ab07862029ba60fd8907fb04" + }, + "DependsOn": [ + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A", + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsamanifestalbsaServiceAccountResourceED5FA069", + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC", + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927", + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControllerF943CD86", + "ClusterKubectlReadyBarrier200052AF" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "Clusterhelloserverdeploymentserviceingressc896bd7eLoadBalancerAddress142F1CB0": { + "Type": "Custom::AWSCDK-EKS-KubernetesObjectValue", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", + "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" + ] + }, + "ClusterName": { + "Ref": "Cluster9EE0221C" + }, + "RoleArn": { + "Fn::GetAtt": [ + "ClusterCreationRole360249B6", + "Arn" + ] + }, + "ObjectType": "ingress", + "ObjectName": "hello-server-deployment-service-ingress-c896bd7e", + "ObjectNamespace": "default", + "JsonPath": ".status.loadBalancer.ingress[0].hostname", + "TimeoutSeconds": 600 + }, + "DependsOn": [ + "ClusterKubectlReadyBarrier200052AF" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3Bucket489AAFE4" + }, + "/", + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3VersionKey00EB8998" + } ] - }, - "Release": "aws-load-balancer-controller", - "Chart": "aws-load-balancer-controller", - "Version": "1.2.7", - "Wait": true, - "Timeout": "900s", - "Values": { - "Fn::Join": [ - "", - [ - "{\"clusterName\":\"", - { - "Ref": "Cluster9EE0221C" - }, - "\",\"serviceAccount\":{\"create\":false,\"name\":\"aws-load-balancer-controller\"},\"region\":\"", - { - "Ref": "AWS::Region" - }, - "\",\"vpcId\":\"", - { - "Ref": "Vpc8378EB38" - }, - "\",\"image\":{\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.4.1\"}}" - ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3VersionKey00EB8998" + } ] - }, - "Namespace": "kube-system", - "Repository": "https://aws.github.io/eks-charts", - "CreateNamespace": true - }, - "DependsOn": [ - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsamanifestalbsaServiceAccountResourceED5FA069", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC", - "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927", - "ClusterAwsAuthmanifestFE51F8AE", - "ClusterKubectlReadyBarrier200052AF", - "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", - "ClusterNodegroupDefaultCapacityDA0920A3", - "ClusterOpenIdConnectProviderE7EB0530" - ], - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } + } + ] + } + ] + ] + }, + "Parameters": { + "referencetoawscdkeksclusteralbcontrollertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket11BD506ARef": { + "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKeyCDACFD96Ref": { + "Ref": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224" + }, + "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn": { + "Fn::GetAtt": [ + "ClusterCreationRole360249B6", + "Arn" + ] + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref": { + "Ref": "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket60C6EC09" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef": { + "Ref": "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKey8076CD69" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef": { + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3Bucket6F10C3DB" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef": { + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKey63833CCE" + } + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3BucketCF1053D7" + }, + "/", + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3VersionKey4749F23A" + } ] - }, - "ManagedPolicyArns": [ - { - "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - } - ], - "Policies": [ - { - "PolicyName": "Inline", - "PolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Resource": "*", - "Action": [ - "iam:CreateOpenIDConnectProvider", - "iam:DeleteOpenIDConnectProvider", - "iam:UpdateOpenIDConnectProviderThumbprint", - "iam:AddClientIDToOpenIDConnectProvider", - "iam:RemoveClientIDFromOpenIDConnectProvider" - ] - } - ] - } - } + } ] - } - }, - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65", - "Arn" + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3VersionKey4749F23A" + } ] - }, - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65" + } + ] + } ] + ] }, - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Version": "2012-10-17", - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } + "Parameters": { + "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64Arn": { + "Fn::GetAtt": [ + "Cluster9EE0221C", + "Arn" + ] + }, + "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn": { + "Fn::GetAtt": [ + "ClusterCreationRole360249B6", + "Arn" + ] + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3Bucket236E3AC4Ref": { + "Ref": "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3BucketE22E9B3C" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef": { + "Ref": "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKey1CD5C166" + }, + "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet1Subnet7C7DBEE5Ref": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet2Subnet7FBE197ERef": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + }, + "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64ClusterSecurityGroupId": { + "Fn::GetAtt": [ + "Cluster9EE0221C", + "ClusterSecurityGroupId" + ] + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket57CCB5B7Ref": { + "Ref": "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket3D77F5D6" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref": { + "Ref": "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKeyDC273027" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3BucketCD1CB66DRef": { + "Ref": "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3Bucket83B8778F" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKey62FE5136Ref": { + "Ref": "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKeyADF6A055" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef": { + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3Bucket6F10C3DB" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef": { + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKey63833CCE" + } + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A": { + "Type": "Custom::AWSCDKCfnJson", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57", + "Arn" + ] + }, + "Value": { + "Fn::Join": [ + "", + [ + "{\"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + ":oidc-provider/", + { + "Ref": "ClusterOpenIdConnectProviderE7EB0530" + } ] - }, - "ManagedPolicyArns": [ - { - "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - } + } ] - } - }, - "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E" - } - ] - } - ] - } - ] - ] - } - }, - "Timeout": 900, - "MemorySize": 128, - "Handler": "__entrypoint__.handler", - "Role": { - "Fn::GetAtt": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867", - "Arn" + }, + ":aud\":\"sts.amazonaws.com\",\"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + ":oidc-provider/", + { + "Ref": "ClusterOpenIdConnectProviderE7EB0530" + } ] - }, - "Runtime": "nodejs14.x" - }, - "DependsOn": [ - "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867" + } + ] + }, + ":sub\":\"system:serviceaccount:kube-system:aws-load-balancer-controller\"}" ] - }, - "IngressPingerFunctionServiceRoleD01E9C19": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" - ] - ] - } + ] + } + }, + "DependsOn": [ + "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", + "ClusterNodegroupDefaultCapacityDA0920A3" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRoleWithWebIdentity", + "Condition": { + "StringEquals": { + "Fn::GetAtt": [ + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A", + "Value" + ] + } + }, + "Effect": "Allow", + "Principal": { + "Federated": { + "Ref": "ClusterOpenIdConnectProviderE7EB0530" + } + } + } + ], + "Version": "2012-10-17" + } + }, + "DependsOn": [ + "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", + "ClusterNodegroupDefaultCapacityDA0920A3" + ] + }, + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "iam:CreateServiceLinkedRole", + "Condition": { + "StringEquals": { + "iam:AWSServiceName": "elasticloadbalancing.amazonaws.com" + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "acm:DescribeCertificate", + "acm:ListCertificates", + "cognito-idp:DescribeUserPoolClient", + "ec2:AuthorizeSecurityGroupIngress", + "ec2:CreateSecurityGroup", + "ec2:DescribeAccountAttributes", + "ec2:DescribeAddresses", + "ec2:DescribeAvailabilityZones", + "ec2:DescribeCoipPools", + "ec2:DescribeInstances", + "ec2:DescribeInternetGateways", + "ec2:DescribeNetworkInterfaces", + "ec2:DescribeSecurityGroups", + "ec2:DescribeSubnets", + "ec2:DescribeTags", + "ec2:DescribeVpcPeeringConnections", + "ec2:DescribeVpcs", + "ec2:GetCoipPoolUsage", + "ec2:RevokeSecurityGroupIngress", + "elasticloadbalancing:AddListenerCertificates", + "elasticloadbalancing:CreateListener", + "elasticloadbalancing:CreateRule", + "elasticloadbalancing:DeleteListener", + "elasticloadbalancing:DeleteRule", + "elasticloadbalancing:DescribeListenerCertificates", + "elasticloadbalancing:DescribeListeners", + "elasticloadbalancing:DescribeLoadBalancerAttributes", + "elasticloadbalancing:DescribeLoadBalancers", + "elasticloadbalancing:DescribeRules", + "elasticloadbalancing:DescribeSSLPolicies", + "elasticloadbalancing:DescribeTags", + "elasticloadbalancing:DescribeTargetGroupAttributes", + "elasticloadbalancing:DescribeTargetGroups", + "elasticloadbalancing:DescribeTargetHealth", + "elasticloadbalancing:ModifyListener", + "elasticloadbalancing:ModifyRule", + "elasticloadbalancing:RemoveListenerCertificates", + "elasticloadbalancing:SetWebAcl", + "iam:GetServerCertificate", + "iam:ListServerCertificates", + "shield:CreateProtection", + "shield:DeleteProtection", + "shield:DescribeProtection", + "shield:GetSubscriptionState", + "waf-regional:AssociateWebACL", + "waf-regional:DisassociateWebACL", + "waf-regional:GetWebACL", + "waf-regional:GetWebACLForResource", + "wafv2:AssociateWebACL", + "wafv2:DisassociateWebACL", + "wafv2:GetWebACL", + "wafv2:GetWebACLForResource" + ], + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": "ec2:CreateTags", + "Condition": { + "StringEquals": { + "ec2:CreateAction": "CreateSecurityGroup" + }, + "Null": { + "aws:RequestTag/elbv2.k8s.aws/cluster": "false" + } + }, + "Effect": "Allow", + "Resource": "arn:aws:ec2:*:*:security-group/*" + }, + { + "Action": [ + "ec2:CreateTags", + "ec2:DeleteTags" + ], + "Condition": { + "Null": { + "aws:RequestTag/elbv2.k8s.aws/cluster": "true", + "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" + } + }, + "Effect": "Allow", + "Resource": "arn:aws:ec2:*:*:security-group/*" + }, + { + "Action": [ + "ec2:AuthorizeSecurityGroupIngress", + "ec2:DeleteSecurityGroup", + "ec2:RevokeSecurityGroupIngress", + "elasticloadbalancing:DeleteLoadBalancer", + "elasticloadbalancing:DeleteTargetGroup", + "elasticloadbalancing:ModifyLoadBalancerAttributes", + "elasticloadbalancing:ModifyTargetGroup", + "elasticloadbalancing:ModifyTargetGroupAttributes", + "elasticloadbalancing:SetIpAddressType", + "elasticloadbalancing:SetSecurityGroups", + "elasticloadbalancing:SetSubnets" + ], + "Condition": { + "Null": { + "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "elasticloadbalancing:CreateLoadBalancer", + "elasticloadbalancing:CreateTargetGroup" + ], + "Condition": { + "Null": { + "aws:RequestTag/elbv2.k8s.aws/cluster": "false" + } + }, + "Effect": "Allow", + "Resource": "*" + }, + { + "Action": [ + "elasticloadbalancing:AddTags", + "elasticloadbalancing:RemoveTags" + ], + "Condition": { + "Null": { + "aws:RequestTag/elbv2.k8s.aws/cluster": "true", + "aws:ResourceTag/elbv2.k8s.aws/cluster": "false" + } + }, + "Effect": "Allow", + "Resource": [ + "arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*", + "arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*", + "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*" + ] + }, + { + "Action": [ + "elasticloadbalancing:AddTags", + "elasticloadbalancing:RemoveTags" + ], + "Effect": "Allow", + "Resource": [ + "arn:aws:elasticloadbalancing:*:*:listener-rule/app/*/*/*", + "arn:aws:elasticloadbalancing:*:*:listener-rule/net/*/*/*", + "arn:aws:elasticloadbalancing:*:*:listener/app/*/*/*", + "arn:aws:elasticloadbalancing:*:*:listener/net/*/*/*" + ] + }, + { + "Action": [ + "elasticloadbalancing:DeregisterTargets", + "elasticloadbalancing:RegisterTargets" + ], + "Effect": "Allow", + "Resource": "arn:aws:elasticloadbalancing:*:*:targetgroup/*/*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC", + "Roles": [ + { + "Ref": "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927" + } + ] + }, + "DependsOn": [ + "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", + "ClusterNodegroupDefaultCapacityDA0920A3" + ] + }, + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsamanifestalbsaServiceAccountResourceED5FA069": { + "Type": "Custom::AWSCDK-EKS-KubernetesResource", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", + "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" + ] + }, + "Manifest": { + "Fn::Join": [ + "", + [ + "[{\"apiVersion\":\"v1\",\"kind\":\"ServiceAccount\",\"metadata\":{\"name\":\"aws-load-balancer-controller\",\"namespace\":\"kube-system\",\"labels\":{\"aws.cdk.eks/prune-c87ed3e4d1c4d777a5673be4909059213f1c53a6f0\":\"\",\"app.kubernetes.io/name\":\"aws-load-balancer-controller\"},\"annotations\":{\"eks.amazonaws.com/role-arn\":\"", + { + "Fn::GetAtt": [ + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927", + "Arn" ] + }, + "\"}}}]" + ] + ] + }, + "ClusterName": { + "Ref": "Cluster9EE0221C" + }, + "RoleArn": { + "Fn::GetAtt": [ + "ClusterCreationRole360249B6", + "Arn" + ] + }, + "PruneLabel": "aws.cdk.eks/prune-c87ed3e4d1c4d777a5673be4909059213f1c53a6f0" + }, + "DependsOn": [ + "ClusterKubectlReadyBarrier200052AF", + "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", + "ClusterNodegroupDefaultCapacityDA0920A3" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControllerF943CD86": { + "Type": "Custom::AWSCDK-EKS-HelmChart", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", + "Outputs.awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn" + ] + }, + "ClusterName": { + "Ref": "Cluster9EE0221C" + }, + "RoleArn": { + "Fn::GetAtt": [ + "ClusterCreationRole360249B6", + "Arn" + ] + }, + "Release": "aws-load-balancer-controller", + "Chart": "aws-load-balancer-controller", + "Version": "1.4.1", + "Wait": true, + "Timeout": "900s", + "Values": { + "Fn::Join": [ + "", + [ + "{\"clusterName\":\"", + { + "Ref": "Cluster9EE0221C" + }, + "\",\"serviceAccount\":{\"create\":false,\"name\":\"aws-load-balancer-controller\"},\"region\":\"", + { + "Ref": "AWS::Region" + }, + "\",\"vpcId\":\"", + { + "Ref": "Vpc8378EB38" + }, + "\",\"image\":{\"repository\":\"602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller\",\"tag\":\"v2.4.1\"}}" + ] + ] + }, + "Namespace": "kube-system", + "Repository": "https://aws.github.io/eks-charts", + "CreateNamespace": true + }, + "DependsOn": [ + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaConditionJsonCB1A2F4A", + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsamanifestalbsaServiceAccountResourceED5FA069", + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRoleDefaultPolicy2047BBBC", + "awscdkeksclusteralbcontrollertestCluster481F6464AlbControlleralbsaRole84609927", + "ClusterAwsAuthmanifestFE51F8AE", + "ClusterKubectlReadyBarrier200052AF", + "ClusterNodegroupDefaultCapacityNodeGroupRole55953B04", + "ClusterNodegroupDefaultCapacityDA0920A3", + "ClusterOpenIdConnectProviderE7EB0530" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } } - }, - "IngressPingerFunctionSecurityGroup77C60B1A": { - "Type": "AWS::EC2::SecurityGroup", - "Properties": { - "GroupDescription": "Automatic security group for Lambda Function awscdkeksclusteralbcontrollertestIngressPingerFunction2F7B2C81", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1" - } - ], - "VpcId": { - "Ref": "Vpc8378EB38" + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ], + "Policies": [ + { + "PolicyName": "Inline", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Resource": "*", + "Action": [ + "iam:CreateOpenIDConnectProvider", + "iam:DeleteOpenIDConnectProvider", + "iam:UpdateOpenIDConnectProviderThumbprint", + "iam:AddClientIDToOpenIDConnectProvider", + "iam:RemoveClientIDFromOpenIDConnectProvider" + ] } + ] } - }, - "IngressPingerFunction54746D9B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3BucketA6642550" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3VersionKeyFEC50F65" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3VersionKeyFEC50F65" - } - ] - } - ] - } - ] - ] - } - }, - "Role": { - "Fn::GetAtt": [ - "IngressPingerFunctionServiceRoleD01E9C19", - "Arn" - ] - }, - "Handler": "index.handler", - "Runtime": "python3.9", - "Timeout": 600, - "VpcConfig": { - "SecurityGroupIds": [ + } + ] + } + }, + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderHandlerF2C543E0": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7S3Bucket1537AE9B" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", { - "Fn::GetAtt": [ - "IngressPingerFunctionSecurityGroup77C60B1A", - "GroupId" - ] + "Ref": "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7S3VersionKey196887A9" } - ], - "SubnetIds": [ - { - "Ref": "VpcPrivateSubnet1Subnet536B997A" - }, + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", { - "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + "Ref": "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7S3VersionKey196887A9" } - ] + ] + } + ] } - }, - "DependsOn": [ - "IngressPingerFunctionServiceRoleD01E9C19" + ] ] - }, - "IngressPingerProviderframeworkonEventServiceRole89300FAD": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ + } + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65", + "Arn" + ] + }, + "Runtime": "nodejs14.x" + }, + "DependsOn": [ + "CustomAWSCDKOpenIdConnectProviderCustomResourceProviderRole517FED65" + ] + }, + "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ] + } + }, + "AWSCDKCfnUtilsProviderCustomResourceProviderHandlerCF82AA57": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2S3Bucket61ECA0AB" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } + "Ref": "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2S3VersionKey38DF8B25" } - ], - "Version": "2012-10-17" + ] + } + ] }, - "ManagedPolicyArns": [ + { + "Fn::Select": [ + 1, { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - } - ] - } - }, - "IngressPingerProviderframeworkonEventServiceRoleDefaultPolicy7CC73E26": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ + "Fn::Split": [ + "||", { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "IngressPingerFunction54746D9B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "IngressPingerFunction54746D9B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] + "Ref": "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2S3VersionKey38DF8B25" } - ], - "Version": "2012-10-17" - }, - "PolicyName": "IngressPingerProviderframeworkonEventServiceRoleDefaultPolicy7CC73E26", - "Roles": [ - { - "Ref": "IngressPingerProviderframeworkonEventServiceRole89300FAD" + ] } - ] + ] + } + ] + ] + } + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867", + "Arn" + ] + }, + "Runtime": "nodejs14.x" + }, + "DependsOn": [ + "AWSCDKCfnUtilsProviderCustomResourceProviderRoleFE0EE867" + ] + }, + "IngressPingerFunctionServiceRoleD01E9C19": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } } - }, - "IngressPingerProviderframeworkonEventEE5AD360": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket40DFAF90" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey36104212" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey36104212" - } - ] - } - ] - } - ] - ] + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + } + ] + } + }, + "IngressPingerFunctionSecurityGroup77C60B1A": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "Automatic security group for Lambda Function awscdkeksclusteralbcontrollertestIngressPingerFunction2F7B2C81", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "IngressPingerFunction54746D9B": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3BucketA6642550" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3VersionKeyFEC50F65" + } + ] } + ] }, - "Role": { - "Fn::GetAtt": [ - "IngressPingerProviderframeworkonEventServiceRole89300FAD", - "Arn" - ] - }, - "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-eks-cluster-alb-controller-test/IngressPinger/Provider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "IngressPingerFunction54746D9B", - "Arn" - ] + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3VersionKeyFEC50F65" } + ] } - }, - "Handler": "framework.onEvent", - "Runtime": "nodejs14.x", - "Timeout": 900 - }, - "DependsOn": [ - "IngressPingerProviderframeworkonEventServiceRoleDefaultPolicy7CC73E26", - "IngressPingerProviderframeworkonEventServiceRole89300FAD" - ] - }, - "IngressPinger1AD9E831": { - "Type": "AWS::CloudFormation::CustomResource", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "IngressPingerProviderframeworkonEventEE5AD360", - "Arn" - ] - }, - "Url": { - "Fn::Join": [ - "", - [ - "http://", - { - "Fn::GetAtt": [ - "Clusterhelloserverdeploymentserviceingressc896bd7eLoadBalancerAddress142F1CB0", - "Value" - ] - } - ] - ] + ] } + ] + ] + } + }, + "Role": { + "Fn::GetAtt": [ + "IngressPingerFunctionServiceRoleD01E9C19", + "Arn" + ] + }, + "Handler": "index.handler", + "Runtime": "python3.9", + "Timeout": 600, + "VpcConfig": { + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "IngressPingerFunctionSecurityGroup77C60B1A", + "GroupId" + ] + } + ], + "SubnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] } + }, + "DependsOn": [ + "IngressPingerFunctionServiceRoleD01E9C19" + ] }, - "Outputs": { - "ClusterConfigCommand43AAE40F": { - "Value": { - "Fn::Join": [ + "IngressPingerProviderframeworkonEventServiceRole89300FAD": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ] + } + }, + "IngressPingerProviderframeworkonEventServiceRoleDefaultPolicy7CC73E26": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "IngressPingerFunction54746D9B", + "Arn" + ] + }, + { + "Fn::Join": [ "", [ - "aws eks update-kubeconfig --name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", - { - "Ref": "AWS::Region" - }, - " --role-arn ", - { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] - } + { + "Fn::GetAtt": [ + "IngressPingerFunction54746D9B", + "Arn" + ] + }, + ":*" ] - ] + ] + } + ] } - }, - "ClusterGetTokenCommand06AE992E": { - "Value": { - "Fn::Join": [ - "", - [ - "aws eks get-token --cluster-name ", - { - "Ref": "Cluster9EE0221C" - }, - " --region ", + ], + "Version": "2012-10-17" + }, + "PolicyName": "IngressPingerProviderframeworkonEventServiceRoleDefaultPolicy7CC73E26", + "Roles": [ + { + "Ref": "IngressPingerProviderframeworkonEventServiceRole89300FAD" + } + ] + } + }, + "IngressPingerProviderframeworkonEventEE5AD360": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3Bucket6F10C3DB" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", { - "Ref": "AWS::Region" - }, - " --role-arn ", + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKey63833CCE" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", { - "Fn::GetAtt": [ - "ClusterMastersRole9AA35625", - "Arn" - ] + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKey63833CCE" } - ] - ] + ] + } + ] + } + ] + ] + } + }, + "Role": { + "Fn::GetAtt": [ + "IngressPingerProviderframeworkonEventServiceRole89300FAD", + "Arn" + ] + }, + "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-eks-cluster-alb-controller-test/IngressPinger/Provider)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "IngressPingerFunction54746D9B", + "Arn" + ] } - }, - "IngressPingerResponse": { - "Value": { + } + }, + "Handler": "framework.onEvent", + "Runtime": "nodejs14.x", + "Timeout": 900 + }, + "DependsOn": [ + "IngressPingerProviderframeworkonEventServiceRoleDefaultPolicy7CC73E26", + "IngressPingerProviderframeworkonEventServiceRole89300FAD" + ] + }, + "IngressPinger1AD9E831": { + "Type": "AWS::CloudFormation::CustomResource", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "IngressPingerProviderframeworkonEventEE5AD360", + "Arn" + ] + }, + "Url": { + "Fn::Join": [ + "", + [ + "http://", + { "Fn::GetAtt": [ - "IngressPinger1AD9E831", - "Value" + "Clusterhelloserverdeploymentserviceingressc896bd7eLoadBalancerAddress142F1CB0", + "Value" ] - } + } + ] + ] } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Outputs": { + "ClusterConfigCommand43AAE40F": { + "Value": { + "Fn::Join": [ + "", + [ + "aws eks update-kubeconfig --name ", + { + "Ref": "Cluster9EE0221C" + }, + " --region ", + { + "Ref": "AWS::Region" + }, + " --role-arn ", + { + "Fn::GetAtt": [ + "ClusterMastersRole9AA35625", + "Arn" + ] + } + ] + ] + } }, - "Parameters": { - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { - "Type": "String", - "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { - "Type": "String", - "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { - "Type": "String", - "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348": { - "Type": "String", - "Description": "S3 bucket for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219": { - "Type": "String", - "Description": "S3 key for asset version \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6ArtifactHash62A6950B": { - "Type": "String", - "Description": "Artifact hash for asset \"4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6\"" - }, - "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket40DFAF90": { - "Type": "String", - "Description": "S3 bucket for asset \"8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9\"" - }, - "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey36104212": { - "Type": "String", - "Description": "S3 key for asset version \"8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9\"" - }, - "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9ArtifactHash26B5BCAA": { - "Type": "String", - "Description": "Artifact hash for asset \"8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9\"" - }, - "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket9BDF5881": { - "Type": "String", - "Description": "S3 bucket for asset \"07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963\"" - }, - "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKey63AC53A2": { - "Type": "String", - "Description": "S3 key for asset version \"07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963\"" - }, - "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963ArtifactHash41646C3F": { - "Type": "String", - "Description": "Artifact hash for asset \"07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963\"" - }, - "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3Bucket16472AE2": { - "Type": "String", - "Description": "S3 bucket for asset \"8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a\"" - }, - "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyFAAA537A": { - "Type": "String", - "Description": "S3 key for asset version \"8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a\"" - }, - "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aArtifactHash08E93340": { - "Type": "String", - "Description": "Artifact hash for asset \"8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a\"" - }, - "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3Bucket83B8778F": { - "Type": "String", - "Description": "S3 bucket for asset \"c6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffed\"" - }, - "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKeyADF6A055": { - "Type": "String", - "Description": "S3 key for asset version \"c6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffed\"" - }, - "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedArtifactHash2C972BAF": { - "Type": "String", - "Description": "Artifact hash for asset \"c6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffed\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156": { - "Type": "String", - "Description": "S3 bucket for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC": { - "Type": "String", - "Description": "S3 key for asset version \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2ArtifactHashCA4A1831": { - "Type": "String", - "Description": "Artifact hash for asset \"5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959": { - "Type": "String", - "Description": "S3 bucket for asset \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E": { - "Type": "String", - "Description": "S3 key for asset version \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4ArtifactHash4D5DD9E9": { - "Type": "String", - "Description": "Artifact hash for asset \"f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4\"" - }, - "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3BucketA6642550": { - "Type": "String", - "Description": "S3 bucket for asset \"5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636d\"" - }, - "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3VersionKeyFEC50F65": { - "Type": "String", - "Description": "S3 key for asset version \"5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636d\"" - }, - "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dArtifactHashBEC87846": { - "Type": "String", - "Description": "Artifact hash for asset \"5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636d\"" - }, - "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3Bucket99CE547F": { - "Type": "String", - "Description": "S3 bucket for asset \"04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25\"" - }, - "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3VersionKey7C7ADEAE": { - "Type": "String", - "Description": "S3 key for asset version \"04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25\"" - }, - "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25ArtifactHash47FA3637": { - "Type": "String", - "Description": "Artifact hash for asset \"04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25\"" - }, - "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3Bucket788867B6": { - "Type": "String", - "Description": "S3 bucket for asset \"7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054\"" - }, - "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3VersionKey0A2E0327": { - "Type": "String", - "Description": "S3 key for asset version \"7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054\"" - }, - "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054ArtifactHashE46B18D1": { - "Type": "String", - "Description": "Artifact hash for asset \"7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054\"" - } + "ClusterGetTokenCommand06AE992E": { + "Value": { + "Fn::Join": [ + "", + [ + "aws eks get-token --cluster-name ", + { + "Ref": "Cluster9EE0221C" + }, + " --region ", + { + "Ref": "AWS::Region" + }, + " --role-arn ", + { + "Fn::GetAtt": [ + "ClusterMastersRole9AA35625", + "Arn" + ] + } + ] + ] + } + }, + "IngressPingerResponse": { + "Value": { + "Fn::GetAtt": [ + "IngressPinger1AD9E831", + "Value" + ] + } + } + }, + "Parameters": { + "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3Bucket4E7CD097": { + "Type": "String", + "Description": "S3 bucket for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" + }, + "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeS3VersionKey93D16224": { + "Type": "String", + "Description": "S3 key for asset version \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" + }, + "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE": { + "Type": "String", + "Description": "Artifact hash for asset \"4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06ee\"" + }, + "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket60C6EC09": { + "Type": "String", + "Description": "S3 bucket for asset \"2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6\"" + }, + "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKey8076CD69": { + "Type": "String", + "Description": "S3 key for asset version \"2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6\"" + }, + "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6ArtifactHashA9858604": { + "Type": "String", + "Description": "Artifact hash for asset \"2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6\"" + }, + "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3Bucket6F10C3DB": { + "Type": "String", + "Description": "S3 bucket for asset \"17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4\"" + }, + "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKey63833CCE": { + "Type": "String", + "Description": "S3 key for asset version \"17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4\"" + }, + "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4ArtifactHashD9DF5967": { + "Type": "String", + "Description": "Artifact hash for asset \"17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4\"" + }, + "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3BucketE22E9B3C": { + "Type": "String", + "Description": "S3 bucket for asset \"d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb\"" + }, + "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKey1CD5C166": { + "Type": "String", + "Description": "S3 key for asset version \"d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb\"" + }, + "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbArtifactHashD09449E8": { + "Type": "String", + "Description": "Artifact hash for asset \"d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb\"" + }, + "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket3D77F5D6": { + "Type": "String", + "Description": "S3 bucket for asset \"823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66\"" + }, + "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKeyDC273027": { + "Type": "String", + "Description": "S3 key for asset version \"823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66\"" + }, + "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66ArtifactHash86D49401": { + "Type": "String", + "Description": "Artifact hash for asset \"823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66\"" + }, + "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3Bucket83B8778F": { + "Type": "String", + "Description": "S3 bucket for asset \"c6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffed\"" + }, + "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKeyADF6A055": { + "Type": "String", + "Description": "S3 key for asset version \"c6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffed\"" + }, + "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedArtifactHash2C972BAF": { + "Type": "String", + "Description": "Artifact hash for asset \"c6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffed\"" + }, + "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7S3Bucket1537AE9B": { + "Type": "String", + "Description": "S3 bucket for asset \"78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7\"" + }, + "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7S3VersionKey196887A9": { + "Type": "String", + "Description": "S3 key for asset version \"78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7\"" + }, + "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7ArtifactHash366D00AC": { + "Type": "String", + "Description": "Artifact hash for asset \"78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7\"" + }, + "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2S3Bucket61ECA0AB": { + "Type": "String", + "Description": "S3 bucket for asset \"2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2\"" + }, + "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2S3VersionKey38DF8B25": { + "Type": "String", + "Description": "S3 key for asset version \"2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2\"" + }, + "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2ArtifactHash21C62C47": { + "Type": "String", + "Description": "Artifact hash for asset \"2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2\"" + }, + "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3BucketA6642550": { + "Type": "String", + "Description": "S3 bucket for asset \"5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636d\"" + }, + "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dS3VersionKeyFEC50F65": { + "Type": "String", + "Description": "S3 key for asset version \"5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636d\"" + }, + "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dArtifactHashBEC87846": { + "Type": "String", + "Description": "Artifact hash for asset \"5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636d\"" + }, + "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3Bucket489AAFE4": { + "Type": "String", + "Description": "S3 bucket for asset \"7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0\"" + }, + "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3VersionKey00EB8998": { + "Type": "String", + "Description": "S3 key for asset version \"7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0\"" + }, + "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0ArtifactHashDD71C7F5": { + "Type": "String", + "Description": "Artifact hash for asset \"7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0\"" + }, + "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3BucketCF1053D7": { + "Type": "String", + "Description": "S3 bucket for asset \"47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be\"" + }, + "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3VersionKey4749F23A": { + "Type": "String", + "Description": "S3 key for asset version \"47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be\"" + }, + "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beArtifactHash6B485FE8": { + "Type": "String", + "Description": "Artifact hash for asset \"47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be\"" } -} + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksClusterResourceProvider5DBBAFBB.nested.template.json b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksClusterResourceProvider5DBBAFBB.nested.template.json index e2a91d2b12f37..130cdf7a4082d 100644 --- a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksClusterResourceProvider5DBBAFBB.nested.template.json +++ b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksClusterResourceProvider5DBBAFBB.nested.template.json @@ -103,7 +103,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref" }, "S3Key": { "Fn::Join": [ @@ -116,7 +116,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef" } ] } @@ -129,7 +129,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef" } ] } @@ -224,7 +224,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref" }, "S3Key": { "Fn::Join": [ @@ -237,7 +237,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef" } ] } @@ -250,7 +250,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef" } ] } @@ -391,7 +391,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef" }, "S3Key": { "Fn::Join": [ @@ -404,7 +404,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -417,7 +417,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -560,7 +560,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef" }, "S3Key": { "Fn::Join": [ @@ -573,7 +573,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -586,7 +586,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -726,7 +726,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef" }, "S3Key": { "Fn::Join": [ @@ -739,7 +739,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -752,7 +752,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -1033,16 +1033,16 @@ "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn": { "Type": "String" }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef": { + "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref": { "Type": "String" }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref": { + "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef": { "Type": "String" }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref": { + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef": { "Type": "String" }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref": { + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef": { "Type": "String" } } diff --git a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderA1AC28D1.nested.template.json b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderA1AC28D1.nested.template.json index 013c8c7bad98c..2da064d65d9cf 100644 --- a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderA1AC28D1.nested.template.json +++ b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderA1AC28D1.nested.template.json @@ -1,476 +1,476 @@ { - "Resources": { - "HandlerServiceRoleFCDC14AE": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - }, - "ManagedPolicyArns": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" - ] - ] - } - ] + "Resources": { + "HandlerServiceRoleFCDC14AE": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } } + ], + "Version": "2012-10-17" }, - "HandlerServiceRoleDefaultPolicyCBD0CC91": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "eks:DescribeCluster", - "Effect": "Allow", - "Resource": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64Arn" - } - }, - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Resource": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn" - } - } - ], - "Version": "2012-10-17" + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" }, - "PolicyName": "HandlerServiceRoleDefaultPolicyCBD0CC91", - "Roles": [ - { - "Ref": "HandlerServiceRoleFCDC14AE" - } - ] - } - }, - "Handler886CB40B": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket8DC8E5ACRef" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref" - } - ] - } - ] - } - ] - ] - } + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" }, - "Role": { - "Fn::GetAtt": [ - "HandlerServiceRoleFCDC14AE", - "Arn" - ] + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" }, - "Description": "onEvent handler for EKS kubectl resource provider", - "Handler": "index.handler", - "Layers": [ - { - "Ref": "AwsCliLayerF44AAF94" - }, + ":iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" + ] + ] + } + ] + } + }, + "HandlerServiceRoleDefaultPolicyCBD0CC91": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "eks:DescribeCluster", + "Effect": "Allow", + "Resource": { + "Ref": "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64Arn" + } + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": { + "Ref": "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "HandlerServiceRoleDefaultPolicyCBD0CC91", + "Roles": [ + { + "Ref": "HandlerServiceRoleFCDC14AE" + } + ] + } + }, + "Handler886CB40B": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3Bucket236E3AC4Ref" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, { - "Ref": "KubectlLayer600207B5" - } - ], - "MemorySize": 1024, - "Runtime": "python3.7", - "Timeout": 900, - "VpcConfig": { - "SecurityGroupIds": [ + "Fn::Split": [ + "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64ClusterSecurityGroupId" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef" } - ], - "SubnetIds": [ - { - "Ref": "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet1Subnet7C7DBEE5Ref" - }, + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet2Subnet7FBE197ERef" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef" } - ] + ] + } + ] } - }, - "DependsOn": [ - "HandlerServiceRoleDefaultPolicyCBD0CC91", - "HandlerServiceRoleFCDC14AE" + ] ] + } }, - "AwsCliLayerF44AAF94": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3BucketE1B85B28Ref" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/awscli/aws" - } + "Role": { + "Fn::GetAtt": [ + "HandlerServiceRoleFCDC14AE", + "Arn" + ] }, - "KubectlLayer600207B5": { - "Type": "AWS::Lambda::LayerVersion", - "Properties": { - "Content": { - "S3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3BucketCD1CB66DRef" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKey62FE5136Ref" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKey62FE5136Ref" - } - ] - } - ] - } - ] - ] - } - }, - "Description": "/opt/kubectl/kubectl and /opt/helm/helm" + "Description": "onEvent handler for EKS kubectl resource provider", + "Handler": "index.handler", + "Layers": [ + { + "Ref": "AwsCliLayerF44AAF94" + }, + { + "Ref": "KubectlLayer600207B5" + } + ], + "MemorySize": 1024, + "Runtime": "python3.7", + "Timeout": 900, + "VpcConfig": { + "SecurityGroupIds": [ + { + "Ref": "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64ClusterSecurityGroupId" } - }, - "ProviderframeworkonEventServiceRole9FF04296": { - "Type": "AWS::IAM::Role", - "Properties": { - "AssumeRolePolicyDocument": { - "Statement": [ + ], + "SubnetIds": [ + { + "Ref": "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet1Subnet7C7DBEE5Ref" + }, + { + "Ref": "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet2Subnet7FBE197ERef" + } + ] + } + }, + "DependsOn": [ + "HandlerServiceRoleDefaultPolicyCBD0CC91", + "HandlerServiceRoleFCDC14AE" + ] + }, + "AwsCliLayerF44AAF94": { + "Type": "AWS::Lambda::LayerVersion", + "Properties": { + "Content": { + "S3Bucket": { + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket57CCB5B7Ref" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "lambda.amazonaws.com" - } + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref" } - ], - "Version": "2012-10-17" + ] + } + ] }, - "ManagedPolicyArns": [ + { + "Fn::Select": [ + 1, { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" - ] - ] + "Fn::Split": [ + "||", + { + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref" + } + ] } - ] - } + ] + } + ] + ] + } }, - "ProviderframeworkonEventServiceRoleDefaultPolicy48CD2133": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ + "Description": "/opt/awscli/aws" + } + }, + "KubectlLayer600207B5": { + "Type": "AWS::Lambda::LayerVersion", + "Properties": { + "Content": { + "S3Bucket": { + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3BucketCD1CB66DRef" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", { - "Action": "lambda:InvokeFunction", - "Effect": "Allow", - "Resource": [ - { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - }, - { - "Fn::Join": [ - "", - [ - { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - }, - ":*" - ] - ] - } - ] + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKey62FE5136Ref" } - ], - "Version": "2012-10-17" + ] + } + ] }, - "PolicyName": "ProviderframeworkonEventServiceRoleDefaultPolicy48CD2133", - "Roles": [ + { + "Fn::Select": [ + 1, { - "Ref": "ProviderframeworkonEventServiceRole9FF04296" + "Fn::Split": [ + "||", + { + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKey62FE5136Ref" + } + ] } - ] + ] + } + ] + ] + } + }, + "Description": "/opt/kubectl/kubectl and /opt/helm/helm" + } + }, + "ProviderframeworkonEventServiceRole9FF04296": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } } + ], + "Version": "2012-10-17" }, - "ProviderframeworkonEvent83C1D0A7": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref" - }, - "S3Key": { - "Fn::Join": [ - "", - [ - { - "Fn::Select": [ - 0, - { - "Fn::Split": [ - "||", - { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" - } - ] - } - ] - }, - { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "||", - { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" - } - ] - } - ] - } - ] - ] - } + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" }, - "Role": { - "Fn::GetAtt": [ - "ProviderframeworkonEventServiceRole9FF04296", - "Arn" - ] + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" }, - "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/Provider)", - "Environment": { - "Variables": { - "USER_ON_EVENT_FUNCTION_ARN": { - "Fn::GetAtt": [ - "Handler886CB40B", - "Arn" - ] - } - } + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + } + ] + } + }, + "ProviderframeworkonEventServiceRoleDefaultPolicy48CD2133": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "Handler886CB40B", + "Arn" + ] }, - "Handler": "framework.onEvent", - "Runtime": "nodejs14.x", - "Timeout": 900, - "VpcConfig": { - "SecurityGroupIds": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "Handler886CB40B", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ProviderframeworkonEventServiceRoleDefaultPolicy48CD2133", + "Roles": [ + { + "Ref": "ProviderframeworkonEventServiceRole9FF04296" + } + ] + } + }, + "ProviderframeworkonEvent83C1D0A7": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64ClusterSecurityGroupId" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } - ], - "SubnetIds": [ - { - "Ref": "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet1Subnet7C7DBEE5Ref" - }, + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet2Subnet7FBE197ERef" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } - ] + ] + } + ] } - }, - "DependsOn": [ - "ProviderframeworkonEventServiceRoleDefaultPolicy48CD2133", - "ProviderframeworkonEventServiceRole9FF04296" + ] ] - } - }, - "Outputs": { - "awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn": { - "Value": { - "Fn::GetAtt": [ - "ProviderframeworkonEvent83C1D0A7", - "Arn" - ] - } - } - }, - "Parameters": { - "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64Arn": { - "Type": "String" - }, - "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn": { - "Type": "String" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket8DC8E5ACRef": { - "Type": "String" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref": { - "Type": "String" - }, - "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet1Subnet7C7DBEE5Ref": { - "Type": "String" + } }, - "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet2Subnet7FBE197ERef": { - "Type": "String" + "Role": { + "Fn::GetAtt": [ + "ProviderframeworkonEventServiceRole9FF04296", + "Arn" + ] }, - "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64ClusterSecurityGroupId": { - "Type": "String" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3BucketE1B85B28Ref": { - "Type": "String" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref": { - "Type": "String" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3BucketCD1CB66DRef": { - "Type": "String" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKey62FE5136Ref": { - "Type": "String" - }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref": { - "Type": "String" + "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/Provider)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "Handler886CB40B", + "Arn" + ] + } + } }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref": { - "Type": "String" + "Handler": "framework.onEvent", + "Runtime": "nodejs14.x", + "Timeout": 900, + "VpcConfig": { + "SecurityGroupIds": [ + { + "Ref": "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64ClusterSecurityGroupId" + } + ], + "SubnetIds": [ + { + "Ref": "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet1Subnet7C7DBEE5Ref" + }, + { + "Ref": "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet2Subnet7FBE197ERef" + } + ] } + }, + "DependsOn": [ + "ProviderframeworkonEventServiceRoleDefaultPolicy48CD2133", + "ProviderframeworkonEventServiceRole9FF04296" + ] + } + }, + "Outputs": { + "awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderframeworkonEvent4AFC769CArn": { + "Value": { + "Fn::GetAtt": [ + "ProviderframeworkonEvent83C1D0A7", + "Arn" + ] + } + } + }, + "Parameters": { + "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64Arn": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3Bucket236E3AC4Ref": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet1Subnet7C7DBEE5Ref": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet2Subnet7FBE197ERef": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64ClusterSecurityGroupId": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket57CCB5B7Ref": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3BucketCD1CB66DRef": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKey62FE5136Ref": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef": { + "Type": "String" + }, + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef": { + "Type": "String" } -} + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/integ.json b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/integ.json index c0a384dd68d84..67225d8fb85b4 100644 --- a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { "version": "20.0.0", "testCases": { - "@aws-cdk/aws-eks/test/integ.alb-controller": { + "integ.alb-controller": { "stacks": [ "aws-cdk-eks-cluster-alb-controller-test" ], diff --git a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/manifest.json index 2c14303948d9d..599dc49fccc1c 100644 --- a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/manifest.json @@ -31,49 +31,49 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6", - "id": "4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6", + "path": "asset.2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6", + "id": "2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6", "packaging": "zip", - "sourceHash": "4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6", - "s3BucketParameter": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348", - "s3KeyParameter": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219", - "artifactHashParameter": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6ArtifactHash62A6950B" + "sourceHash": "2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6", + "s3BucketParameter": "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket60C6EC09", + "s3KeyParameter": "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKey8076CD69", + "artifactHashParameter": "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6ArtifactHashA9858604" } }, { "type": "aws:cdk:asset", "data": { - "path": "asset.8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9", - "id": "8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9", + "path": "asset.17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4", + "id": "17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4", "packaging": "zip", - "sourceHash": "8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9", - "s3BucketParameter": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket40DFAF90", - "s3KeyParameter": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey36104212", - "artifactHashParameter": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9ArtifactHash26B5BCAA" + "sourceHash": "17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4", + "s3BucketParameter": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3Bucket6F10C3DB", + "s3KeyParameter": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKey63833CCE", + "artifactHashParameter": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4ArtifactHashD9DF5967" } }, { "type": "aws:cdk:asset", "data": { - "path": "asset.07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963", - "id": "07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963", + "path": "asset.d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb", + "id": "d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb", "packaging": "zip", - "sourceHash": "07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963", - "s3BucketParameter": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket9BDF5881", - "s3KeyParameter": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKey63AC53A2", - "artifactHashParameter": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963ArtifactHash41646C3F" + "sourceHash": "d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb", + "s3BucketParameter": "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3BucketE22E9B3C", + "s3KeyParameter": "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKey1CD5C166", + "artifactHashParameter": "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbArtifactHashD09449E8" } }, { "type": "aws:cdk:asset", "data": { - "path": "asset.8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a.zip", - "id": "8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a", + "path": "asset.823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66.zip", + "id": "823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66", "packaging": "file", - "sourceHash": "8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a", - "s3BucketParameter": "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3Bucket16472AE2", - "s3KeyParameter": "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyFAAA537A", - "artifactHashParameter": "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aArtifactHash08E93340" + "sourceHash": "823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66", + "s3BucketParameter": "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket3D77F5D6", + "s3KeyParameter": "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKeyDC273027", + "artifactHashParameter": "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66ArtifactHash86D49401" } }, { @@ -91,25 +91,25 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2", - "id": "5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2", + "path": "asset.78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7", + "id": "78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7", "packaging": "zip", - "sourceHash": "5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2", - "s3BucketParameter": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156", - "s3KeyParameter": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC", - "artifactHashParameter": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2ArtifactHashCA4A1831" + "sourceHash": "78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7", + "s3BucketParameter": "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7S3Bucket1537AE9B", + "s3KeyParameter": "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7S3VersionKey196887A9", + "artifactHashParameter": "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7ArtifactHash366D00AC" } }, { "type": "aws:cdk:asset", "data": { - "path": "asset.f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4", - "id": "f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4", + "path": "asset.2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2", + "id": "2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2", "packaging": "zip", - "sourceHash": "f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4", - "s3BucketParameter": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959", - "s3KeyParameter": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E", - "artifactHashParameter": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4ArtifactHash4D5DD9E9" + "sourceHash": "2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2", + "s3BucketParameter": "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2S3Bucket61ECA0AB", + "s3KeyParameter": "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2S3VersionKey38DF8B25", + "artifactHashParameter": "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2ArtifactHash21C62C47" } }, { @@ -128,24 +128,24 @@ "type": "aws:cdk:asset", "data": { "path": "awscdkeksclusteralbcontrollertestawscdkawseksClusterResourceProvider5DBBAFBB.nested.template.json", - "id": "04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25", + "id": "7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0", "packaging": "file", - "sourceHash": "04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25", - "s3BucketParameter": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3Bucket99CE547F", - "s3KeyParameter": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3VersionKey7C7ADEAE", - "artifactHashParameter": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25ArtifactHash47FA3637" + "sourceHash": "7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0", + "s3BucketParameter": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3Bucket489AAFE4", + "s3KeyParameter": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3VersionKey00EB8998", + "artifactHashParameter": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0ArtifactHashDD71C7F5" } }, { "type": "aws:cdk:asset", "data": { "path": "awscdkeksclusteralbcontrollertestawscdkawseksKubectlProviderA1AC28D1.nested.template.json", - "id": "7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054", + "id": "47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be", "packaging": "file", - "sourceHash": "7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054", - "s3BucketParameter": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3Bucket788867B6", - "s3KeyParameter": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3VersionKey0A2E0327", - "artifactHashParameter": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054ArtifactHashE46B18D1" + "sourceHash": "47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be", + "s3BucketParameter": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3BucketCF1053D7", + "s3KeyParameter": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3VersionKey4749F23A", + "artifactHashParameter": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beArtifactHash6B485FE8" } } ], @@ -509,28 +509,28 @@ "data": "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn" } ], - "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef": [ + "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref": [ { "type": "aws:cdk:logicalId", - "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef" + "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref" } ], - "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref": [ + "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef": [ { "type": "aws:cdk:logicalId", - "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref" + "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef" } ], - "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref": [ + "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef": [ { "type": "aws:cdk:logicalId", - "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref" + "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef" } ], - "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref": [ + "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef": [ { "type": "aws:cdk:logicalId", - "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ], "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider.NestedStack/@aws-cdk--aws-eks.ClusterResourceProvider.NestedStackResource": [ @@ -557,76 +557,76 @@ "data": "AssetParameters4288ebb3652acdf2d828b7db7ca44a7162a401ace50ebb4026e84b18a02a06eeArtifactHash515E16AE" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6/S3Bucket": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348" + "data": "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket60C6EC09" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6/S3VersionKey": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219" + "data": "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKey8076CD69" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6/ArtifactHash": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6ArtifactHash62A6950B" + "data": "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6ArtifactHashA9858604" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9/S3Bucket": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket40DFAF90" + "data": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3Bucket6F10C3DB" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9/S3VersionKey": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey36104212" + "data": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKey63833CCE" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9/ArtifactHash": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9ArtifactHash26B5BCAA" + "data": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4ArtifactHashD9DF5967" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963/S3Bucket": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket9BDF5881" + "data": "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3BucketE22E9B3C" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963/S3VersionKey": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKey63AC53A2" + "data": "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKey1CD5C166" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963/ArtifactHash": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963ArtifactHash41646C3F" + "data": "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbArtifactHashD09449E8" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a/S3Bucket": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3Bucket16472AE2" + "data": "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket3D77F5D6" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a/S3VersionKey": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyFAAA537A" + "data": "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKeyDC273027" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a/ArtifactHash": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aArtifactHash08E93340" + "data": "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66ArtifactHash86D49401" } ], "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/c6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffed/S3Bucket": [ @@ -647,40 +647,40 @@ "data": "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedArtifactHash2C972BAF" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2/S3Bucket": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3Bucket211A9156" + "data": "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7S3Bucket1537AE9B" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2/S3VersionKey": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2S3VersionKey822D04EC" + "data": "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7S3VersionKey196887A9" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2/ArtifactHash": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2ArtifactHashCA4A1831" + "data": "AssetParameters78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7ArtifactHash366D00AC" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4/S3Bucket": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3Bucket6F458959" + "data": "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2S3Bucket61ECA0AB" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4/S3VersionKey": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4S3VersionKeyBDD0572E" + "data": "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2S3VersionKey38DF8B25" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4/ArtifactHash": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersf850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4ArtifactHash4D5DD9E9" + "data": "AssetParameters2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2ArtifactHash21C62C47" } ], "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636d/S3Bucket": [ @@ -701,40 +701,40 @@ "data": "AssetParameters5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636dArtifactHashBEC87846" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25/S3Bucket": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3Bucket99CE547F" + "data": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3Bucket489AAFE4" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25/S3VersionKey": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3VersionKey7C7ADEAE" + "data": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3VersionKey00EB8998" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25/ArtifactHash": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25ArtifactHash47FA3637" + "data": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0ArtifactHashDD71C7F5" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054/S3Bucket": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3Bucket788867B6" + "data": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3BucketCF1053D7" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054/S3VersionKey": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3VersionKey0A2E0327" + "data": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3VersionKey4749F23A" } ], - "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054/ArtifactHash": [ + "/aws-cdk-eks-cluster-alb-controller-test/AssetParameters/47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054ArtifactHashE46B18D1" + "data": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beArtifactHash6B485FE8" } ], "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/Handler/ServiceRole/Resource": [ @@ -803,16 +803,16 @@ "data": "referencetoawscdkeksclusteralbcontrollertestClusterCreationRoleA16C24E9Arn" } ], - "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket8DC8E5ACRef": [ + "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3Bucket236E3AC4Ref": [ { "type": "aws:cdk:logicalId", - "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket8DC8E5ACRef" + "data": "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3Bucket236E3AC4Ref" } ], - "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref": [ + "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef": [ { "type": "aws:cdk:logicalId", - "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref" + "data": "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef" } ], "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestVpcPrivateSubnet1Subnet7C7DBEE5Ref": [ @@ -833,16 +833,16 @@ "data": "referencetoawscdkeksclusteralbcontrollertestCluster80A60A64ClusterSecurityGroupId" } ], - "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3BucketE1B85B28Ref": [ + "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket57CCB5B7Ref": [ { "type": "aws:cdk:logicalId", - "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3BucketE1B85B28Ref" + "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket57CCB5B7Ref" } ], - "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref": [ + "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref": [ { "type": "aws:cdk:logicalId", - "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref" + "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref" } ], "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3BucketCD1CB66DRef": [ @@ -857,16 +857,16 @@ "data": "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKey62FE5136Ref" } ], - "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref": [ + "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef": [ { "type": "aws:cdk:logicalId", - "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref" + "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef" } ], - "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref": [ + "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef": [ { "type": "aws:cdk:logicalId", - "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "data": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ], "/aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider.NestedStack/@aws-cdk--aws-eks.KubectlProvider.NestedStackResource": [ @@ -981,4 +981,4 @@ "displayName": "aws-cdk-eks-cluster-alb-controller-test" } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/tree.json b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/tree.json index fa09fe14a63e3..c1db351f9acbd 100644 --- a/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-eks/test/alb-controller.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "aws-cdk-eks-cluster-alb-controller-test": { @@ -896,7 +896,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "KubectlReadyBarrier": { @@ -1462,7 +1462,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref" }, "s3Key": { "Fn::Join": [ @@ -1475,7 +1475,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef" } ] } @@ -1488,7 +1488,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef" } ] } @@ -1659,7 +1659,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref" }, "s3Key": { "Fn::Join": [ @@ -1672,7 +1672,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef" } ] } @@ -1685,7 +1685,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef" } ] } @@ -1906,7 +1906,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef" }, "s3Key": { "Fn::Join": [ @@ -1919,7 +1919,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -1932,7 +1932,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -2151,7 +2151,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef" }, "s3Key": { "Fn::Join": [ @@ -2164,7 +2164,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -2177,7 +2177,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -2393,7 +2393,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef" }, "s3Key": { "Fn::Join": [ @@ -2406,7 +2406,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -2419,7 +2419,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -2606,7 +2606,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } } }, @@ -2655,33 +2655,33 @@ "version": "0.0.0" } }, - "reference-to-awscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef": { - "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef", - "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef", + "reference-to-awscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref": { + "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref", + "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" } }, - "reference-to-awscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref": { - "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref", - "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref", + "reference-to-awscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef": { + "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef", + "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" } }, - "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref": { - "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref", - "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref", + "reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef": { + "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef", + "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" } }, - "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref": { - "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref", - "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref", + "reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef": { + "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef", + "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.ClusterResourceProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2717,7 +2717,7 @@ }, "/", { - "Ref": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3Bucket99CE547F" + "Ref": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3Bucket489AAFE4" }, "/", { @@ -2727,7 +2727,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3VersionKey7C7ADEAE" + "Ref": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3VersionKey00EB8998" } ] } @@ -2740,7 +2740,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25S3VersionKey7C7ADEAE" + "Ref": "AssetParameters7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0S3VersionKey00EB8998" } ] } @@ -2762,17 +2762,17 @@ "Arn" ] }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket36B2341ERef": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3Bucket5017D348" + "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket91CA72C6Ref": { + "Ref": "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3Bucket60C6EC09" }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKey9CC8F804Ref": { - "Ref": "AssetParameters4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6S3VersionKeyAC941219" + "referencetoawscdkeksclusteralbcontrollertestAssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKeyE9C2BB9ARef": { + "Ref": "AssetParameters2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6S3VersionKey8076CD69" }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref": { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket40DFAF90" + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef": { + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3Bucket6F10C3DB" }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref": { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey36104212" + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef": { + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKey63833CCE" } } } @@ -2785,7 +2785,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "AssetParameters": { @@ -2823,16 +2823,16 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, - "4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6": { - "id": "4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6", + "2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6": { + "id": "2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6/S3Bucket", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2840,7 +2840,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6/S3VersionKey", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2848,7 +2848,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/4b85e8c141d9b886acbf891007402913e39574073ba1f533288a75c9f56082c6/ArtifactHash", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2c98a634e36e3f2a1c1a78958953ed173e2c6cf8446c15dabbef67d4e30b33d6/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2857,16 +2857,16 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, - "8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9": { - "id": "8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9", + "17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4": { + "id": "17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9/S3Bucket", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2874,7 +2874,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9/S3VersionKey", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2882,7 +2882,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9/ArtifactHash", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2891,16 +2891,16 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, - "07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963": { - "id": "07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963", + "d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb": { + "id": "d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963/S3Bucket", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2908,7 +2908,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963/S3VersionKey", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2916,7 +2916,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963/ArtifactHash", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/d01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcb/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2925,16 +2925,16 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, - "8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a": { - "id": "8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a", + "823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66": { + "id": "823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a/S3Bucket", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2942,7 +2942,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a/S3VersionKey", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2950,7 +2950,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6a/ArtifactHash", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -2959,7 +2959,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "c6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffed": { @@ -2993,16 +2993,16 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, - "5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2": { - "id": "5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2", + "78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7": { + "id": "78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2/S3Bucket", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3010,7 +3010,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2/S3VersionKey", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3018,7 +3018,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/5507835727e005832a615aef2a6b437860f432c6cd052d07c0244464aedbe2b2/ArtifactHash", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/78989d876411e582ce92577de10ee129b12c1f09d8b77f9f45ce2b97cb53bad7/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3027,16 +3027,16 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, - "f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4": { - "id": "f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4", + "2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2": { + "id": "2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4/S3Bucket", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3044,7 +3044,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4/S3VersionKey", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3052,7 +3052,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/f850d967c52a5f64e6436dc84abdde4d86197f2a0871f5ab27c79647a91d0bf4/ArtifactHash", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/2e7c728134413d1ae7e15a07f641cbe8df88e0260e1a11a26305b89cb2fd5eb2/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3061,7 +3061,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "5f49893093e1ad14831626016699156d48da5f0890f19eb930bc3c46cf5f636d": { @@ -3095,16 +3095,16 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, - "04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25": { - "id": "04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25", + "7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0": { + "id": "7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25/S3Bucket", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3112,7 +3112,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25/S3VersionKey", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3120,7 +3120,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/04426ea747b0d60c7bf1cb76ea9f65467e883a3a0439d59f12b13c798fef6b25/ArtifactHash", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7089b0263b30945cd9bef5f3b44cd31bf33544a4f9d5f8d7c8410707cc2625f0/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3129,16 +3129,16 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, - "7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054": { - "id": "7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054", + "47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be": { + "id": "47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054/S3Bucket", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3146,7 +3146,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054/S3VersionKey", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3154,7 +3154,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054/ArtifactHash", + "path": "aws-cdk-eks-cluster-alb-controller-test/AssetParameters/47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12be/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3163,13 +3163,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "@aws-cdk--aws-eks.KubectlProvider": { @@ -3335,7 +3335,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket8DC8E5ACRef" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3Bucket236E3AC4Ref" }, "s3Key": { "Fn::Join": [ @@ -3348,7 +3348,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef" } ] } @@ -3361,7 +3361,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef" } ] } @@ -3456,7 +3456,7 @@ "aws:cdk:cloudformation:props": { "content": { "s3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3BucketE1B85B28Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket57CCB5B7Ref" }, "s3Key": { "Fn::Join": [ @@ -3469,7 +3469,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref" } ] } @@ -3482,7 +3482,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref" } ] } @@ -3757,7 +3757,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef" }, "s3Key": { "Fn::Join": [ @@ -3770,7 +3770,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -3783,7 +3783,7 @@ "Fn::Split": [ "||", { - "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref" + "Ref": "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef" } ] } @@ -3871,17 +3871,17 @@ "version": "0.0.0" } }, - "reference-to-awscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket8DC8E5ACRef": { - "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket8DC8E5ACRef", - "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket8DC8E5ACRef", + "reference-to-awscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3Bucket236E3AC4Ref": { + "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3Bucket236E3AC4Ref", + "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3Bucket236E3AC4Ref", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" } }, - "reference-to-awscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref": { - "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref", - "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref", + "reference-to-awscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef": { + "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef", + "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3911,17 +3911,17 @@ "version": "0.0.0" } }, - "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3BucketE1B85B28Ref": { - "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3BucketE1B85B28Ref", - "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3BucketE1B85B28Ref", + "reference-to-awscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket57CCB5B7Ref": { + "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket57CCB5B7Ref", + "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket57CCB5B7Ref", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" } }, - "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref": { - "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref", - "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref", + "reference-to-awscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref": { + "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref", + "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3943,17 +3943,17 @@ "version": "0.0.0" } }, - "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref": { - "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref", - "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref", + "reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef": { + "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef", + "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" } }, - "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref": { - "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref", - "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref", + "reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef": { + "id": "reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef", + "path": "aws-cdk-eks-cluster-alb-controller-test/@aws-cdk--aws-eks.KubectlProvider/reference-to-awscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -3989,7 +3989,7 @@ }, "/", { - "Ref": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3Bucket788867B6" + "Ref": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3BucketCF1053D7" }, "/", { @@ -3999,7 +3999,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3VersionKey0A2E0327" + "Ref": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3VersionKey4749F23A" } ] } @@ -4012,7 +4012,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters7b03089df0c233e6e942804a155dc21fd88312ad74f12df8304a3962b30b2054S3VersionKey0A2E0327" + "Ref": "AssetParameters47b2248a19074f8a2cad34aedb63fab9582b2b7d7d7502a19b40b4720aad12beS3VersionKey4749F23A" } ] } @@ -4034,11 +4034,11 @@ "Arn" ] }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket8DC8E5ACRef": { - "Ref": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3Bucket9BDF5881" + "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3Bucket236E3AC4Ref": { + "Ref": "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3BucketE22E9B3C" }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKeyCFE72E26Ref": { - "Ref": "AssetParameters07a1c6a504be72dba3e9bc5b12cc2b5b0e83ea5c6ba10a4128da5c2180f3f963S3VersionKey63AC53A2" + "referencetoawscdkeksclusteralbcontrollertestAssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKeyAEAE833ARef": { + "Ref": "AssetParametersd01d4b7367b49a3e222279017fe50e41d6b2272d436b2e82038d0036deb2cdcbS3VersionKey1CD5C166" }, "referencetoawscdkeksclusteralbcontrollertestVpcPrivateSubnet1Subnet7C7DBEE5Ref": { "Ref": "VpcPrivateSubnet1Subnet536B997A" @@ -4052,11 +4052,11 @@ "ClusterSecurityGroupId" ] }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3BucketE1B85B28Ref": { - "Ref": "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3Bucket16472AE2" + "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket57CCB5B7Ref": { + "Ref": "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3Bucket3D77F5D6" }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyB62E4CB0Ref": { - "Ref": "AssetParameters8ad7bbf8be94e05d569da95ddb82511dcc959f25054825394cbb86028ccd1b6aS3VersionKeyFAAA537A" + "referencetoawscdkeksclusteralbcontrollertestAssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKey70E6E5A8Ref": { + "Ref": "AssetParameters823f6b284b7398541ad875711f17011724c206ee7fbbd046c66f171875c66c66S3VersionKeyDC273027" }, "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3BucketCD1CB66DRef": { "Ref": "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3Bucket83B8778F" @@ -4064,11 +4064,11 @@ "referencetoawscdkeksclusteralbcontrollertestAssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKey62FE5136Ref": { "Ref": "AssetParametersc6964dbf0c556ec82ce09622e99ad6f6d4e488cdaac0ef9e8492e078ec61ffedS3VersionKeyADF6A055" }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket7C737781Ref": { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket40DFAF90" + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3BucketB977836BRef": { + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3Bucket6F10C3DB" }, - "referencetoawscdkeksclusteralbcontrollertestAssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey16C09CC3Ref": { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey36104212" + "referencetoawscdkeksclusteralbcontrollertestAssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKeyBD6E9BCCRef": { + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKey63833CCE" } } } @@ -4081,7 +4081,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "awscdkeksclusteralbcontrollertestCluster481F6464-AlbController": { @@ -4868,7 +4868,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3Bucket40DFAF90" + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3Bucket6F10C3DB" }, "s3Key": { "Fn::Join": [ @@ -4881,7 +4881,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey36104212" + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKey63833CCE" } ] } @@ -4894,7 +4894,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters8dd02cc4ac473ca5b08800e92edaa31a1a7db4005928021d029c5363584f11b9S3VersionKey36104212" + "Ref": "AssetParameters17c0be82fb1da35c7fbdc66a4691ac936add9a711b625b52c466d78bd07524c4S3VersionKey63833CCE" } ] } @@ -4964,7 +4964,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "IngressPingerResponse": { @@ -4987,4 +4987,4 @@ "version": "0.0.0" } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/test/cluster.test.ts b/packages/@aws-cdk/aws-eks/test/cluster.test.ts index bd670b6cc9d61..1f6ba84fc20fa 100644 --- a/packages/@aws-cdk/aws-eks/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-eks/test/cluster.test.ts @@ -91,8 +91,6 @@ describe('cluster', () => { vpcSubnets: [{ subnetType: ec2.SubnetType.PUBLIC }], }); }).toThrow(/Cannot place cluster handler in the VPC since no private subnets could be selected/); - - }); test('throws when provided `clusterHandlerSecurityGroup` without `placeClusterHandlerInVpc: true`', () => { @@ -129,8 +127,6 @@ describe('cluster', () => { privateSubnetIds, isolatedSubnetIds, }); - - }); test('throws if selecting more than one subnet group', () => { @@ -140,8 +136,6 @@ describe('cluster', () => { defaultCapacity: 0, version: eks.KubernetesVersion.V1_21, })).toThrow(/cannot select multiple subnet groups/); - - }); test('synthesis works if only one subnet group is selected', () => { @@ -221,7 +215,6 @@ describe('cluster', () => { const clusterSg = cluster.clusterSecurityGroup; expect(clusterSg.securityGroupId).toEqual(clusterSgId); - }); test('cluster security group is attached when adding self-managed nodes', () => { @@ -351,7 +344,6 @@ describe('cluster', () => { cluster.connectAutoScalingGroupCapacity(selfManaged, { spotInterruptHandler: false }); expect(cluster.node.findAll().filter(c => c.node.id === 'chart-spot-interrupt-handler').length).toEqual(0); - }); test('throws when a non cdk8s chart construct is added as cdk8s chart', () => { @@ -439,8 +431,6 @@ describe('cluster', () => { { 'Fn::GetAtt': ['Cluster9EE0221C', 'ClusterSecurityGroupId'] }, { 'Fn::GetAtt': ['ClusterControlPlaneSecurityGroupD274242C', 'GroupId'] }, ]); - - }); test('can declare a security group from a different stack', () => { @@ -528,8 +518,6 @@ describe('cluster', () => { // make sure we can synth (no circular dependencies between the stacks) app.synth(); - - }); test('can declare a chart with a token from a different stack than the cluster that depends on the cluster stack', () => { @@ -571,8 +559,6 @@ describe('cluster', () => { // make sure we can synth (no circular dependencies between the stacks) app.synth(); - - }); test('can declare a HelmChart in a different stack than the cluster', () => { @@ -605,8 +591,6 @@ describe('cluster', () => { // make sure we can synth (no circular dependencies between the stacks) app.synth(); - - }); test('throws when declaring an ASG role in a different stack than the cluster', () => { @@ -651,8 +635,6 @@ describe('cluster', () => { }).toThrow( 'CapacityStack/autoScaling/InstanceRole should be defined in the scope of the ClusterStack stack to prevent circular dependencies', ); - - }); test('can declare a ServiceAccount in a different stack than the cluster', () => { @@ -683,8 +665,6 @@ describe('cluster', () => { // make sure we can synth (no circular dependencies between the stacks) app.synth(); - - }); test('a default cluster spans all subnets', () => { @@ -741,7 +721,6 @@ describe('cluster', () => { // THEN Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPC', Match.anyValue()); - }); describe('default capacity', () => { @@ -765,7 +744,6 @@ describe('cluster', () => { MinSize: 2, }, }); - }); test('quantity and type can be customized', () => { @@ -790,7 +768,6 @@ describe('cluster', () => { }, }); // expect(stack).toHaveResource('AWS::AutoScaling::LaunchConfiguration', { InstanceType: 'm2.xlarge' })); - }); test('defaultCapacity=0 will not allocate at all', () => { @@ -804,7 +781,6 @@ describe('cluster', () => { expect(cluster.defaultCapacity).toBeUndefined(); Template.fromStack(stack).resourceCountIs('AWS::AutoScaling::AutoScalingGroup', 0); Template.fromStack(stack).resourceCountIs('AWS::AutoScaling::LaunchConfiguration', 0); - }); }); @@ -824,8 +800,6 @@ describe('cluster', () => { { Key: 'Name', Value: 'Stack/VPC/PrivateSubnet1' }, ], }); - - }); test('creating a cluster tags the public VPC subnets', () => { @@ -845,8 +819,6 @@ describe('cluster', () => { { Key: 'Name', Value: 'Stack/VPC/PublicSubnet1' }, ], }); - - }); test('adding capacity creates an ASG without a rolling update policy', () => { @@ -899,8 +871,6 @@ describe('cluster', () => { }, ], }); - - }); test('create nodegroup with existing role', () => { @@ -933,7 +903,6 @@ describe('cluster', () => { MinSize: 10, }, }); - }); test('adding bottlerocket capacity creates an ASG with tags', () => { @@ -967,7 +936,6 @@ describe('cluster', () => { }, ], }); - }); test('adding bottlerocket capacity with bootstrapOptions throws error', () => { @@ -985,7 +953,6 @@ describe('cluster', () => { machineImageType: eks.MachineImageType.BOTTLEROCKET, bootstrapOptions: {}, })).toThrow(/bootstrapOptions is not supported for Bottlerocket/); - }); test('import cluster with existing kubectl provider function', () => { @@ -1133,8 +1100,6 @@ describe('cluster', () => { 'KubectlSubnet0', 'KubectlSubnet1', ]); - - }); test('exercise export/import', () => { @@ -1188,7 +1153,6 @@ describe('cluster', () => { }, }, }); - }); test('mastersRole can be used to map an IAM role to "system:masters"', () => { @@ -1230,8 +1194,6 @@ describe('cluster', () => { ], }, }); - - }); test('addManifest can be used to apply k8s manifests on this cluster', () => { @@ -1256,8 +1218,6 @@ describe('cluster', () => { Template.fromStack(stack).hasResourceProperties(eks.KubernetesManifest.RESOURCE_TYPE, { Manifest: '[{"bar":123},{"boor":[1,2,3]}]', }); - - }); test('kubectl resources can be created in a separate stack', () => { @@ -1293,8 +1253,6 @@ describe('cluster', () => { }, }, }); - - }); test('adding capacity will automatically map its IAM role', () => { @@ -1344,8 +1302,6 @@ describe('cluster', () => { ], }, }); - - }); test('addAutoScalingGroupCapacity will *not* map the IAM role if mapRole is false', () => { @@ -1389,7 +1345,6 @@ describe('cluster', () => { ], }, }); - }); describe('outputs', () => { @@ -1407,7 +1362,6 @@ describe('cluster', () => { ClusterConfigCommand43AAE40F: { Value: { 'Fn::Join': ['', ['aws eks update-kubeconfig --name ', { Ref: 'Cluster9EE0221C' }, ' --region us-east-1 --role-arn ', { 'Fn::GetAtt': ['ClusterMastersRole9AA35625', 'Arn'] }]] } }, ClusterGetTokenCommand06AE992E: { Value: { 'Fn::Join': ['', ['aws eks get-token --cluster-name ', { Ref: 'Cluster9EE0221C' }, ' --region us-east-1 --role-arn ', { 'Fn::GetAtt': ['ClusterMastersRole9AA35625', 'Arn'] }]] } }, }); - }); test('if masters role is defined, it should be included in the config command', () => { @@ -1429,7 +1383,6 @@ describe('cluster', () => { ClusterConfigCommand43AAE40F: { Value: { 'Fn::Join': ['', ['aws eks update-kubeconfig --name ', { Ref: 'Cluster9EE0221C' }, ' --region us-east-1 --role-arn ', { 'Fn::GetAtt': ['masters0D04F23D', 'Arn'] }]] } }, ClusterGetTokenCommand06AE992E: { Value: { 'Fn::Join': ['', ['aws eks get-token --cluster-name ', { Ref: 'Cluster9EE0221C' }, ' --region us-east-1 --role-arn ', { 'Fn::GetAtt': ['masters0D04F23D', 'Arn'] }]] } }, }); - }); test('if `outputConfigCommand=false` will disabled the output', () => { @@ -1449,7 +1402,6 @@ describe('cluster', () => { const assembly = app.synth(); const template = assembly.getStackByName(stack.stackName).template; expect(template.Outputs).toBeUndefined(); // no outputs - }); test('`outputClusterName` can be used to synthesize an output with the cluster name', () => { @@ -1470,7 +1422,6 @@ describe('cluster', () => { expect(template.Outputs).toEqual({ ClusterClusterNameEB26049E: { Value: { Ref: 'Cluster9EE0221C' } }, }); - }); test('`outputMastersRoleArn` can be used to synthesize an output with the arn of the masters role if defined', () => { @@ -1492,7 +1443,6 @@ describe('cluster', () => { expect(template.Outputs).toEqual({ ClusterMastersRoleArnB15964B1: { Value: { 'Fn::GetAtt': ['masters0D04F23D', 'Arn'] } }, }); - }); describe('boostrap user-data', () => { @@ -1509,7 +1459,6 @@ describe('cluster', () => { const template = app.synth().getStackByName(stack.stackName).template; const userData = template.Resources.ClusterMyCapcityLaunchConfig58583345.Properties.UserData; expect(userData).toEqual({ 'Fn::Base64': { 'Fn::Join': ['', ['#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ', { Ref: 'Cluster9EE0221C' }, ' --kubelet-extra-args "--node-labels lifecycle=OnDemand" --apiserver-endpoint \'', { 'Fn::GetAtt': ['Cluster9EE0221C', 'Endpoint'] }, '\' --b64-cluster-ca \'', { 'Fn::GetAtt': ['Cluster9EE0221C', 'CertificateAuthorityData'] }, '\' --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack Stack --resource ClusterMyCapcityASGD4CD8B97 --region us-east-1']] } }); - }); test('not rendered if bootstrap is disabled', () => { @@ -1527,7 +1476,6 @@ describe('cluster', () => { const template = app.synth().getStackByName(stack.stackName).template; const userData = template.Resources.ClusterMyCapcityLaunchConfig58583345.Properties.UserData; expect(userData).toEqual({ 'Fn::Base64': '#!/bin/bash' }); - }); // cursory test for options: see test.user-data.ts for full suite @@ -1548,7 +1496,6 @@ describe('cluster', () => { const template = app.synth().getStackByName(stack.stackName).template; const userData = template.Resources.ClusterMyCapcityLaunchConfig58583345.Properties.UserData; expect(userData).toEqual({ 'Fn::Base64': { 'Fn::Join': ['', ['#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ', { Ref: 'Cluster9EE0221C' }, ' --kubelet-extra-args "--node-labels lifecycle=OnDemand --node-labels FOO=42" --apiserver-endpoint \'', { 'Fn::GetAtt': ['Cluster9EE0221C', 'Endpoint'] }, '\' --b64-cluster-ca \'', { 'Fn::GetAtt': ['Cluster9EE0221C', 'CertificateAuthorityData'] }, '\' --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack Stack --resource ClusterMyCapcityASGD4CD8B97 --region us-east-1']] } }); - }); describe('spot instances', () => { @@ -1568,7 +1515,6 @@ describe('cluster', () => { const template = app.synth().getStackByName(stack.stackName).template; const userData = template.Resources.ClusterMyCapcityLaunchConfig58583345.Properties.UserData; expect(userData).toEqual({ 'Fn::Base64': { 'Fn::Join': ['', ['#!/bin/bash\nset -o xtrace\n/etc/eks/bootstrap.sh ', { Ref: 'Cluster9EE0221C' }, ' --kubelet-extra-args "--node-labels lifecycle=Ec2Spot --register-with-taints=spotInstance=true:PreferNoSchedule" --apiserver-endpoint \'', { 'Fn::GetAtt': ['Cluster9EE0221C', 'Endpoint'] }, '\' --b64-cluster-ca \'', { 'Fn::GetAtt': ['Cluster9EE0221C', 'CertificateAuthorityData'] }, '\' --use-max-pods true\n/opt/aws/bin/cfn-signal --exit-code $? --stack Stack --resource ClusterMyCapcityASGD4CD8B97 --region us-east-1']] } }); - }); test('interrupt handler is added', () => { @@ -1590,7 +1536,6 @@ describe('cluster', () => { Namespace: 'kube-system', Repository: 'https://aws.github.io/eks-charts', }); - }); test('interrupt handler is not added when spotInterruptHandler is false', () => { @@ -1607,7 +1552,6 @@ describe('cluster', () => { // THEN expect(cluster.node.findAll().filter(c => c.node.id === 'chart-spot-interrupt-handler').length).toEqual(0); - }); test('its possible to add two capacities with spot instances and only one stop handler will be installed', () => { @@ -1628,11 +1572,8 @@ describe('cluster', () => { // THEN Template.fromStack(stack).resourceCountIs(eks.HelmChart.RESOURCE_TYPE, 1); - }); - }); - }); test('if bootstrap is disabled cannot specify options', () => { @@ -1646,7 +1587,6 @@ describe('cluster', () => { bootstrapEnabled: false, bootstrapOptions: { awsApiRetryAttempts: 10 }, })).toThrow(/Cannot specify "bootstrapOptions" if "bootstrapEnabled" is false/); - }); test('EksOptimizedImage() with no nodeType always uses STANDARD with LATEST_KUBERNETES_VERSION', () => { @@ -1668,7 +1608,6 @@ describe('cluster', () => { ([k, v]) => k.startsWith('SsmParameterValueawsserviceeksoptimizedami') && (v as any).Default.includes(LATEST_KUBERNETES_VERSION), )).toEqual(true); - }); test('EksOptimizedImage() with specific kubernetesVersion return correct AMI', () => { @@ -1689,7 +1628,6 @@ describe('cluster', () => { ([k, v]) => k.startsWith('SsmParameterValueawsserviceeksoptimizedami') && (v as any).Default.includes('/1.21/'), )).toEqual(true); - }); test('default cluster capacity with ARM64 instance type comes with nodegroup with correct AmiType', () => { @@ -1708,7 +1646,6 @@ describe('cluster', () => { Template.fromStack(stack).hasResourceProperties('AWS::EKS::Nodegroup', { AmiType: 'AL2_ARM_64', }); - }); test('addNodegroup with ARM64 instance type comes with nodegroup with correct AmiType', () => { @@ -1729,7 +1666,6 @@ describe('cluster', () => { Template.fromStack(stack).hasResourceProperties('AWS::EKS::Nodegroup', { AmiType: 'AL2_ARM_64', }); - }); test('addNodegroupCapacity with T4g instance type comes with nodegroup with correct AmiType', () => { @@ -1750,7 +1686,6 @@ describe('cluster', () => { Template.fromStack(stack).hasResourceProperties('AWS::EKS::Nodegroup', { AmiType: 'AL2_ARM_64', }); - }); test('addAutoScalingGroupCapacity with T4g instance type comes with nodegroup with correct AmiType', () => { @@ -1773,7 +1708,6 @@ describe('cluster', () => { ([k, v]) => k.startsWith('SsmParameterValueawsserviceeksoptimizedami') && (v as any).Default.includes('amazon-linux-2-arm64/'), )).toEqual(true); - }); test('addNodegroupCapacity with C7g instance type comes with nodegroup with correct AmiType', () => { @@ -1839,7 +1773,6 @@ describe('cluster', () => { expect(Object.entries(parameters).some( ([k, v]) => k.startsWith('SsmParameterValueawsserviceeksoptimizedami') && (v as any).Default.includes('amazon-linux-2-gpu'), )).toEqual(true); - }); test('EKS-Optimized AMI with ARM64 when addAutoScalingGroupCapacity', () => { @@ -1861,7 +1794,6 @@ describe('cluster', () => { expect(Object.entries(parameters).some( ([k, v]) => k.startsWith('SsmParameterValueawsserviceeksoptimizedami') && (v as any).Default.includes('/amazon-linux-2-arm64/'), )).toEqual(true); - }); test('BottleRocketImage() with specific kubernetesVersion return correct AMI', () => { @@ -1882,7 +1814,6 @@ describe('cluster', () => { ([k, v]) => k.startsWith('SsmParameterValueawsservicebottlerocketaws') && (v as any).Default.includes('/aws-k8s-1.21/'), )).toEqual(true); - }); test('when using custom resource a creation role & policy is defined', () => { @@ -2048,7 +1979,6 @@ describe('cluster', () => { Version: '2012-10-17', }, }); - }); test('if an explicit cluster name is not provided, the creation role policy is wider (allows interacting with all clusters)', () => { @@ -2122,7 +2052,6 @@ describe('cluster', () => { Version: '2012-10-17', }, }); - }); test('if helm charts are used, the provider role is allowed to assume the creation role', () => { @@ -2234,8 +2163,8 @@ describe('cluster', () => { ], }, }); - }); + test('if openIDConnectProvider a new OpenIDConnectProvider resource is created and exposed', () => { // GIVEN const { stack } = testFixtureNoVpc(); @@ -2266,7 +2195,6 @@ describe('cluster', () => { ], }, }); - }); test('inference instances are supported', () => { // GIVEN @@ -2285,7 +2213,6 @@ describe('cluster', () => { Template.fromStack(stack).hasResourceProperties(eks.KubernetesManifest.RESOURCE_TYPE, { Manifest: JSON.stringify([sanitized]), }); - }); test('kubectl resources are always created after all fargate profiles', () => { @@ -2332,8 +2259,6 @@ describe('cluster', () => { for (const r of kubectlResources) { expect(template.Resources[r].DependsOn).toEqual(['ClusterKubectlReadyBarrier200052AF']); } - - }); test('kubectl provider role can assume creation role', () => { @@ -2464,7 +2389,6 @@ describe('cluster', () => { }, }, }); - }); describe('kubectl provider passes iam role environment to kube ctl lambda', ()=>{ @@ -2502,8 +2426,8 @@ describe('cluster', () => { Ref: 'referencetoStackKubectlIamRole02F8947EArn', }, }); - }); + test('imported cluster', ()=> { const clusterName = 'my-cluster'; @@ -2541,12 +2465,9 @@ describe('cluster', () => { describe('endpoint access', () => { test('public restricted', () => { - expect(() => { eks.EndpointAccess.PUBLIC.onlyFrom('1.2.3.4/32'); }).toThrow(/Cannot restric public access to endpoint when private access is disabled. Use PUBLIC_AND_PRIVATE.onlyFrom\(\) instead./); - - }); test('public non restricted without private subnets', () => { @@ -2566,7 +2487,6 @@ describe('cluster', () => { Template.fromStack(nested).hasResourceProperties('AWS::Lambda::Function', { VpcConfig: Match.absent(), }); - }); test('public non restricted with private subnets', () => { @@ -2599,8 +2519,6 @@ describe('cluster', () => { vpcSubnets: [{ subnetType: ec2.SubnetType.PUBLIC }], }); }).toThrow(/Vpc must contain private subnets when public endpoint access is disabled/); - - }); test('private with private subnets', () => { @@ -2637,7 +2555,6 @@ describe('cluster', () => { Template.fromStack(nested).hasResourceProperties('AWS::Lambda::Function', { VpcConfig: Match.absent(), }); - }); test('private and non restricted public with private subnets', () => { @@ -2668,8 +2585,6 @@ describe('cluster', () => { vpcSubnets: [{ subnetType: ec2.SubnetType.PUBLIC }], }); }).toThrow(/Vpc must contain private subnets when public endpoint access is restricted/); - - }); test('private and restricted public with private subnets', () => { @@ -2687,7 +2602,6 @@ describe('cluster', () => { const functions = Template.fromStack(nested).findResources('AWS::Lambda::Function'); expect(functions.Handler886CB40B.Properties.VpcConfig.SubnetIds.length).not.toEqual(0); expect(functions.Handler886CB40B.Properties.VpcConfig.SecurityGroupIds.length).not.toEqual(0); - }); test('private endpoint access selects only private subnets from looked up vpc', () => { @@ -2873,8 +2787,6 @@ describe('cluster', () => { const template = app.synth().getStackArtifact(stack.stackName).template; expect(template.Resources.Cluster1B02DD5A2.Properties.Config.resourcesVpcConfig.endpointPrivateAccess).toEqual(true); expect(template.Resources.Cluster1B02DD5A2.Properties.Config.resourcesVpcConfig.endpointPublicAccess).toEqual(false); - - }); test('kubectl provider chooses only private subnets', () => { @@ -2933,8 +2845,6 @@ describe('cluster', () => { ], }, }); - - }); test('kubectl provider limits number of subnets to 16', () => { @@ -3055,8 +2965,6 @@ describe('cluster', () => { ], }, }); - - }); test('throw when private access is configured without dns support enabled for the VPC', () => { @@ -3072,7 +2980,6 @@ describe('cluster', () => { prune: false, }); }).toThrow(/Private endpoint access requires the VPC to have DNS support and DNS hostnames enabled/); - }); test('throw when private access is configured without dns hostnames enabled for the VPC', () => { @@ -3088,7 +2995,6 @@ describe('cluster', () => { prune: false, }); }).toThrow(/Private endpoint access requires the VPC to have DNS support and DNS hostnames enabled/); - }); test('throw when cidrs are configured without public access endpoint', () => { @@ -3096,9 +3002,7 @@ describe('cluster', () => { expect(() => { eks.EndpointAccess.PRIVATE.onlyFrom('1.2.3.4/5'); }).toThrow(/CIDR blocks can only be configured when public access is enabled/); - }); - }); test('getServiceLoadBalancerAddress', () => { @@ -3164,8 +3068,6 @@ describe('cluster', () => { Template.fromStack(providerStack).hasResourceProperties('AWS::Lambda::Function', { Layers: ['arn:of:layer'], }); - - }); test('create a cluster using custom resource with secrets encryption using KMS CMK', () => { @@ -3196,7 +3098,6 @@ describe('cluster', () => { }], }, }); - }); test('custom memory size for kubectl provider', () => { @@ -3214,7 +3115,6 @@ describe('cluster', () => { const casm = app.synth(); const providerNestedStackTemplate = JSON.parse(fs.readFileSync(path.join(casm.directory, 'StackawscdkawseksKubectlProvider7346F799.nested.template.json'), 'utf-8')); expect(providerNestedStackTemplate?.Resources?.Handler886CB40B?.Properties?.MemorySize).toEqual(2048); - }); test('custom memory size for imported clusters', () => { @@ -3234,7 +3134,6 @@ describe('cluster', () => { const casm = app.synth(); const providerNestedStackTemplate = JSON.parse(fs.readFileSync(path.join(casm.directory, 'StackStackImported1CBA9C50KubectlProviderAA00BA49.nested.template.json'), 'utf-8')); expect(providerNestedStackTemplate?.Resources?.Handler886CB40B?.Properties?.MemorySize).toEqual(4096); - }); test('create a cluster using custom kubernetes network config', () => { @@ -3256,6 +3155,5 @@ describe('cluster', () => { }, }, }); - }); }); diff --git a/packages/@aws-cdk/aws-eks/test/eks-inference.integ.snapshot/aws-cdk-eks-cluster-inference-test.template.json b/packages/@aws-cdk/aws-eks/test/eks-inference.integ.snapshot/aws-cdk-eks-cluster-inference-test.template.json index 8aa7e98c48225..a5891d1638946 100644 --- a/packages/@aws-cdk/aws-eks/test/eks-inference.integ.snapshot/aws-cdk-eks-cluster-inference-test.template.json +++ b/packages/@aws-cdk/aws-eks/test/eks-inference.integ.snapshot/aws-cdk-eks-cluster-inference-test.template.json @@ -1842,7 +1842,7 @@ }, "Release": "aws-load-balancer-controller", "Chart": "aws-load-balancer-controller", - "Version": "1.2.7", + "Version": "1.4.1", "Wait": true, "Timeout": "900s", "Values": { @@ -2247,4 +2247,4 @@ "Default": "/aws/service/eks/optimized-ami/1.21/amazon-linux-2-gpu/recommended/image_id" } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts index 9ec85ec0efcae..4c19fd228e706 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts @@ -51,6 +51,15 @@ export interface NetworkTargetGroupProps extends BaseTargetGroupProps { * @default - No targets. */ readonly targets?: INetworkLoadBalancerTarget[]; + + /** + * + * Indicates whether the load balancer terminates connections at + * the end of the deregistration timeout. + * + * @default false + */ + readonly connectionTermination?: boolean; } /** @@ -93,7 +102,9 @@ export class NetworkTargetGroup extends TargetGroupBase implements INetworkTarge if (props.preserveClientIp !== undefined) { this.setAttribute('preserve_client_ip.enabled', props.preserveClientIp ? 'true' : 'false'); } - + if (props.connectionTermination !== undefined) { + this.setAttribute('deregistration_delay.connection_termination.enabled', props.connectionTermination ? 'true' : 'false'); + } this.addTarget(...(props.targets || [])); } diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json index ff40953a4dac3..cbe5644a089fb 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json @@ -82,6 +82,7 @@ "devDependencies": { "@aws-cdk/assertions": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/aws-cdk-elbv2-integ.template.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/aws-cdk-elbv2-integ.template.json new file mode 100644 index 0000000000000..0e7d73455d2e8 --- /dev/null +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/aws-cdk-elbv2-integ.template.json @@ -0,0 +1,453 @@ +{ + "Resources": { + "VPCB9E5F0B4": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC" + } + ] + } + }, + "VPCPublicSubnet1SubnetB4246D30": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableFEE4B781": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1RouteTableAssociation0B0896DC": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "VPCPublicSubnet1DefaultRoute91CEF279": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet1EIP6AD938E8": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet1NATGatewayE0556630": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" + } + ] + } + }, + "VPCPublicSubnet2Subnet74179F39": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTable6F1A15F1": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2RouteTableAssociation5A808732": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "VPCPublicSubnet2DefaultRouteB7481BBA": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VPCIGWB7E252D3" + } + }, + "DependsOn": [ + "VPCVPCGW99B986DC" + ] + }, + "VPCPublicSubnet2EIP4947BC00": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPublicSubnet2NATGateway3C070193": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" + } + ] + } + }, + "VPCPrivateSubnet1Subnet8BCA10E0": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableBE8A6027": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" + } + ] + } + }, + "VPCPrivateSubnet1RouteTableAssociation347902D1": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "VPCPrivateSubnet1DefaultRouteAE1D6490": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + } + } + }, + "VPCPrivateSubnet2SubnetCFCDAA7A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTable0A19E10E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" + } + ] + } + }, + "VPCPrivateSubnet2RouteTableAssociation0C73D413": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "SubnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + } + } + }, + "VPCIGWB7E252D3": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-elbv2-integ/VPC" + } + ] + } + }, + "VPCVPCGW99B986DC": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "VPCB9E5F0B4" + }, + "InternetGatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "LB8A12904C": { + "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "Properties": { + "LoadBalancerAttributes": [ + { + "Key": "deletion_protection.enabled", + "Value": "false" + } + ], + "Scheme": "internet-facing", + "Subnets": [ + { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + ], + "Type": "network" + }, + "DependsOn": [ + "VPCPublicSubnet1DefaultRoute91CEF279", + "VPCPublicSubnet2DefaultRouteB7481BBA" + ] + }, + "LBlistenerE5D117CC": { + "Type": "AWS::ElasticLoadBalancingV2::Listener", + "Properties": { + "DefaultActions": [ + { + "TargetGroupArn": { + "Ref": "TGB29B09E7" + }, + "Type": "forward" + } + ], + "LoadBalancerArn": { + "Ref": "LB8A12904C" + }, + "Port": 443, + "Protocol": "TCP" + } + }, + "TGB29B09E7": { + "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "Properties": { + "Port": 443, + "Protocol": "TCP", + "TargetGroupAttributes": [ + { + "Key": "deregistration_delay.timeout_seconds", + "Value": "5" + }, + { + "Key": "deregistration_delay.connection_termination.enabled", + "Value": "true" + } + ], + "VpcId": { + "Ref": "VPCB9E5F0B4" + } + }, + "DependsOn": [ + "VPCIGWB7E252D3" + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/cdk.out new file mode 100644 index 0000000000000..588d7b269d34f --- /dev/null +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/integ.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/integ.json new file mode 100644 index 0000000000000..845dbc42c2cc7 --- /dev/null +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/integ.json @@ -0,0 +1,11 @@ +{ + "version": "20.0.0", + "testCases": { + "targetGroupTest/DefaultTest": { + "stacks": [ + "aws-cdk-elbv2-integ" + ], + "assertionStack": "targetGroupTestDefaultTestDeployAssert29FB5AEF" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/manifest.json new file mode 100644 index 0000000000000..7f83a674ddadc --- /dev/null +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/manifest.json @@ -0,0 +1,193 @@ +{ + "version": "20.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "aws-cdk-elbv2-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-elbv2-integ.template.json", + "validateOnSynth": false + }, + "metadata": { + "/aws-cdk-elbv2-integ/VPC/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCB9E5F0B4" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1SubnetB4246D30" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableFEE4B781" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1DefaultRoute91CEF279" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1EIP6AD938E8" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet1NATGatewayE0556630" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2Subnet74179F39" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTable6F1A15F1" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2RouteTableAssociation5A808732" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2DefaultRouteB7481BBA" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2EIP4947BC00" + } + ], + "/aws-cdk-elbv2-integ/VPC/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPublicSubnet2NATGateway3C070193" + } + ], + "/aws-cdk-elbv2-integ/VPC/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1Subnet8BCA10E0" + } + ], + "/aws-cdk-elbv2-integ/VPC/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableBE8A6027" + } + ], + "/aws-cdk-elbv2-integ/VPC/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" + } + ], + "/aws-cdk-elbv2-integ/VPC/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" + } + ], + "/aws-cdk-elbv2-integ/VPC/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + ], + "/aws-cdk-elbv2-integ/VPC/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTable0A19E10E" + } + ], + "/aws-cdk-elbv2-integ/VPC/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" + } + ], + "/aws-cdk-elbv2-integ/VPC/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" + } + ], + "/aws-cdk-elbv2-integ/VPC/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCIGWB7E252D3" + } + ], + "/aws-cdk-elbv2-integ/VPC/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VPCVPCGW99B986DC" + } + ], + "/aws-cdk-elbv2-integ/LB/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LB8A12904C" + } + ], + "/aws-cdk-elbv2-integ/LB/listener/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LBlistenerE5D117CC" + } + ], + "/aws-cdk-elbv2-integ/TG": [ + { + "type": "aws:cdk:warning", + "data": "When creating an empty TargetGroup, you should specify a 'targetType' (this warning may become an error in the future)." + } + ], + "/aws-cdk-elbv2-integ/TG/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TGB29B09E7" + } + ] + }, + "displayName": "aws-cdk-elbv2-integ" + }, + "targetGroupTestDefaultTestDeployAssert29FB5AEF": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "targetGroupTestDefaultTestDeployAssert29FB5AEF.template.json", + "validateOnSynth": false + }, + "displayName": "targetGroupTest/DefaultTest/DeployAssert" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/targetGroupTestDefaultTestDeployAssert29FB5AEF.template.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/targetGroupTestDefaultTestDeployAssert29FB5AEF.template.json new file mode 100644 index 0000000000000..9e26dfeeb6e64 --- /dev/null +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/targetGroupTestDefaultTestDeployAssert29FB5AEF.template.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/tree.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/tree.json new file mode 100644 index 0000000000000..894f5604a517d --- /dev/null +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/connection-termination.nlb.integ.snapshot/tree.json @@ -0,0 +1,823 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "aws-cdk-elbv2-integ": { + "id": "aws-cdk-elbv2-integ", + "path": "aws-cdk-elbv2-integ", + "children": { + "VPC": { + "id": "VPC", + "path": "aws-cdk-elbv2-integ/VPC", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-elbv2-integ/VPC/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet1RouteTableFEE4B781" + }, + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "subnetId": { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet1EIP6AD938E8", + "AllocationId" + ] + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" + }, + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-cdk-elbv2-integ/VPC/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "subnetId": { + "Ref": "VPCPublicSubnet2Subnet74179F39" + }, + "allocationId": { + "Fn::GetAtt": [ + "VPCPublicSubnet2EIP4947BC00", + "AllocationId" + ] + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" + }, + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet1NATGatewayE0556630" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "tags": [ + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "subnetId": { + "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-cdk-elbv2-integ/VPC/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" + }, + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VPCPublicSubnet2NATGateway3C070193" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "aws-cdk-elbv2-integ/VPC/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-cdk-elbv2-integ/VPC" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "aws-cdk-elbv2-integ/VPC/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "VPCB9E5F0B4" + }, + "internetGatewayId": { + "Ref": "VPCIGWB7E252D3" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Vpc", + "version": "0.0.0" + } + }, + "LB": { + "id": "LB", + "path": "aws-cdk-elbv2-integ/LB", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-elbv2-integ/LB/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "aws:cdk:cloudformation:props": { + "loadBalancerAttributes": [ + { + "key": "deletion_protection.enabled", + "value": "false" + } + ], + "scheme": "internet-facing", + "subnets": [ + { + "Ref": "VPCPublicSubnet1SubnetB4246D30" + }, + { + "Ref": "VPCPublicSubnet2Subnet74179F39" + } + ], + "type": "network" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-elasticloadbalancingv2.CfnLoadBalancer", + "version": "0.0.0" + } + }, + "listener": { + "id": "listener", + "path": "aws-cdk-elbv2-integ/LB/listener", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-elbv2-integ/LB/listener/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::Listener", + "aws:cdk:cloudformation:props": { + "defaultActions": [ + { + "type": "forward", + "targetGroupArn": { + "Ref": "TGB29B09E7" + } + } + ], + "loadBalancerArn": { + "Ref": "LB8A12904C" + }, + "port": 443, + "protocol": "TCP" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-elasticloadbalancingv2.CfnListener", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-elasticloadbalancingv2.NetworkListener", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-elasticloadbalancingv2.NetworkLoadBalancer", + "version": "0.0.0" + } + }, + "TG": { + "id": "TG", + "path": "aws-cdk-elbv2-integ/TG", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-elbv2-integ/TG/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "aws:cdk:cloudformation:props": { + "port": 443, + "protocol": "TCP", + "targetGroupAttributes": [ + { + "key": "deregistration_delay.timeout_seconds", + "value": "5" + }, + { + "key": "deregistration_delay.connection_termination.enabled", + "value": "true" + } + ], + "vpcId": { + "Ref": "VPCB9E5F0B4" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-elasticloadbalancingv2.CfnTargetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-elasticloadbalancingv2.NetworkTargetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "targetGroupTest": { + "id": "targetGroupTest", + "path": "targetGroupTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "targetGroupTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "targetGroupTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "targetGroupTest/DefaultTest/DeployAssert", + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTest", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.connection-termination.nlb.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.connection-termination.nlb.ts new file mode 100644 index 0000000000000..884b9cce8305a --- /dev/null +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/integ.connection-termination.nlb.ts @@ -0,0 +1,41 @@ +#!/usr/bin/env node +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as cdk from '@aws-cdk/core'; +import { Duration } from '@aws-cdk/core'; +import * as integ from '@aws-cdk/integ-tests'; +import * as elbv2 from '../lib'; + + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-cdk-elbv2-integ'); + +const vpc = new ec2.Vpc(stack, 'VPC', { + maxAzs: 2, +}); + +const lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { + vpc, + internetFacing: true, + +}); + +const targetGroup = new elbv2.NetworkTargetGroup(stack, 'TG', { + vpc, + port: 443, + deregistrationDelay: Duration.seconds(5), + connectionTermination: true, +}); + +lb.addListener('listener', { + port: 443, + defaultTargetGroups: [targetGroup], +}); + +targetGroup.node.addDependency(vpc.internetConnectivityEstablished); + +// The target's security group must allow being routed by the LB and the clients. +new integ.IntegTest(app, 'targetGroupTest', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts index caf0b6ed751c5..cb04a4c9058fb 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts @@ -59,7 +59,7 @@ describe('tests', () => { const endpointService = new ec2.VpcEndpointService(stack, 'EndpointService', { vpcEndpointServiceLoadBalancers: [nlb] }); // WHEN - const importedPHZ = route53.PublicHostedZone.fromHostedZoneAttributes(stack, 'MyPHZ', { + const importedPHZ = route53.PublicHostedZone.fromPublicHostedZoneAttributes(stack, 'MyPHZ', { hostedZoneId: 'sampleid', zoneName: 'MyZone', }); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/target-group.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/target-group.test.ts index d7ac75aa2f78b..4f634d82cfc00 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/target-group.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/target-group.test.ts @@ -220,6 +220,52 @@ describe('tests', () => { }).toThrow('Target group name: "my target group" must contain only alphanumeric characters or hyphens.'); }); + test('Disable deregistration_delay.connection_termination.enabled attribute for target group', () => { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'Vpc'); + + // WHEN + new elbv2.NetworkTargetGroup(stack, 'Group', { + vpc, + port: 80, + connectionTermination: false, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::ElasticLoadBalancingV2::TargetGroup', { + TargetGroupAttributes: [ + { + Key: 'deregistration_delay.connection_termination.enabled', + Value: 'false', + }, + ], + }); + }); + + test('Enable deregistration_delay.connection_termination.enabled attribute for target group', () => { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'Vpc'); + + // WHEN + new elbv2.NetworkTargetGroup(stack, 'Group', { + vpc, + port: 80, + connectionTermination: true, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::ElasticLoadBalancingV2::TargetGroup', { + TargetGroupAttributes: [ + { + Key: 'deregistration_delay.connection_termination.enabled', + Value: 'true', + }, + ], + }); + }); + test.each([elbv2.Protocol.UDP, elbv2.Protocol.TCP_UDP, elbv2.Protocol.TLS])( 'Throws validation error, when `healthCheck` has `protocol` set to %s', (protocol) => { diff --git a/packages/@aws-cdk/aws-glue/README.md b/packages/@aws-cdk/aws-glue/README.md index 639198c67ed9a..88cf57faaa10b 100644 --- a/packages/@aws-cdk/aws-glue/README.md +++ b/packages/@aws-cdk/aws-glue/README.md @@ -264,6 +264,31 @@ myTable.addPartitionIndex({ }); ``` +### Partition Filtering + +If you have a table with a large number of partitions that grows over time, consider using AWS Glue partition indexing and filtering. + +```ts +declare const myDatabase: glue.Database; +new glue.Table(this, 'MyTable', { + database: myDatabase, + tableName: 'my_table', + columns: [{ + name: 'col1', + type: glue.Schema.STRING, + }], + partitionKeys: [{ + name: 'year', + type: glue.Schema.SMALL_INT, + }, { + name: 'month', + type: glue.Schema.SMALL_INT, + }], + dataFormat: glue.DataFormat.JSON, + enablePartitionFiltering: true, +}); +``` + ## [Encryption](https://docs.aws.amazon.com/athena/latest/ug/encryption.html) You can enable encryption on a Table's data: diff --git a/packages/@aws-cdk/aws-glue/lib/table.ts b/packages/@aws-cdk/aws-glue/lib/table.ts index 1b17da32e5454..ea958879d816b 100644 --- a/packages/@aws-cdk/aws-glue/lib/table.ts +++ b/packages/@aws-cdk/aws-glue/lib/table.ts @@ -172,6 +172,15 @@ export interface TableProps { * @default false */ readonly storedAsSubDirectories?: boolean; + + /** + * Enables partition filtering. + * + * @see https://docs.aws.amazon.com/athena/latest/ug/glue-best-practices.html#glue-best-practices-partition-index + * + * @default - The parameter is not defined + */ + readonly enablePartitionFiltering?: boolean; } /** @@ -302,8 +311,9 @@ export class Table extends Resource implements ITable { partitionKeys: renderColumns(props.partitionKeys), parameters: { - classification: props.dataFormat.classificationString?.value, - has_encrypted_data: this.encryption !== TableEncryption.UNENCRYPTED, + 'classification': props.dataFormat.classificationString?.value, + 'has_encrypted_data': this.encryption !== TableEncryption.UNENCRYPTED, + 'partition_filtering.enabled': props.enablePartitionFiltering, }, storageDescriptor: { location: `s3://${this.bucket.bucketName}/${this.s3Prefix}`, diff --git a/packages/@aws-cdk/aws-glue/test/integ.table.ts b/packages/@aws-cdk/aws-glue/test/integ.table.ts index e9d54d659921e..d9d543a124d16 100644 --- a/packages/@aws-cdk/aws-glue/test/integ.table.ts +++ b/packages/@aws-cdk/aws-glue/test/integ.table.ts @@ -87,6 +87,14 @@ const encryptedTable = new glue.Table(stack, 'MyEncryptedTable', { encryptionKey: new kms.Key(stack, 'MyKey'), }); +new glue.Table(stack, 'MyPartitionFilteredTable', { + database, + tableName: 'partition_filtered_table', + columns, + dataFormat: glue.DataFormat.JSON, + enablePartitionFiltering: true, +}); + const user = new iam.User(stack, 'MyUser'); csvTable.grantReadWrite(user); encryptedTable.grantReadWrite(user); diff --git a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/aws-cdk-glue.assets.json b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/aws-cdk-glue.assets.json index 772ec2685ec29..0cd673b0f5be4 100644 --- a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/aws-cdk-glue.assets.json +++ b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/aws-cdk-glue.assets.json @@ -1,7 +1,7 @@ { - "version": "17.0.0", + "version": "20.0.0", "files": { - "92638b7a8efe38efd7c845883423f3767018a9e5bd3d67d8d638332f054d0d0f": { + "419b39f03d496de4fb02e795181e9a2ab218fb90bf7a5c9354cf93baa6fea2cf": { "source": { "path": "aws-cdk-glue.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "92638b7a8efe38efd7c845883423f3767018a9e5bd3d67d8d638332f054d0d0f.json", + "objectKey": "419b39f03d496de4fb02e795181e9a2ab218fb90bf7a5c9354cf93baa6fea2cf.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/aws-cdk-glue.template.json b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/aws-cdk-glue.template.json index 7f5f3e286f0ef..e64e4fe3b8a20 100644 --- a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/aws-cdk-glue.template.json +++ b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/aws-cdk-glue.template.json @@ -423,6 +423,76 @@ } } }, + "MyPartitionFilteredTableBucket6ACAA137": { + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "MyPartitionFilteredTable324BA27A": { + "Type": "AWS::Glue::Table", + "Properties": { + "CatalogId": { + "Ref": "AWS::AccountId" + }, + "DatabaseName": { + "Ref": "MyDatabase1E2517DB" + }, + "TableInput": { + "Description": "partition_filtered_table generated by CDK", + "Name": "partition_filtered_table", + "Parameters": { + "classification": "json", + "has_encrypted_data": false, + "partition_filtering.enabled": true + }, + "StorageDescriptor": { + "Columns": [ + { + "Name": "col1", + "Type": "string" + }, + { + "Comment": "col2 comment", + "Name": "col2", + "Type": "string" + }, + { + "Name": "col3", + "Type": "array" + }, + { + "Name": "col4", + "Type": "map" + }, + { + "Name": "col5", + "Type": "struct" + } + ], + "Compressed": false, + "InputFormat": "org.apache.hadoop.mapred.TextInputFormat", + "Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "MyPartitionFilteredTableBucket6ACAA137" + }, + "/" + ] + ] + }, + "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", + "SerdeInfo": { + "SerializationLibrary": "org.openx.data.jsonserde.JsonSerDe" + }, + "StoredAsSubDirectories": false + }, + "TableType": "EXTERNAL_TABLE" + } + } + }, "MyUserDC45028B": { "Type": "AWS::IAM::User" }, diff --git a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/integ.json b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/integ.json index 85b6fe8295b26..1f604630bc610 100644 --- a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-glue/test/integ.table": { + "integ.table": { "stacks": [ "aws-cdk-glue" ], diff --git a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/manifest.json index 221b7524100fa..aed4259921a6f 100644 --- a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -69,6 +69,18 @@ "data": "MyEncryptedTable981A88C6" } ], + "/aws-cdk-glue/MyPartitionFilteredTable/Bucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPartitionFilteredTableBucket6ACAA137" + } + ], + "/aws-cdk-glue/MyPartitionFilteredTable/Table": [ + { + "type": "aws:cdk:logicalId", + "data": "MyPartitionFilteredTable324BA27A" + } + ], "/aws-cdk-glue/MyUser/Resource": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/tree.json b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/tree.json index 5ec24f621772d..189e9f749a2d6 100644 --- a/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-glue/test/table.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "aws-cdk-glue": { @@ -596,6 +596,111 @@ "version": "0.0.0" } }, + "MyPartitionFilteredTable": { + "id": "MyPartitionFilteredTable", + "path": "aws-cdk-glue/MyPartitionFilteredTable", + "children": { + "Bucket": { + "id": "Bucket", + "path": "aws-cdk-glue/MyPartitionFilteredTable/Bucket", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-glue/MyPartitionFilteredTable/Bucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "0.0.0" + } + }, + "Table": { + "id": "Table", + "path": "aws-cdk-glue/MyPartitionFilteredTable/Table", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Glue::Table", + "aws:cdk:cloudformation:props": { + "catalogId": { + "Ref": "AWS::AccountId" + }, + "databaseName": { + "Ref": "MyDatabase1E2517DB" + }, + "tableInput": { + "name": "partition_filtered_table", + "description": "partition_filtered_table generated by CDK", + "parameters": { + "classification": "json", + "has_encrypted_data": false, + "partition_filtering.enabled": true + }, + "storageDescriptor": { + "location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "MyPartitionFilteredTableBucket6ACAA137" + }, + "/" + ] + ] + }, + "compressed": false, + "storedAsSubDirectories": false, + "columns": [ + { + "name": "col1", + "type": "string" + }, + { + "name": "col2", + "type": "string", + "comment": "col2 comment" + }, + { + "name": "col3", + "type": "array" + }, + { + "name": "col4", + "type": "map" + }, + { + "name": "col5", + "type": "struct" + } + ], + "inputFormat": "org.apache.hadoop.mapred.TextInputFormat", + "outputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", + "serdeInfo": { + "serializationLibrary": "org.openx.data.jsonserde.JsonSerDe" + } + }, + "tableType": "EXTERNAL_TABLE" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-glue.CfnTable", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-glue.Table", + "version": "0.0.0" + } + }, "MyUser": { "id": "MyUser", "path": "aws-cdk-glue/MyUser", diff --git a/packages/@aws-cdk/aws-glue/test/table.test.ts b/packages/@aws-cdk/aws-glue/test/table.test.ts index e3f5df9bb6a3f..79920d73e1a81 100644 --- a/packages/@aws-cdk/aws-glue/test/table.test.ts +++ b/packages/@aws-cdk/aws-glue/test/table.test.ts @@ -1,4 +1,4 @@ -import { Template } from '@aws-cdk/assertions'; +import { Template, Match } from '@aws-cdk/assertions'; import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as s3 from '@aws-cdk/aws-s3'; @@ -1567,6 +1567,98 @@ test('Table.fromTableArn', () => { expect(table.tableName).toEqual('tbl1'); }); +test.each([ + ['enabled', true], + ['disabled', false], +])('Partition filtering on table %s', (_, enabled) => { + const app = new cdk.App(); + const dbStack = new cdk.Stack(app, 'db'); + const database = new glue.Database(dbStack, 'Database', { + databaseName: 'database', + }); + + const tableStack = new cdk.Stack(app, 'table'); + new glue.Table(tableStack, 'Table', { + database, + tableName: 'table', + columns: [{ + name: 'col', + type: glue.Schema.STRING, + }], + partitionKeys: [{ + name: 'year', + type: glue.Schema.SMALL_INT, + }], + dataFormat: glue.DataFormat.JSON, + enablePartitionFiltering: enabled, + }); + + Template.fromStack(tableStack).hasResourceProperties('AWS::Glue::Table', { + CatalogId: { + Ref: 'AWS::AccountId', + }, + DatabaseName: { + 'Fn::ImportValue': 'db:ExportsOutputRefDatabaseB269D8BB88F4B1C4', + }, + TableInput: { + Name: 'table', + Description: 'table generated by CDK', + Parameters: { + 'classification': 'json', + 'has_encrypted_data': false, + 'partition_filtering.enabled': enabled, + }, + PartitionKeys: Match.anyValue(), + StorageDescriptor: Match.anyValue(), + TableType: Match.anyValue(), + }, + }); +}); + +test('Partition filtering on table is not defined (default behavior)', () => { + const app = new cdk.App(); + const dbStack = new cdk.Stack(app, 'db'); + const database = new glue.Database(dbStack, 'Database', { + databaseName: 'database', + }); + + const tableStack = new cdk.Stack(app, 'table'); + new glue.Table(tableStack, 'Table', { + database, + tableName: 'table', + columns: [{ + name: 'col', + type: glue.Schema.STRING, + }], + partitionKeys: [{ + name: 'year', + type: glue.Schema.SMALL_INT, + }], + dataFormat: glue.DataFormat.JSON, + enablePartitionFiltering: undefined, + }); + + Template.fromStack(tableStack).hasResourceProperties('AWS::Glue::Table', { + CatalogId: { + Ref: 'AWS::AccountId', + }, + DatabaseName: { + 'Fn::ImportValue': 'db:ExportsOutputRefDatabaseB269D8BB88F4B1C4', + }, + TableInput: { + Name: 'table', + Description: 'table generated by CDK', + Parameters: { + classification: 'json', + has_encrypted_data: false, + }, + PartitionKeys: Match.anyValue(), + StorageDescriptor: Match.anyValue(), + TableType: Match.anyValue(), + }, + }); +}); + function createTable(props: Pick>): void { const stack = new cdk.Stack(); new glue.Table(stack, 'table', { diff --git a/packages/@aws-cdk/aws-iam/lib/policy-statement.ts b/packages/@aws-cdk/aws-iam/lib/policy-statement.ts index f912a4c180182..42e415158ec6d 100644 --- a/packages/@aws-cdk/aws-iam/lib/policy-statement.ts +++ b/packages/@aws-cdk/aws-iam/lib/policy-statement.ts @@ -3,7 +3,7 @@ import { IConstruct } from 'constructs'; import { Group } from './group'; import { AccountPrincipal, AccountRootPrincipal, AnyPrincipal, ArnPrincipal, CanonicalUserPrincipal, - FederatedPrincipal, IPrincipal, PrincipalBase, PrincipalPolicyFragment, ServicePrincipal, ServicePrincipalOpts, + FederatedPrincipal, IPrincipal, PrincipalBase, PrincipalPolicyFragment, ServicePrincipal, ServicePrincipalOpts, validateConditionObject, } from './principals'; import { normalizeStatement } from './private/postprocess-policy-document'; import { LITERAL_STRING_KEY, mergePrincipal, sum } from './util'; @@ -69,20 +69,20 @@ export class PolicyStatement { return ret; } - private readonly _action = new Array(); - private readonly _notAction = new Array(); + private readonly _action = new OrderedSet(); + private readonly _notAction = new OrderedSet(); private readonly _principal: { [key: string]: any[] } = {}; private readonly _notPrincipal: { [key: string]: any[] } = {}; - private readonly _resource = new Array(); - private readonly _notResource = new Array(); + private readonly _resource = new OrderedSet(); + private readonly _notResource = new OrderedSet(); private readonly _condition: { [key: string]: any } = { }; private _sid?: string; private _effect: Effect; private principalConditionsJson?: string; // Hold on to those principals - private readonly _principals = new Array(); - private readonly _notPrincipals = new Array(); + private readonly _principals = new OrderedSet(); + private readonly _notPrincipals = new OrderedSet(); private _frozen = false; constructor(props: PolicyStatementProps = {}) { @@ -193,12 +193,15 @@ export class PolicyStatement { */ public addPrincipals(...principals: IPrincipal[]) { this.assertNotFrozen('addPrincipals'); - this._principals.push(...principals); - if (Object.keys(principals).length > 0 && Object.keys(this._notPrincipal).length > 0) { + if (principals.length > 0 && this._notPrincipals.length > 0) { throw new Error('Cannot add \'Principals\' to policy statement if \'NotPrincipals\' have been added'); } for (const principal of principals) { this.validatePolicyPrincipal(principal); + } + + const added = this._principals.push(...principals); + for (const principal of added) { const fragment = principal.policyFragment; mergePrincipal(this._principal, fragment.principalJson); this.addPrincipalConditions(fragment.conditions); @@ -215,12 +218,15 @@ export class PolicyStatement { */ public addNotPrincipals(...notPrincipals: IPrincipal[]) { this.assertNotFrozen('addNotPrincipals'); - this._notPrincipals.push(...notPrincipals); - if (Object.keys(notPrincipals).length > 0 && Object.keys(this._principal).length > 0) { + if (notPrincipals.length > 0 && this._principals.length > 0) { throw new Error('Cannot add \'NotPrincipals\' to policy statement if \'Principals\' have been added'); } for (const notPrincipal of notPrincipals) { this.validatePolicyPrincipal(notPrincipal); + } + + const added = this._notPrincipals.push(...notPrincipals); + for (const notPrincipal of added) { const fragment = notPrincipal.policyFragment; mergePrincipal(this._notPrincipal, fragment.principalJson); this.addPrincipalConditions(fragment.conditions); @@ -374,6 +380,8 @@ export class PolicyStatement { */ public addCondition(key: string, value: Condition) { this.assertNotFrozen('addCondition'); + validateConditionObject(value); + const existingValue = this._condition[key]; this._condition[key] = existingValue ? { ...existingValue, ...value } : value; } @@ -426,14 +434,14 @@ export class PolicyStatement { */ public toStatementJson(): any { return normalizeStatement({ - Action: this._action, - NotAction: this._notAction, + Action: this._action.direct(), + NotAction: this._notAction.direct(), Condition: this._condition, Effect: this.effect, Principal: this._principal, NotPrincipal: this._notPrincipal, - Resource: this._resource, - NotResource: this._notResource, + Resource: this._resource.direct(), + NotResource: this._notResource.direct(), Sid: this.sid, }); } @@ -503,7 +511,7 @@ export class PolicyStatement { */ public validateForResourcePolicy(): string[] { const errors = this.validateForAnyPolicy(); - if (Object.keys(this._principal).length === 0 && Object.keys(this._notPrincipal).length === 0) { + if (this._principals.length === 0 && this._notPrincipals.length === 0) { errors.push('A PolicyStatement used in a resource-based policy must specify at least one IAM principal.'); } return errors; @@ -516,10 +524,10 @@ export class PolicyStatement { */ public validateForIdentityPolicy(): string[] { const errors = this.validateForAnyPolicy(); - if (Object.keys(this._principal).length > 0 || Object.keys(this._notPrincipal).length > 0) { + if (this._principals.length > 0 || this._notPrincipals.length > 0) { errors.push('A PolicyStatement used in an identity-based policy cannot specify any IAM principals.'); } - if (Object.keys(this._resource).length === 0 && Object.keys(this._notResource).length === 0) { + if (this._resource.length === 0 && this._notResource.length === 0) { errors.push('A PolicyStatement used in an identity-based policy must specify at least one resource.'); } return errors; @@ -529,42 +537,42 @@ export class PolicyStatement { * The Actions added to this statement */ public get actions() { - return [...this._action]; + return this._action.copy(); } /** * The NotActions added to this statement */ public get notActions() { - return [...this._notAction]; + return this._notAction.copy(); } /** * The Principals added to this statement */ public get principals(): IPrincipal[] { - return [...this._principals]; + return this._principals.copy(); } /** * The NotPrincipals added to this statement */ public get notPrincipals(): IPrincipal[] { - return [...this._notPrincipals]; + return this._notPrincipals.copy(); } /** * The Resources added to this statement */ public get resources() { - return [...this._resource]; + return this._resource.copy(); } /** * The NotResources added to this statement */ public get notResources() { - return [...this._notResource]; + return this._notResource.copy(); } /** @@ -664,19 +672,15 @@ export enum Effect { * Condition for when an IAM policy is in effect. Maps from the keys in a request's context to * a string value or array of string values. See the Conditions interface for more details. */ -export type Condition = any; +export type Condition = unknown; -// NOTE! We'd ideally like to type this as `Record`, because the -// API expects a map which can take either strings or lists of strings. -// -// However, if we were to change this right now, the Java bindings for CDK would -// emit a type of `Map`, but the most common types people would -// instantiate would be an `ImmutableMap` which would not be -// assignable to `Map`. The types don't have a built-in notion -// of co-contravariance, you have to indicate that on the type. So jsii would first -// need to emit the type as `Map`. +// NOTE! We would have liked to have typed this as `Record`, but in some places +// of the code we are assuming we can pass a `CfnJson` object into where a `Condition` is expected, +// and that wouldn't typecheck anymore. // -// Feature request in https://github.com/aws/jsii/issues/1517 +// Needs to be `unknown` instead of `any` so that the type of `Conditions` is +// `Record`; if it had been `Record`, TypeScript would have allowed +// passing an array into `conditions` arguments (where it needs to be a map). /** * Conditions for when an IAM Policy is in effect, specified in the following structure: @@ -821,4 +825,54 @@ export function deriveEstimateSizeOptions(scope: IConstruct): EstimateSizeOption } return { actionEstimate, arnEstimate }; -} \ No newline at end of file +} + +/** + * A class that behaves both as a set and an array + * + * Used for the elements of a PolicyStatement. In practice they behave as sets, + * but we have thousands of snapshot tests in existence that will rely on a + * particular order so we can't just change the type to `Set<>` wholesale without + * causing a lot of churn. + */ +class OrderedSet { + private readonly set = new Set(); + private readonly array = new Array(); + + /** + * Add new elements to the set + * + * @param xs the elements to be added + * + * @returns the elements actually added + */ + public push(...xs: readonly A[]): A[] { + const ret = new Array(); + for (const x of xs) { + if (this.set.has(x)) { + continue; + } + this.set.add(x); + this.array.push(x); + ret.push(x); + } + return ret; + } + + public get length() { + return this.array.length; + } + + public copy(): A[] { + return [...this.array]; + } + + /** + * Direct (read-only) access to the underlying array + * + * (Saves a copy) + */ + public direct(): readonly A[] { + return this.array; + } +} diff --git a/packages/@aws-cdk/aws-iam/lib/principals.ts b/packages/@aws-cdk/aws-iam/lib/principals.ts index 27ece9e4d59f5..3a411287d6114 100644 --- a/packages/@aws-cdk/aws-iam/lib/principals.ts +++ b/packages/@aws-cdk/aws-iam/lib/principals.ts @@ -267,8 +267,15 @@ export class PrincipalWithConditions extends PrincipalAdapter { * Add a condition to the principal */ public addCondition(key: string, value: Condition) { + validateConditionObject(value); + const existingValue = this.additionalConditions[key]; - this.additionalConditions[key] = existingValue ? { ...existingValue, ...value } : value; + if (!existingValue) { + this.additionalConditions[key] = value; + } + validateConditionObject(existingValue); + + this.additionalConditions[key] = { ...existingValue, ...value }; } /** @@ -335,6 +342,9 @@ export class PrincipalWithConditions extends PrincipalAdapter { throw new Error(`multiple "${operator}" conditions cannot be merged if one of them contains an unresolved token`); } + validateConditionObject(existing); + validateConditionObject(condition); + mergedConditions[operator] = { ...existing, ...condition }; }); return mergedConditions; @@ -913,3 +923,17 @@ class ServicePrincipalToken implements cdk.IResolvable { return `<${this.service}>`; } } + +/** + * Validate that the given value is a valid Condition object + * + * The type of `Condition` should have been different, but it's too late for that. + * + * Also, the IAM library relies on being able to pass in a `CfnJson` instance for + * a `Condition`. + */ +export function validateConditionObject(x: unknown): asserts x is Record { + if (!x || typeof x !== 'object' || Array.isArray(x)) { + throw new Error('A Condition should be represented as a map of operator to value'); + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/test/policy-document.test.ts b/packages/@aws-cdk/aws-iam/test/policy-document.test.ts index ca759d438ab89..af39183ed002b 100644 --- a/packages/@aws-cdk/aws-iam/test/policy-document.test.ts +++ b/packages/@aws-cdk/aws-iam/test/policy-document.test.ts @@ -347,8 +347,8 @@ describe('IAM policy document', () => { expect(stack.resolve(statement.toStatementJson())).toEqual({ Effect: 'Allow', - Action: ['a'], - Resource: ['x'], + Action: 'a', + Resource: 'x', }); }); @@ -364,8 +364,8 @@ describe('IAM policy document', () => { expect(stack.resolve(statement.toStatementJson())).toEqual({ Effect: 'Allow', - NotAction: ['a'], - NotResource: ['x'], + NotAction: 'a', + NotResource: 'x', }); }); diff --git a/packages/@aws-cdk/aws-iam/test/policy-statement.test.ts b/packages/@aws-cdk/aws-iam/test/policy-statement.test.ts index ec1f9f691f727..27965fbe150d1 100644 --- a/packages/@aws-cdk/aws-iam/test/policy-statement.test.ts +++ b/packages/@aws-cdk/aws-iam/test/policy-statement.test.ts @@ -215,6 +215,22 @@ describe('IAM policy statement', () => { .toThrow(/Cannot use an IAM Group as the 'Principal' or 'NotPrincipal' in an IAM Policy/); }); + test('multiple identical entries render to a scalar (instead of a singleton list)', () => { + const stack = new Stack(); + const policyStatement = new PolicyStatement({ + actions: ['aws:Action'], + }); + + policyStatement.addResources('asdf'); + policyStatement.addResources('asdf'); + policyStatement.addResources('asdf'); + + expect(stack.resolve(policyStatement.toStatementJson())).toEqual({ + Effect: 'Allow', + Action: 'aws:Action', + Resource: 'asdf', + }); + }); test('a frozen policy statement cannot be modified any more', () => { // GIVEN diff --git a/packages/@aws-cdk/aws-lambda/README.md b/packages/@aws-cdk/aws-lambda/README.md index 1db33fbd80631..dc40e77e1363d 100644 --- a/packages/@aws-cdk/aws-lambda/README.md +++ b/packages/@aws-cdk/aws-lambda/README.md @@ -105,7 +105,7 @@ it appropriate permissions: ```ts const myRole = new iam.Role(this, 'My Role', { - assumedBy: new iam.ServicePrincipal('sns.amazonaws.com'), + assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'), }); const fn = new lambda.Function(this, 'MyFunction', { diff --git a/packages/@aws-cdk/aws-lambda/lib/function-base.ts b/packages/@aws-cdk/aws-lambda/lib/function-base.ts index 14376c3b32909..c26b6b6df38da 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function-base.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function-base.ts @@ -618,9 +618,9 @@ export abstract class FunctionBase extends Resource implements IFunction, ec2.IC if (!conditions) { return undefined; } - const sourceArn = conditions.ArnLike ? conditions.ArnLike['aws:SourceArn'] : undefined; - const sourceAccount = conditions.StringEquals ? conditions.StringEquals['aws:SourceAccount'] : undefined; - const principalOrgID = conditions.StringEquals ? conditions.StringEquals['aws:PrincipalOrgID'] : undefined; + const sourceArn = requireString(requireObject(conditions.ArnLike)?.['aws:SourceArn']); + const sourceAccount = requireString(requireObject(conditions.StringEquals)?.['aws:SourceAccount']); + const principalOrgID = requireString(requireObject(conditions.StringEquals)?.['aws:PrincipalOrgID']); // PrincipalOrgID cannot be combined with any other conditions if (principalOrgID && (sourceArn || sourceAccount)) { @@ -768,3 +768,11 @@ class LatestVersion extends FunctionBase implements IVersion { return addAlias(this, this, aliasName, options); } } + +function requireObject(x: unknown): Record | undefined { + return x && typeof x === 'object' && !Array.isArray(x) ? x as any : undefined; +} + +function requireString(x: unknown): string | undefined { + return x && typeof x === 'string' ? x : undefined; +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/lib/policy.ts b/packages/@aws-cdk/aws-logs/lib/policy.ts index ed150fa12e9cb..4032d17488931 100644 --- a/packages/@aws-cdk/aws-logs/lib/policy.ts +++ b/packages/@aws-cdk/aws-logs/lib/policy.ts @@ -46,7 +46,7 @@ export class ResourcePolicy extends Resource { physicalName: props?.resourcePolicyName, }); - new CfnResourcePolicy(this, 'ResourcePolicy', { + const l1 = new CfnResourcePolicy(this, 'ResourcePolicy', { policyName: Lazy.string({ produce: () => props?.resourcePolicyName ?? Names.uniqueId(this), }), @@ -55,6 +55,8 @@ export class ResourcePolicy extends Resource { }), }); + this.node.defaultChild = l1; + if (props?.policyStatements) { this.document.addStatements(...props.policyStatements); } diff --git a/packages/@aws-cdk/aws-logs/test/policy.test.ts b/packages/@aws-cdk/aws-logs/test/policy.test.ts index 8ffb66ab8eb29..325d9ac059a85 100644 --- a/packages/@aws-cdk/aws-logs/test/policy.test.ts +++ b/packages/@aws-cdk/aws-logs/test/policy.test.ts @@ -49,4 +49,15 @@ describe('resource policy', () => { PolicyName: 'ResourcePolicy', }); }); + + test('ResourcePolicy has a defaultChild', () => { + // GIVEN + const stack = new Stack(); + + // WHEN + const resourcePolicy = new ResourcePolicy(stack, 'ResourcePolicy'); + + // THEN + expect(resourcePolicy.node.defaultChild).toBeDefined(); + }); }); diff --git a/packages/@aws-cdk/aws-msk/README.md b/packages/@aws-cdk/aws-msk/README.md index 36c85154c8d04..dc99262aff6f7 100644 --- a/packages/@aws-cdk/aws-msk/README.md +++ b/packages/@aws-cdk/aws-msk/README.md @@ -149,3 +149,40 @@ const cluster = new msk.Cluster(this, 'cluster', { }), }); ``` + +## Logging + +You can deliver Apache Kafka broker logs to one or more of the following destination types: +Amazon CloudWatch Logs, Amazon S3, Amazon Kinesis Data Firehose. + +To configure logs to be sent to an S3 bucket, provide a bucket in the `logging` config. + +```ts +declare const vpc: ec2.Vpc; +declare const bucket: s3.IBucket; +const cluster = new msk.Cluster(this, 'cluster', { + clusterName: 'myCluster', + kafkaVersion: msk.KafkaVersion.V2_8_1, + vpc, + logging: { + s3: { + bucket, + }, + }, +}); +``` + +When the S3 destination is configured, AWS will automatically create an S3 bucket policy +that allows the service to write logs to the bucket. This makes it impossible to later update +that bucket policy. To have CDK create the bucket policy so that future updates can be made, +the `@aws-cdk/aws-s3:createDefaultLoggingPolicy` [feature flag](https://docs.aws.amazon.com/cdk/v2/guide/featureflags.html) can be used. This can be set +in the `cdk.json` file. + +```json +{ + "context": { + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true + } +} +``` + diff --git a/packages/@aws-cdk/aws-msk/lib/cluster.ts b/packages/@aws-cdk/aws-msk/lib/cluster.ts index 8dfdae4561004..11660067d4263 100644 --- a/packages/@aws-cdk/aws-msk/lib/cluster.ts +++ b/packages/@aws-cdk/aws-msk/lib/cluster.ts @@ -11,6 +11,8 @@ import * as constructs from 'constructs'; import { addressOf } from 'constructs/lib/private/uniqueid'; import { KafkaVersion } from './'; import { CfnCluster } from './msk.generated'; +import { FeatureFlags } from '@aws-cdk/core'; +import { S3_CREATE_DEFAULT_LOGGING_POLICY } from '@aws-cdk/cx-api'; /** * Represents a MSK Cluster @@ -502,6 +504,55 @@ export class Cluster extends ClusterBase { } : undefined; + const loggingBucket = props.logging?.s3?.bucket; + if (loggingBucket && FeatureFlags.of(this).isEnabled(S3_CREATE_DEFAULT_LOGGING_POLICY)) { + const stack = core.Stack.of(this); + loggingBucket.addToResourcePolicy(new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + principals: [ + new iam.ServicePrincipal('delivery.logs.amazonaws.com'), + ], + resources: [ + loggingBucket.arnForObjects(`AWSLogs/${stack.account}/*`), + ], + actions: ['s3:PutObject'], + conditions: { + StringEquals: { + 's3:x-amz-acl': 'bucket-owner-full-control', + 'aws:SourceAccount': stack.account, + }, + ArnLike: { + 'aws:SourceArn': stack.formatArn({ + service: 'logs', + resource: '*', + }), + }, + }, + })); + + loggingBucket.addToResourcePolicy(new iam.PolicyStatement({ + effect: iam.Effect.ALLOW, + principals: [ + new iam.ServicePrincipal('delivery.logs.amazonaws.com'), + ], + resources: [loggingBucket.bucketArn], + actions: [ + 's3:GetBucketAcl', + 's3:ListBucket', + ], + conditions: { + StringEquals: { + 'aws:SourceAccount': stack.account, + }, + ArnLike: { + 'aws:SourceArn': stack.formatArn({ + service: 'logs', + resource: '*', + }), + }, + }, + })); + } const loggingInfo = { brokerLogs: { cloudWatchLogs: { @@ -518,8 +569,8 @@ export class Cluster extends ClusterBase { props.logging?.firehoseDeliveryStreamName, }, s3: { - enabled: props.logging?.s3?.bucket !== undefined, - bucket: props.logging?.s3?.bucket.bucketName, + enabled: loggingBucket !== undefined, + bucket: loggingBucket?.bucketName, prefix: props.logging?.s3?.prefix, }, }, diff --git a/packages/@aws-cdk/aws-msk/package.json b/packages/@aws-cdk/aws-msk/package.json index 6f109175f51d5..e11470b17d92c 100644 --- a/packages/@aws-cdk/aws-msk/package.json +++ b/packages/@aws-cdk/aws-msk/package.json @@ -85,6 +85,7 @@ "@aws-cdk/assertions": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", + "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.5.2", @@ -99,6 +100,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", "constructs": "^10.0.0" }, @@ -111,6 +113,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", "constructs": "^10.0.0" }, diff --git a/packages/@aws-cdk/aws-msk/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-msk/rosetta/default.ts-fixture index e6009423c7553..3bbdf64fe3ceb 100644 --- a/packages/@aws-cdk/aws-msk/rosetta/default.ts-fixture +++ b/packages/@aws-cdk/aws-msk/rosetta/default.ts-fixture @@ -3,10 +3,11 @@ import { CfnOutput, Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import * as msk from '@aws-cdk/aws-msk'; import * as ec2 from '@aws-cdk/aws-ec2'; +import * as s3 from '@aws-cdk/aws-s3'; class Fixture extends Stack { constructor(scope: Construct, id: string) { super(scope, id); /// here } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.template.json b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.template.json new file mode 100644 index 0000000000000..00c8b93613626 --- /dev/null +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/MskLoggingDefaultTestDeployAssertC2F074AF.template.json @@ -0,0 +1,207 @@ +{ + "Resources": { + "AwsApiCallS3listObjectsV2": { + "Type": "Custom::DeployAssert@SdkCallS3listObjectsV2", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "S3", + "api": "listObjectsV2", + "parameters": { + "Bucket": { + "Fn::ImportValue": "aws-cdk-msk-integ:ExportsOutputRefLoggingBucket1E5A6F3B2AAAD6ED" + }, + "MaxKeys": 1, + "Prefix": { + "Fn::Join": [ + "", + [ + "AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/KafkaBrokerLogs" + ] + ] + } + }, + "flattenResponse": "false", + "salt": "1656507721421" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AwsApiCallS3listObjectsV2AssertEqualsS3listObjectsV26A93E391": { + "Type": "Custom::DeployAssert@AssertEquals", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "actual": { + "Fn::GetAtt": [ + "AwsApiCallS3listObjectsV2", + "apiCallResponse" + ] + }, + "expected": "{\"$ObjectLike\":{\"KeyCount\":1}}", + "salt": "1656507721421" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ], + "Policies": [ + { + "PolicyName": "Inline", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "s3:ListObjectsV2" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + }, + { + "Action": [ + "s3:ListBucket" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::ImportValue": "aws-cdk-msk-integ:ExportsOutputFnGetAttLoggingBucket1E5A6F3BArn248EC7EA" + } + ] + }, + { + "Action": [ + "s3:GetObject" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::ImportValue": "aws-cdk-msk-integ:ExportsOutputFnGetAttLoggingBucket1E5A6F3BArn248EC7EA" + }, + "/*" + ] + ] + } + ] + } + ] + } + } + ] + } + }, + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Runtime": "nodejs14.x", + "Code": { + "S3Bucket": { + "Ref": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3BucketA9F12763" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3VersionKey589F30A2" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3VersionKey589F30A2" + } + ] + } + ] + } + ] + ] + } + }, + "Timeout": 120, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + } + }, + "Outputs": { + "AssertionResultsAssertEqualsS3listObjectsV2": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallS3listObjectsV2AssertEqualsS3listObjectsV26A93E391", + "data" + ] + } + } + }, + "Parameters": { + "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3BucketA9F12763": { + "Type": "String", + "Description": "S3 bucket for asset \"41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736\"" + }, + "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3VersionKey589F30A2": { + "Type": "String", + "Description": "S3 key for asset version \"41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736\"" + }, + "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736ArtifactHash2CC614EA": { + "Type": "String", + "Description": "Artifact hash for asset \"41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736\"" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/__entrypoint__.js b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/__entrypoint__.js new file mode 100644 index 0000000000000..2edadd0dd9ca5 --- /dev/null +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/__entrypoint__.js @@ -0,0 +1,117 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = exports.external = void 0; +const https = require("https"); +const url = require("url"); +// for unit tests +exports.external = { + sendHttpRequest: defaultSendHttpRequest, + log: defaultLog, + includeStackTraces: true, + userHandlerIndex: './index', +}; +const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; +const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; +async function handler(event, context) { + exports.external.log(JSON.stringify(event, undefined, 2)); + // ignore DELETE event when the physical resource ID is the marker that + // indicates that this DELETE is a subsequent DELETE to a failed CREATE + // operation. + if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { + exports.external.log('ignoring DELETE event caused by a failed CREATE event'); + await submitResponse('SUCCESS', event); + return; + } + try { + // invoke the user handler. this is intentionally inside the try-catch to + // ensure that if there is an error it's reported as a failure to + // cloudformation (otherwise cfn waits). + // eslint-disable-next-line @typescript-eslint/no-require-imports + const userHandler = require(exports.external.userHandlerIndex).handler; + const result = await userHandler(event, context); + // validate user response and create the combined event + const responseEvent = renderResponse(event, result); + // submit to cfn as success + await submitResponse('SUCCESS', responseEvent); + } + catch (e) { + const resp = { + ...event, + Reason: exports.external.includeStackTraces ? e.stack : e.message, + }; + if (!resp.PhysicalResourceId) { + // special case: if CREATE fails, which usually implies, we usually don't + // have a physical resource id. in this case, the subsequent DELETE + // operation does not have any meaning, and will likely fail as well. to + // address this, we use a marker so the provider framework can simply + // ignore the subsequent DELETE. + if (event.RequestType === 'Create') { + exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); + resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; + } + else { + // otherwise, if PhysicalResourceId is not specified, something is + // terribly wrong because all other events should have an ID. + exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); + } + } + // this is an actual error, fail the activity altogether and exist. + await submitResponse('FAILED', resp); + } +} +exports.handler = handler; +function renderResponse(cfnRequest, handlerResponse = {}) { + // if physical ID is not returned, we have some defaults for you based + // on the request type. + const physicalResourceId = handlerResponse.PhysicalResourceId ?? cfnRequest.PhysicalResourceId ?? cfnRequest.RequestId; + // if we are in DELETE and physical ID was changed, it's an error. + if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); + } + // merge request event and result event (result prevails). + return { + ...cfnRequest, + ...handlerResponse, + PhysicalResourceId: physicalResourceId, + }; +} +async function submitResponse(status, event) { + const json = { + Status: status, + Reason: event.Reason ?? status, + StackId: event.StackId, + RequestId: event.RequestId, + PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, + LogicalResourceId: event.LogicalResourceId, + NoEcho: event.NoEcho, + Data: event.Data, + }; + exports.external.log('submit response to cloudformation', json); + const responseBody = JSON.stringify(json); + const parsedUrl = url.parse(event.ResponseURL); + const req = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { 'content-type': '', 'content-length': responseBody.length }, + }; + await exports.external.sendHttpRequest(req, responseBody); +} +async function defaultSendHttpRequest(options, responseBody) { + return new Promise((resolve, reject) => { + try { + const request = https.request(options, _ => resolve()); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); +} +function defaultLog(fmt, ...params) { + // eslint-disable-next-line no-console + console.log(fmt, ...params); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBRTNCLGlCQUFpQjtBQUNKLFFBQUEsUUFBUSxHQUFHO0lBQ3RCLGVBQWUsRUFBRSxzQkFBc0I7SUFDdkMsR0FBRyxFQUFFLFVBQVU7SUFDZixrQkFBa0IsRUFBRSxJQUFJO0lBQ3hCLGdCQUFnQixFQUFFLFNBQVM7Q0FDNUIsQ0FBQztBQUVGLE1BQU0sZ0NBQWdDLEdBQUcsd0RBQXdELENBQUM7QUFDbEcsTUFBTSwwQkFBMEIsR0FBRyw4REFBOEQsQ0FBQztBQVczRixLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtELEVBQUUsT0FBMEI7SUFDMUcsZ0JBQVEsQ0FB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2VuZEh0dHBSZXF1ZXN0KHJlcSwgcmVzcG9uc2VCb2R5KTtcbn1cblxuYXN5bmMgZnVuY3Rpb24gZGVmYXVsdFNlbmRIdHRwUmVxdWVzdChvcHRpb25zOiBodHRwcy5SZXF1ZXN0T3B0aW9ucywgcmVzcG9uc2VCb2R5OiBzdHJpbmcpOiBQcm9taXNlPHZvaWQ+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICB0cnkge1xuICAgICAgY29uc3QgcmVxdWVzdCA9IGh0dHBzLnJlcXVlc3Qob3B0aW9ucywgXyA9PiByZXNvbHZlKCkpO1xuICAgICAgcmVxdWVzdC5vbignZXJyb3InLCByZWplY3QpO1xuICAgICAgcmVxdWVzdC53cml0ZShyZXNwb25zZUJvZHkpO1xuICAgICAgcmVxdWVzdC5lbmQoKTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZWplY3QoZSk7XG4gICAgfVxuICB9KTtcbn1cblxuZnVuY3Rpb24gZGVmYXVsdExvZyhmbXQ6IHN0cmluZywgLi4ucGFyYW1zOiBhbnlbXSkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tY29uc29sZVxuICBjb25zb2xlLmxvZyhmbXQsIC4uLnBhcmFtcyk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/index.d.ts b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/index.d.ts new file mode 100644 index 0000000000000..3554dc94d4617 --- /dev/null +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/index.d.ts @@ -0,0 +1 @@ +export declare function handler(event: AWSLambda.CloudFormationCustomResourceEvent): Promise; diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/index.js b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/index.js new file mode 100644 index 0000000000000..7ce4156d4ba41 --- /dev/null +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/index.js @@ -0,0 +1,78 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = void 0; +// eslint-disable-next-line import/no-extraneous-dependencies +const aws_sdk_1 = require("aws-sdk"); +const AUTO_DELETE_OBJECTS_TAG = 'aws-cdk:auto-delete-objects'; +const s3 = new aws_sdk_1.S3(); +async function handler(event) { + switch (event.RequestType) { + case 'Create': + return; + case 'Update': + return onUpdate(event); + case 'Delete': + return onDelete(event.ResourceProperties?.BucketName); + } +} +exports.handler = handler; +async function onUpdate(event) { + const updateEvent = event; + const oldBucketName = updateEvent.OldResourceProperties?.BucketName; + const newBucketName = updateEvent.ResourceProperties?.BucketName; + const bucketNameHasChanged = newBucketName != null && oldBucketName != null && newBucketName !== oldBucketName; + /* If the name of the bucket has changed, CloudFormation will try to delete the bucket + and create a new one with the new name. So we have to delete the contents of the + bucket so that this operation does not fail. */ + if (bucketNameHasChanged) { + return onDelete(oldBucketName); + } +} +/** + * Recursively delete all items in the bucket + * + * @param bucketName the bucket name + */ +async function emptyBucket(bucketName) { + const listedObjects = await s3.listObjectVersions({ Bucket: bucketName }).promise(); + const contents = [...listedObjects.Versions ?? [], ...listedObjects.DeleteMarkers ?? []]; + if (contents.length === 0) { + return; + } + const records = contents.map((record) => ({ Key: record.Key, VersionId: record.VersionId })); + await s3.deleteObjects({ Bucket: bucketName, Delete: { Objects: records } }).promise(); + if (listedObjects?.IsTruncated) { + await emptyBucket(bucketName); + } +} +async function onDelete(bucketName) { + if (!bucketName) { + throw new Error('No BucketName was provided.'); + } + if (!await isBucketTaggedForDeletion(bucketName)) { + process.stdout.write(`Bucket does not have '${AUTO_DELETE_OBJECTS_TAG}' tag, skipping cleaning.\n`); + return; + } + try { + await emptyBucket(bucketName); + } + catch (e) { + if (e.code !== 'NoSuchBucket') { + throw e; + } + // Bucket doesn't exist. Ignoring + } +} +/** + * The bucket will only be tagged for deletion if it's being deleted in the same + * deployment as this Custom Resource. + * + * If the Custom Resource is every deleted before the bucket, it must be because + * `autoDeleteObjects` has been switched to false, in which case the tag would have + * been removed before we get to this Delete event. + */ +async function isBucketTaggedForDeletion(bucketName) { + const response = await s3.getBucketTagging({ Bucket: bucketName }).promise(); + return response.TagSet.some(tag => tag.Key === AUTO_DELETE_OBJECTS_TAG && tag.Value === 'true'); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2REFBNkQ7QUFDN0QscUNBQTZCO0FBRTdCLE1BQU0sdUJBQXVCLEdBQUcsNkJBQTZCLENBQUM7QUFFOUQsTUFBTSxFQUFFLEdBQUcsSUFBSSxZQUFFLEVBQUUsQ0FBQztBQUViLEtBQUssVUFBVSxPQUFPLENBQUMsS0FBa0Q7SUFDOUUsUUFBUSxLQUFLLENBQUMsV0FBVyxFQUFFO1FBQ3pCLEtBQUssUUFBUTtZQUNYLE9BQU87UUFDVCxLQUFLLFFBQVE7WUFDWCxPQUFPLFFBQVEsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUN6QixLQUFLLFFBQVE7WUFDWCxPQUFPLFFBQVEsQ0FBQyxLQUFLLENBQUMsa0JBQWtCLEVBQUUsVUFBVSxDQUFDLENBQUM7S0FDekQ7QUFDSCxDQUFD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05vU3VjaEJ1Y2tldCcpIHtcbiAgICAgIHRocm93IGU7XG4gICAgfVxuICAgIC8vIEJ1Y2tldCBkb2Vzbid0IGV4aXN0LiBJZ25vcmluZ1xuICB9XG59XG5cbi8qKlxuICogVGhlIGJ1Y2tldCB3aWxsIG9ubHkgYmUgdGFnZ2VkIGZvciBkZWxldGlvbiBpZiBpdCdzIGJlaW5nIGRlbGV0ZWQgaW4gdGhlIHNhbWVcbiAqIGRlcGxveW1lbnQgYXMgdGhpcyBDdXN0b20gUmVzb3VyY2UuXG4gKlxuICogSWYgdGhlIEN1c3RvbSBSZXNvdXJjZSBpcyBldmVyeSBkZWxldGVkIGJlZm9yZSB0aGUgYnVja2V0LCBpdCBtdXN0IGJlIGJlY2F1c2VcbiAqIGBhdXRvRGVsZXRlT2JqZWN0c2AgaGFzIGJlZW4gc3dpdGNoZWQgdG8gZmFsc2UsIGluIHdoaWNoIGNhc2UgdGhlIHRhZyB3b3VsZCBoYXZlXG4gKiBiZWVuIHJlbW92ZWQgYmVmb3JlIHdlIGdldCB0byB0aGlzIERlbGV0ZSBldmVudC5cbiAqL1xuYXN5bmMgZnVuY3Rpb24gaXNCdWNrZXRUYWdnZWRGb3JEZWxldGlvbihidWNrZXROYW1lOiBzdHJpbmcpIHtcbiAgY29uc3QgcmVzcG9uc2UgPSBhd2FpdCBzMy5nZXRCdWNrZXRUYWdnaW5nKHsgQnVja2V0OiBidWNrZXROYW1lIH0pLnByb21pc2UoKTtcbiAgcmV0dXJuIHJlc3BvbnNlLlRhZ1NldC5zb21lKHRhZyA9PiB0YWcuS2V5ID09PSBBVVRPX0RFTEVURV9PQkpFQ1RTX1RBRyAmJiB0YWcuVmFsdWUgPT09ICd0cnVlJyk7XG59Il19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/index.ts b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/index.ts new file mode 100644 index 0000000000000..2459d44ab1d18 --- /dev/null +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/index.ts @@ -0,0 +1,82 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { S3 } from 'aws-sdk'; + +const AUTO_DELETE_OBJECTS_TAG = 'aws-cdk:auto-delete-objects'; + +const s3 = new S3(); + +export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent) { + switch (event.RequestType) { + case 'Create': + return; + case 'Update': + return onUpdate(event); + case 'Delete': + return onDelete(event.ResourceProperties?.BucketName); + } +} + +async function onUpdate(event: AWSLambda.CloudFormationCustomResourceEvent) { + const updateEvent = event as AWSLambda.CloudFormationCustomResourceUpdateEvent; + const oldBucketName = updateEvent.OldResourceProperties?.BucketName; + const newBucketName = updateEvent.ResourceProperties?.BucketName; + const bucketNameHasChanged = newBucketName != null && oldBucketName != null && newBucketName !== oldBucketName; + + /* If the name of the bucket has changed, CloudFormation will try to delete the bucket + and create a new one with the new name. So we have to delete the contents of the + bucket so that this operation does not fail. */ + if (bucketNameHasChanged) { + return onDelete(oldBucketName); + } +} + +/** + * Recursively delete all items in the bucket + * + * @param bucketName the bucket name + */ +async function emptyBucket(bucketName: string) { + const listedObjects = await s3.listObjectVersions({ Bucket: bucketName }).promise(); + const contents = [...listedObjects.Versions ?? [], ...listedObjects.DeleteMarkers ?? []]; + if (contents.length === 0) { + return; + } + + const records = contents.map((record: any) => ({ Key: record.Key, VersionId: record.VersionId })); + await s3.deleteObjects({ Bucket: bucketName, Delete: { Objects: records } }).promise(); + + if (listedObjects?.IsTruncated) { + await emptyBucket(bucketName); + } +} + +async function onDelete(bucketName?: string) { + if (!bucketName) { + throw new Error('No BucketName was provided.'); + } + if (!await isBucketTaggedForDeletion(bucketName)) { + process.stdout.write(`Bucket does not have '${AUTO_DELETE_OBJECTS_TAG}' tag, skipping cleaning.\n`); + return; + } + try { + await emptyBucket(bucketName); + } catch (e) { + if (e.code !== 'NoSuchBucket') { + throw e; + } + // Bucket doesn't exist. Ignoring + } +} + +/** + * The bucket will only be tagged for deletion if it's being deleted in the same + * deployment as this Custom Resource. + * + * If the Custom Resource is every deleted before the bucket, it must be because + * `autoDeleteObjects` has been switched to false, in which case the tag would have + * been removed before we get to this Delete event. + */ +async function isBucketTaggedForDeletion(bucketName: string) { + const response = await s3.getBucketTagging({ Bucket: bucketName }).promise(); + return response.TagSet.some(tag => tag.Key === AUTO_DELETE_OBJECTS_TAG && tag.Value === 'true'); +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736.bundle/index.js b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736.bundle/index.js new file mode 100644 index 0000000000000..83f8199656820 --- /dev/null +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736.bundle/index.js @@ -0,0 +1,617 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/assertions/providers/lambda-handler/index.ts +var lambda_handler_exports = {}; +__export(lambda_handler_exports, { + handler: () => handler +}); +module.exports = __toCommonJS(lambda_handler_exports); + +// ../assertions/lib/matcher.ts +var Matcher = class { + static isMatcher(x) { + return x && x instanceof Matcher; + } +}; +var MatchResult = class { + constructor(target) { + this.failures = []; + this.captures = /* @__PURE__ */ new Map(); + this.finalized = false; + this.target = target; + } + push(matcher, path, message) { + return this.recordFailure({ matcher, path, message }); + } + recordFailure(failure) { + this.failures.push(failure); + return this; + } + hasFailed() { + return this.failures.length !== 0; + } + get failCount() { + return this.failures.length; + } + compose(id, inner) { + const innerF = inner.failures; + this.failures.push(...innerF.map((f) => { + return { path: [id, ...f.path], message: f.message, matcher: f.matcher }; + })); + inner.captures.forEach((vals, capture) => { + vals.forEach((value) => this.recordCapture({ capture, value })); + }); + return this; + } + finished() { + if (this.finalized) { + return this; + } + if (this.failCount === 0) { + this.captures.forEach((vals, cap) => cap._captured.push(...vals)); + } + this.finalized = true; + return this; + } + toHumanStrings() { + return this.failures.map((r) => { + const loc = r.path.length === 0 ? "" : ` at ${r.path.join("")}`; + return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`; + }); + } + recordCapture(options) { + let values = this.captures.get(options.capture); + if (values === void 0) { + values = []; + } + values.push(options.value); + this.captures.set(options.capture, values); + } +}; + +// ../assertions/lib/private/matchers/absent.ts +var AbsentMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual !== void 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Received ${actual}, but key should be absent` + }); + } + return result; + } +}; + +// ../assertions/lib/private/type.ts +function getType(obj) { + return Array.isArray(obj) ? "array" : typeof obj; +} + +// ../assertions/lib/match.ts +var Match = class { + static absent() { + return new AbsentMatch("absent"); + } + static arrayWith(pattern) { + return new ArrayMatch("arrayWith", pattern); + } + static arrayEquals(pattern) { + return new ArrayMatch("arrayEquals", pattern, { subsequence: false }); + } + static exact(pattern) { + return new LiteralMatch("exact", pattern, { partialObjects: false }); + } + static objectLike(pattern) { + return new ObjectMatch("objectLike", pattern); + } + static objectEquals(pattern) { + return new ObjectMatch("objectEquals", pattern, { partial: false }); + } + static not(pattern) { + return new NotMatch("not", pattern); + } + static serializedJson(pattern) { + return new SerializedJson("serializedJson", pattern); + } + static anyValue() { + return new AnyMatch("anyValue"); + } + static stringLikeRegexp(pattern) { + return new StringLikeRegexpMatch("stringLikeRegexp", pattern); + } +}; +var LiteralMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partialObjects = options.partialObjects ?? false; + if (Matcher.isMatcher(this.pattern)) { + throw new Error("LiteralMatch cannot directly contain another matcher. Remove the top-level matcher or nest it more deeply."); + } + } + test(actual) { + if (Array.isArray(this.pattern)) { + return new ArrayMatch(this.name, this.pattern, { subsequence: false, partialObjects: this.partialObjects }).test(actual); + } + if (typeof this.pattern === "object") { + return new ObjectMatch(this.name, this.pattern, { partial: this.partialObjects }).test(actual); + } + const result = new MatchResult(actual); + if (typeof this.pattern !== typeof actual) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected type ${typeof this.pattern} but received ${getType(actual)}` + }); + return result; + } + if (actual !== this.pattern) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected ${this.pattern} but received ${actual}` + }); + } + return result; + } +}; +var ArrayMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.subsequence = options.subsequence ?? true; + this.partialObjects = options.partialObjects ?? false; + } + test(actual) { + if (!Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type array but received ${getType(actual)}` + }); + } + if (!this.subsequence && this.pattern.length !== actual.length) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected array of length ${this.pattern.length} but received ${actual.length}` + }); + } + let patternIdx = 0; + let actualIdx = 0; + const result = new MatchResult(actual); + while (patternIdx < this.pattern.length && actualIdx < actual.length) { + const patternElement = this.pattern[patternIdx]; + const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); + const matcherName = matcher.name; + if (this.subsequence && (matcherName == "absent" || matcherName == "anyValue")) { + throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`); + } + const innerResult = matcher.test(actual[actualIdx]); + if (!this.subsequence || !innerResult.hasFailed()) { + result.compose(`[${actualIdx}]`, innerResult); + patternIdx++; + actualIdx++; + } else { + actualIdx++; + } + } + for (; patternIdx < this.pattern.length; patternIdx++) { + const pattern = this.pattern[patternIdx]; + const element = Matcher.isMatcher(pattern) || typeof pattern === "object" ? " " : ` [${pattern}] `; + result.recordFailure({ + matcher: this, + path: [], + message: `Missing element${element}at pattern index ${patternIdx}` + }); + } + return result; + } +}; +var ObjectMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partial = options.partial ?? true; + } + test(actual) { + if (typeof actual !== "object" || Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type object but received ${getType(actual)}` + }); + } + const result = new MatchResult(actual); + if (!this.partial) { + for (const a of Object.keys(actual)) { + if (!(a in this.pattern)) { + result.recordFailure({ + matcher: this, + path: [`/${a}`], + message: "Unexpected key" + }); + } + } + } + for (const [patternKey, patternVal] of Object.entries(this.pattern)) { + if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) { + result.recordFailure({ + matcher: this, + path: [`/${patternKey}`], + message: `Missing key '${patternKey}' among {${Object.keys(actual).join(",")}}` + }); + continue; + } + const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial }); + const inner = matcher.test(actual[patternKey]); + result.compose(`/${patternKey}`, inner); + } + return result; + } +}; +var SerializedJson = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + if (getType(actual) !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected JSON as a string but found ${getType(actual)}` + }); + return result; + } + let parsed; + try { + parsed = JSON.parse(actual); + } catch (err) { + if (err instanceof SyntaxError) { + result.recordFailure({ + matcher: this, + path: [], + message: `Invalid JSON string: ${actual}` + }); + return result; + } else { + throw err; + } + } + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(parsed); + result.compose(`(${this.name})`, innerResult); + return result; + } +}; +var NotMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(actual); + const result = new MatchResult(actual); + if (innerResult.failCount === 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Found unexpected match: ${JSON.stringify(actual, void 0, 2)}` + }); + } + return result; + } +}; +var AnyMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual == null) { + result.recordFailure({ + matcher: this, + path: [], + message: "Expected a value but found none" + }); + } + return result; + } +}; +var StringLikeRegexpMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + const regex = new RegExp(this.pattern, "gm"); + if (typeof actual !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected a string, but got '${typeof actual}'` + }); + } + if (!regex.test(actual)) { + result.recordFailure({ + matcher: this, + path: [], + message: `String '${actual}' did not match pattern '${this.pattern}'` + }); + } + return result; + } +}; + +// lib/assertions/providers/lambda-handler/base.ts +var https = __toESM(require("https")); +var url = __toESM(require("url")); +var CustomResourceHandler = class { + constructor(event, context) { + this.event = event; + this.context = context; + this.timedOut = false; + this.timeout = setTimeout(async () => { + await this.respond({ + status: "FAILED", + reason: "Lambda Function Timeout", + data: this.context.logStreamName + }); + this.timedOut = true; + }, context.getRemainingTimeInMillis() - 1200); + this.event = event; + this.physicalResourceId = extractPhysicalResourceId(event); + } + async handle() { + try { + console.log(`Event: ${JSON.stringify(this.event)}`); + const response = await this.processEvent(this.event.ResourceProperties); + console.log(`Event output : ${JSON.stringify(response)}`); + await this.respond({ + status: "SUCCESS", + reason: "OK", + data: response + }); + } catch (e) { + console.log(e); + await this.respond({ + status: "FAILED", + reason: e.message ?? "Internal Error" + }); + } finally { + clearTimeout(this.timeout); + } + } + respond(response) { + if (this.timedOut) { + return; + } + const cfResponse = { + Status: response.status, + Reason: response.reason, + PhysicalResourceId: this.physicalResourceId, + StackId: this.event.StackId, + RequestId: this.event.RequestId, + LogicalResourceId: this.event.LogicalResourceId, + NoEcho: false, + Data: response.data + }; + const responseBody = JSON.stringify(cfResponse); + console.log("Responding to CloudFormation", responseBody); + const parsedUrl = url.parse(this.event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: "PUT", + headers: { "content-type": "", "content-length": responseBody.length } + }; + return new Promise((resolve, reject) => { + try { + const request2 = https.request(requestOptions, resolve); + request2.on("error", reject); + request2.write(responseBody); + request2.end(); + } catch (e) { + reject(e); + } + }); + } +}; +function extractPhysicalResourceId(event) { + switch (event.RequestType) { + case "Create": + return event.LogicalResourceId; + case "Update": + case "Delete": + return event.PhysicalResourceId; + } +} + +// lib/assertions/providers/lambda-handler/assertion.ts +var AssertionHandler = class extends CustomResourceHandler { + async processEvent(request2) { + let actual = decodeCall(request2.actual); + const expected = decodeCall(request2.expected); + let result; + const matcher = new MatchCreator(expected).getMatcher(); + console.log(`Testing equality between ${JSON.stringify(request2.actual)} and ${JSON.stringify(request2.expected)}`); + const matchResult = matcher.test(actual); + matchResult.finished(); + if (matchResult.hasFailed()) { + result = { + data: JSON.stringify({ + status: "fail", + message: [ + ...matchResult.toHumanStrings(), + JSON.stringify(matchResult.target, void 0, 2) + ].join("\n") + }) + }; + if (request2.failDeployment) { + throw new Error(result.data); + } + } else { + result = { + data: JSON.stringify({ + status: "pass" + }) + }; + } + return result; + } +}; +var MatchCreator = class { + constructor(obj) { + this.parsedObj = { + matcher: obj + }; + } + getMatcher() { + try { + const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) { + const nested = Object.keys(v)[0]; + switch (nested) { + case "$ArrayWith": + return Match.arrayWith(v[nested]); + case "$ObjectLike": + return Match.objectLike(v[nested]); + case "$StringLike": + return Match.stringLikeRegexp(v[nested]); + default: + return v; + } + }); + if (Matcher.isMatcher(final.matcher)) { + return final.matcher; + } + return Match.exact(final.matcher); + } catch { + return Match.exact(this.parsedObj.matcher); + } + } +}; +function decodeCall(call) { + if (!call) { + return void 0; + } + try { + const parsed = JSON.parse(call); + return parsed; + } catch (e) { + return call; + } +} + +// lib/assertions/providers/lambda-handler/utils.ts +function decode(object) { + return JSON.parse(JSON.stringify(object), (_k, v) => { + switch (v) { + case "TRUE:BOOLEAN": + return true; + case "FALSE:BOOLEAN": + return false; + default: + return v; + } + }); +} + +// lib/assertions/providers/lambda-handler/sdk.ts +function flatten(object) { + return Object.assign({}, ...function _flatten(child, path = []) { + return [].concat(...Object.keys(child).map((key) => { + const childKey = Buffer.isBuffer(child[key]) ? child[key].toString("utf8") : child[key]; + return typeof childKey === "object" && childKey !== null ? _flatten(childKey, path.concat([key])) : { [path.concat([key]).join(".")]: childKey }; + })); + }(object)); +} +var AwsApiCallHandler = class extends CustomResourceHandler { + async processEvent(request2) { + const AWS = require("aws-sdk"); + console.log(`AWS SDK VERSION: ${AWS.VERSION}`); + const service = new AWS[request2.service](); + const response = await service[request2.api](request2.parameters && decode(request2.parameters)).promise(); + console.log(`SDK response received ${JSON.stringify(response)}`); + delete response.ResponseMetadata; + const respond = { + apiCallResponse: response + }; + const flatData = __spreadValues({}, flatten(respond)); + return request2.flattenResponse === "true" ? flatData : respond; + } +}; + +// lib/assertions/providers/lambda-handler/types.ts +var ASSERT_RESOURCE_TYPE = "Custom::DeployAssert@AssertEquals"; +var SDK_RESOURCE_TYPE_PREFIX = "Custom::DeployAssert@SdkCall"; + +// lib/assertions/providers/lambda-handler/index.ts +async function handler(event, context) { + const provider = createResourceHandler(event, context); + await provider.handle(); +} +function createResourceHandler(event, context) { + if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) { + return new AwsApiCallHandler(event, context); + } + switch (event.ResourceType) { + case ASSERT_RESOURCE_TYPE: + return new AssertionHandler(event, context); + default: + throw new Error(`Unsupported resource type "${event.ResourceType}`); + } +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + handler +}); diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90/index.js b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90/index.js deleted file mode 100644 index ddf62f6363bf4..0000000000000 --- a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90/index.js +++ /dev/null @@ -1,250 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = exports.forceSdkInstallation = exports.flatten = exports.PHYSICAL_RESOURCE_ID_REFERENCE = void 0; -/* eslint-disable no-console */ -const child_process_1 = require("child_process"); -const fs = require("fs"); -const path_1 = require("path"); -/** - * Serialized form of the physical resource id for use in the operation parameters - */ -exports.PHYSICAL_RESOURCE_ID_REFERENCE = 'PHYSICAL:RESOURCEID:'; -/** - * Flattens a nested object - * - * @param object the object to be flattened - * @returns a flat object with path as keys - */ -function flatten(object) { - return Object.assign({}, ...function _flatten(child, path = []) { - return [].concat(...Object.keys(child) - .map(key => { - const childKey = Buffer.isBuffer(child[key]) ? child[key].toString('utf8') : child[key]; - return typeof childKey === 'object' && childKey !== null - ? _flatten(childKey, path.concat([key])) - : ({ [path.concat([key]).join('.')]: childKey }); - })); - }(object)); -} -exports.flatten = flatten; -/** - * Decodes encoded special values (physicalResourceId) - */ -function decodeSpecialValues(object, physicalResourceId) { - return JSON.parse(JSON.stringify(object), (_k, v) => { - switch (v) { - case exports.PHYSICAL_RESOURCE_ID_REFERENCE: - return physicalResourceId; - default: - return v; - } - }); -} -/** - * Filters the keys of an object. - */ -function filterKeys(object, pred) { - return Object.entries(object) - .reduce((acc, [k, v]) => pred(k) - ? { ...acc, [k]: v } - : acc, {}); -} -let latestSdkInstalled = false; -function forceSdkInstallation() { - latestSdkInstalled = false; -} -exports.forceSdkInstallation = forceSdkInstallation; -/** - * Installs latest AWS SDK v2 - */ -function installLatestSdk() { - console.log('Installing latest AWS SDK v2'); - // Both HOME and --prefix are needed here because /tmp is the only writable location - child_process_1.execSync('HOME=/tmp npm install aws-sdk@2 --production --no-package-lock --no-save --prefix /tmp'); - latestSdkInstalled = true; -} -// no currently patched services -const patchedServices = []; -/** - * Patches the AWS SDK by loading service models in the same manner as the actual SDK - */ -function patchSdk(awsSdk) { - const apiLoader = awsSdk.apiLoader; - patchedServices.forEach(({ serviceName, apiVersions }) => { - const lowerServiceName = serviceName.toLowerCase(); - if (!awsSdk.Service.hasService(lowerServiceName)) { - apiLoader.services[lowerServiceName] = {}; - awsSdk[serviceName] = awsSdk.Service.defineService(lowerServiceName, apiVersions); - } - else { - awsSdk.Service.addVersions(awsSdk[serviceName], apiVersions); - } - apiVersions.forEach(apiVersion => { - Object.defineProperty(apiLoader.services[lowerServiceName], apiVersion, { - get: function get() { - const modelFilePrefix = `aws-sdk-patch/${lowerServiceName}-${apiVersion}`; - const model = JSON.parse(fs.readFileSync(path_1.join(__dirname, `${modelFilePrefix}.service.json`), 'utf-8')); - model.paginators = JSON.parse(fs.readFileSync(path_1.join(__dirname, `${modelFilePrefix}.paginators.json`), 'utf-8')).pagination; - return model; - }, - enumerable: true, - configurable: true, - }); - }); - }); - return awsSdk; -} -/* eslint-disable @typescript-eslint/no-require-imports, import/no-extraneous-dependencies */ -async function handler(event, context) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _l, _m, _o, _p; - try { - let AWS; - if (!latestSdkInstalled && event.ResourceProperties.InstallLatestAwsSdk === 'true') { - try { - installLatestSdk(); - AWS = require('/tmp/node_modules/aws-sdk'); - } - catch (e) { - console.log(`Failed to install latest AWS SDK v2: ${e}`); - AWS = require('aws-sdk'); // Fallback to pre-installed version - } - } - else if (latestSdkInstalled) { - AWS = require('/tmp/node_modules/aws-sdk'); - } - else { - AWS = require('aws-sdk'); - } - try { - AWS = patchSdk(AWS); - } - catch (e) { - console.log(`Failed to patch AWS SDK: ${e}. Proceeding with the installed copy.`); - } - console.log(JSON.stringify(event)); - console.log('AWS SDK VERSION: ' + AWS.VERSION); - event.ResourceProperties.Create = decodeCall(event.ResourceProperties.Create); - event.ResourceProperties.Update = decodeCall(event.ResourceProperties.Update); - event.ResourceProperties.Delete = decodeCall(event.ResourceProperties.Delete); - // Default physical resource id - let physicalResourceId; - switch (event.RequestType) { - case 'Create': - physicalResourceId = (_j = (_f = (_c = (_b = (_a = event.ResourceProperties.Create) === null || _a === void 0 ? void 0 : _a.physicalResourceId) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : (_e = (_d = event.ResourceProperties.Update) === null || _d === void 0 ? void 0 : _d.physicalResourceId) === null || _e === void 0 ? void 0 : _e.id) !== null && _f !== void 0 ? _f : (_h = (_g = event.ResourceProperties.Delete) === null || _g === void 0 ? void 0 : _g.physicalResourceId) === null || _h === void 0 ? void 0 : _h.id) !== null && _j !== void 0 ? _j : event.LogicalResourceId; - break; - case 'Update': - case 'Delete': - physicalResourceId = (_o = (_m = (_l = event.ResourceProperties[event.RequestType]) === null || _l === void 0 ? void 0 : _l.physicalResourceId) === null || _m === void 0 ? void 0 : _m.id) !== null && _o !== void 0 ? _o : event.PhysicalResourceId; - break; - } - let flatData = {}; - let data = {}; - const call = event.ResourceProperties[event.RequestType]; - if (call) { - let credentials; - if (call.assumedRoleArn) { - const timestamp = (new Date()).getTime(); - const params = { - RoleArn: call.assumedRoleArn, - RoleSessionName: `${timestamp}-${physicalResourceId}`.substring(0, 64), - }; - credentials = new AWS.ChainableTemporaryCredentials({ - params: params, - }); - } - if (!Object.prototype.hasOwnProperty.call(AWS, call.service)) { - throw Error(`Service ${call.service} does not exist in AWS SDK version ${AWS.VERSION}.`); - } - const awsService = new AWS[call.service]({ - apiVersion: call.apiVersion, - credentials: credentials, - region: call.region, - }); - try { - const response = await awsService[call.action](call.parameters && decodeSpecialValues(call.parameters, physicalResourceId)).promise(); - flatData = { - apiVersion: awsService.config.apiVersion, - region: awsService.config.region, - ...flatten(response), - }; - let outputPaths; - if (call.outputPath) { - outputPaths = [call.outputPath]; - } - else if (call.outputPaths) { - outputPaths = call.outputPaths; - } - if (outputPaths) { - data = filterKeys(flatData, startsWithOneOf(outputPaths)); - } - else { - data = flatData; - } - } - catch (e) { - if (!call.ignoreErrorCodesMatching || !new RegExp(call.ignoreErrorCodesMatching).test(e.code)) { - throw e; - } - } - if ((_p = call.physicalResourceId) === null || _p === void 0 ? void 0 : _p.responsePath) { - physicalResourceId = flatData[call.physicalResourceId.responsePath]; - } - } - await respond('SUCCESS', 'OK', physicalResourceId, data); - } - catch (e) { - console.log(e); - await respond('FAILED', e.message || 'Internal Error', context.logStreamName, {}); - } - function respond(responseStatus, reason, physicalResourceId, data) { - const responseBody = JSON.stringify({ - Status: responseStatus, - Reason: reason, - PhysicalResourceId: physicalResourceId, - StackId: event.StackId, - RequestId: event.RequestId, - LogicalResourceId: event.LogicalResourceId, - NoEcho: false, - Data: data, - }); - console.log('Responding', responseBody); - // eslint-disable-next-line @typescript-eslint/no-require-imports - const parsedUrl = require('url').parse(event.ResponseURL); - const requestOptions = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { 'content-type': '', 'content-length': responseBody.length }, - }; - return new Promise((resolve, reject) => { - try { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const request = require('https').request(requestOptions, resolve); - request.on('error', reject); - request.write(responseBody); - request.end(); - } - catch (e) { - reject(e); - } - }); - } -} -exports.handler = handler; -function decodeCall(call) { - if (!call) { - return undefined; - } - return JSON.parse(call); -} -function startsWithOneOf(searchStrings) { - return function (string) { - for (const searchString of searchStrings) { - if (string.startsWith(searchString)) { - return true; - } - } - return false; - }; -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsaURBQXlDO0FBQ3pDLHlCQUF5QjtBQUN6QiwrQkFBNEI7QUFTNUI7O0dBRUc7QUFDVSxRQUFBLDhCQUE4QixHQUFHLHNCQUFzQixDQUFDO0FBRXJFOzs7OztHQUtHO0FBQ0gsU0FBZ0IsT0FBTyxDQUFDLE1BQWM7SUFDcEMsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUNsQixFQUFFLEVBQ0YsR0FBRyxTQUFTLFFBQVEsQ0FBQyxLQUFVLEVBQUUs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dKTogKHN0cmluZzogc3RyaW5nKSA9PiBib29sZWFuIHtcbiAgcmV0dXJuIGZ1bmN0aW9uKHN0cmluZzogc3RyaW5nKTogYm9vbGVhbiB7XG4gICAgZm9yIChjb25zdCBzZWFyY2hTdHJpbmcgb2Ygc2VhcmNoU3RyaW5ncykge1xuICAgICAgaWYgKHN0cmluZy5zdGFydHNXaXRoKHNlYXJjaFN0cmluZykpIHtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBmYWxzZTtcbiAgfTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/index.js b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/index.js new file mode 100644 index 0000000000000..c70e48ee0f357 --- /dev/null +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/index.js @@ -0,0 +1,252 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = exports.forceSdkInstallation = exports.flatten = exports.PHYSICAL_RESOURCE_ID_REFERENCE = void 0; +/* eslint-disable no-console */ +const child_process_1 = require("child_process"); +const fs = require("fs"); +const path_1 = require("path"); +/** + * Serialized form of the physical resource id for use in the operation parameters + */ +exports.PHYSICAL_RESOURCE_ID_REFERENCE = 'PHYSICAL:RESOURCEID:'; +/** + * Flattens a nested object + * + * @param object the object to be flattened + * @returns a flat object with path as keys + */ +function flatten(object) { + return Object.assign({}, ...function _flatten(child, path = []) { + return [].concat(...Object.keys(child) + .map(key => { + const childKey = Buffer.isBuffer(child[key]) ? child[key].toString('utf8') : child[key]; + return typeof childKey === 'object' && childKey !== null + ? _flatten(childKey, path.concat([key])) + : ({ [path.concat([key]).join('.')]: childKey }); + })); + }(object)); +} +exports.flatten = flatten; +/** + * Decodes encoded special values (physicalResourceId) + */ +function decodeSpecialValues(object, physicalResourceId) { + return JSON.parse(JSON.stringify(object), (_k, v) => { + switch (v) { + case exports.PHYSICAL_RESOURCE_ID_REFERENCE: + return physicalResourceId; + default: + return v; + } + }); +} +/** + * Filters the keys of an object. + */ +function filterKeys(object, pred) { + return Object.entries(object) + .reduce((acc, [k, v]) => pred(k) + ? { ...acc, [k]: v } + : acc, {}); +} +let latestSdkInstalled = false; +function forceSdkInstallation() { + latestSdkInstalled = false; +} +exports.forceSdkInstallation = forceSdkInstallation; +/** + * Installs latest AWS SDK v2 + */ +function installLatestSdk() { + console.log('Installing latest AWS SDK v2'); + // Both HOME and --prefix are needed here because /tmp is the only writable location + child_process_1.execSync('HOME=/tmp npm install aws-sdk@2 --production --no-package-lock --no-save --prefix /tmp'); + latestSdkInstalled = true; +} +// no currently patched services +const patchedServices = []; +/** + * Patches the AWS SDK by loading service models in the same manner as the actual SDK + */ +function patchSdk(awsSdk) { + const apiLoader = awsSdk.apiLoader; + patchedServices.forEach(({ serviceName, apiVersions }) => { + const lowerServiceName = serviceName.toLowerCase(); + if (!awsSdk.Service.hasService(lowerServiceName)) { + apiLoader.services[lowerServiceName] = {}; + awsSdk[serviceName] = awsSdk.Service.defineService(lowerServiceName, apiVersions); + } + else { + awsSdk.Service.addVersions(awsSdk[serviceName], apiVersions); + } + apiVersions.forEach(apiVersion => { + Object.defineProperty(apiLoader.services[lowerServiceName], apiVersion, { + get: function get() { + const modelFilePrefix = `aws-sdk-patch/${lowerServiceName}-${apiVersion}`; + const model = JSON.parse(fs.readFileSync(path_1.join(__dirname, `${modelFilePrefix}.service.json`), 'utf-8')); + model.paginators = JSON.parse(fs.readFileSync(path_1.join(__dirname, `${modelFilePrefix}.paginators.json`), 'utf-8')).pagination; + return model; + }, + enumerable: true, + configurable: true, + }); + }); + }); + return awsSdk; +} +/* eslint-disable @typescript-eslint/no-require-imports, import/no-extraneous-dependencies */ +async function handler(event, context) { + try { + let AWS; + if (!latestSdkInstalled && event.ResourceProperties.InstallLatestAwsSdk === 'true') { + try { + installLatestSdk(); + AWS = require('/tmp/node_modules/aws-sdk'); + } + catch (e) { + console.log(`Failed to install latest AWS SDK v2: ${e}`); + AWS = require('aws-sdk'); // Fallback to pre-installed version + } + } + else if (latestSdkInstalled) { + AWS = require('/tmp/node_modules/aws-sdk'); + } + else { + AWS = require('aws-sdk'); + } + try { + AWS = patchSdk(AWS); + } + catch (e) { + console.log(`Failed to patch AWS SDK: ${e}. Proceeding with the installed copy.`); + } + console.log(JSON.stringify(event)); + console.log('AWS SDK VERSION: ' + AWS.VERSION); + event.ResourceProperties.Create = decodeCall(event.ResourceProperties.Create); + event.ResourceProperties.Update = decodeCall(event.ResourceProperties.Update); + event.ResourceProperties.Delete = decodeCall(event.ResourceProperties.Delete); + // Default physical resource id + let physicalResourceId; + switch (event.RequestType) { + case 'Create': + physicalResourceId = event.ResourceProperties.Create?.physicalResourceId?.id ?? + event.ResourceProperties.Update?.physicalResourceId?.id ?? + event.ResourceProperties.Delete?.physicalResourceId?.id ?? + event.LogicalResourceId; + break; + case 'Update': + case 'Delete': + physicalResourceId = event.ResourceProperties[event.RequestType]?.physicalResourceId?.id ?? event.PhysicalResourceId; + break; + } + let flatData = {}; + let data = {}; + const call = event.ResourceProperties[event.RequestType]; + if (call) { + let credentials; + if (call.assumedRoleArn) { + const timestamp = (new Date()).getTime(); + const params = { + RoleArn: call.assumedRoleArn, + RoleSessionName: `${timestamp}-${physicalResourceId}`.substring(0, 64), + }; + credentials = new AWS.ChainableTemporaryCredentials({ + params: params, + }); + } + if (!Object.prototype.hasOwnProperty.call(AWS, call.service)) { + throw Error(`Service ${call.service} does not exist in AWS SDK version ${AWS.VERSION}.`); + } + const awsService = new AWS[call.service]({ + apiVersion: call.apiVersion, + credentials: credentials, + region: call.region, + }); + try { + const response = await awsService[call.action](call.parameters && decodeSpecialValues(call.parameters, physicalResourceId)).promise(); + flatData = { + apiVersion: awsService.config.apiVersion, + region: awsService.config.region, + ...flatten(response), + }; + let outputPaths; + if (call.outputPath) { + outputPaths = [call.outputPath]; + } + else if (call.outputPaths) { + outputPaths = call.outputPaths; + } + if (outputPaths) { + data = filterKeys(flatData, startsWithOneOf(outputPaths)); + } + else { + data = flatData; + } + } + catch (e) { + if (!call.ignoreErrorCodesMatching || !new RegExp(call.ignoreErrorCodesMatching).test(e.code)) { + throw e; + } + } + if (call.physicalResourceId?.responsePath) { + physicalResourceId = flatData[call.physicalResourceId.responsePath]; + } + } + await respond('SUCCESS', 'OK', physicalResourceId, data); + } + catch (e) { + console.log(e); + await respond('FAILED', e.message || 'Internal Error', context.logStreamName, {}); + } + function respond(responseStatus, reason, physicalResourceId, data) { + const responseBody = JSON.stringify({ + Status: responseStatus, + Reason: reason, + PhysicalResourceId: physicalResourceId, + StackId: event.StackId, + RequestId: event.RequestId, + LogicalResourceId: event.LogicalResourceId, + NoEcho: false, + Data: data, + }); + console.log('Responding', responseBody); + // eslint-disable-next-line @typescript-eslint/no-require-imports + const parsedUrl = require('url').parse(event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { 'content-type': '', 'content-length': responseBody.length }, + }; + return new Promise((resolve, reject) => { + try { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const request = require('https').request(requestOptions, resolve); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); + } +} +exports.handler = handler; +function decodeCall(call) { + if (!call) { + return undefined; + } + return JSON.parse(call); +} +function startsWithOneOf(searchStrings) { + return function (string) { + for (const searchString of searchStrings) { + if (string.startsWith(searchString)) { + return true; + } + } + return false; + }; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lc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2VCb2R5KTtcbiAgICAgICAgcmVxdWVzdC5lbmQoKTtcbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgcmVqZWN0KGUpO1xuICAgICAgfVxuICAgIH0pO1xuICB9XG59XG5cbmZ1bmN0aW9uIGRlY29kZUNhbGwoY2FsbDogc3RyaW5nIHwgdW5kZWZpbmVkKSB7XG4gIGlmICghY2FsbCkgeyByZXR1cm4gdW5kZWZpbmVkOyB9XG4gIHJldHVybiBKU09OLnBhcnNlKGNhbGwpO1xufVxuXG5mdW5jdGlvbiBzdGFydHNXaXRoT25lT2Yoc2VhcmNoU3RyaW5nczogc3RyaW5nW10pOiAoc3RyaW5nOiBzdHJpbmcpID0+IGJvb2xlYW4ge1xuICByZXR1cm4gZnVuY3Rpb24oc3RyaW5nOiBzdHJpbmcpOiBib29sZWFuIHtcbiAgICBmb3IgKGNvbnN0IHNlYXJjaFN0cmluZyBvZiBzZWFyY2hTdHJpbmdzKSB7XG4gICAgICBpZiAoc3RyaW5nLnN0YXJ0c1dpdGgoc2VhcmNoU3RyaW5nKSkge1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9O1xufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/aws-cdk-msk-integ.assets.json b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/aws-cdk-msk-integ.assets.json deleted file mode 100644 index 2a98eb808a0f0..0000000000000 --- a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/aws-cdk-msk-integ.assets.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "version": "20.0.0", - "files": { - "9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90": { - "source": { - "path": "asset.9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90", - "packaging": "zip" - }, - "destinations": { - "current_account-current_region": { - "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90.zip", - "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" - } - } - }, - "a0b3f0eacdada4acec6d974c7ae8f68410b31c65b4c202cbd111a3e0d737b86c": { - "source": { - "path": "aws-cdk-msk-integ.template.json", - "packaging": "file" - }, - "destinations": { - "current_account-current_region": { - "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a0b3f0eacdada4acec6d974c7ae8f68410b31c65b4c202cbd111a3e0d737b86c.json", - "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" - } - } - } - }, - "dockerImages": {} -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/aws-cdk-msk-integ.template.json b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/aws-cdk-msk-integ.template.json index a10d017bfc4cb..3f62a69351b72 100644 --- a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/aws-cdk-msk-integ.template.json +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/aws-cdk-msk-integ.template.json @@ -383,6 +383,279 @@ } } }, + "LoggingBucket1E5A6F3B": { + "Type": "AWS::S3::Bucket", + "Properties": { + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "LoggingBucketPolicy21938756": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "LoggingBucket1E5A6F3B" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "LoggingBucket1E5A6F3B", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "LoggingBucket1E5A6F3B", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control", + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "LoggingBucket1E5A6F3B", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + }, + { + "Action": [ + "s3:GetBucketAcl", + "s3:ListBucket" + ], + "Condition": { + "StringEquals": { + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "LoggingBucket1E5A6F3B", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "LoggingBucketAutoDeleteObjectsCustomResource3835D361": { + "Type": "Custom::S3AutoDeleteObjects", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn" + ] + }, + "BucketName": { + "Ref": "LoggingBucket1E5A6F3B" + } + }, + "DependsOn": [ + "LoggingBucketPolicy21938756" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ] + } + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbS3Bucket196AD8D5" + }, + "S3Key": { + "Fn::Join": [ + "", + [ + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbS3VersionKey53E5B9FA" + } + ] + } + ] + }, + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "||", + { + "Ref": "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbS3VersionKey53E5B9FA" + } + ] + } + ] + } + ] + ] + } + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "__entrypoint__.handler", + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + }, + "Runtime": "nodejs14.x", + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "LoggingBucket1E5A6F3B" + }, + " S3 bucket." + ] + ] + } + }, + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + ] + }, "ClusterSecurityGroup0921994B": { "Type": "AWS::EC2::SecurityGroup", "Properties": { @@ -444,7 +717,10 @@ "Enabled": false }, "S3": { - "Enabled": false + "Bucket": { + "Ref": "LoggingBucket1E5A6F3B" + }, + "Enabled": true } } } @@ -552,7 +828,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3BucketB21FB59F" + "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3Bucket648C0EE1" }, "S3Key": { "Fn::Join": [ @@ -565,7 +841,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3VersionKey73D4F058" + "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4" } ] } @@ -578,7 +854,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3VersionKey73D4F058" + "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4" } ] } @@ -604,20 +880,51 @@ } }, "Parameters": { - "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3BucketB21FB59F": { + "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbS3Bucket196AD8D5": { + "Type": "String", + "Description": "S3 bucket for asset \"17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb\"" + }, + "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbS3VersionKey53E5B9FA": { + "Type": "String", + "Description": "S3 key for asset version \"17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb\"" + }, + "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbArtifactHash35F1B2CD": { + "Type": "String", + "Description": "Artifact hash for asset \"17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb\"" + }, + "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3Bucket648C0EE1": { "Type": "String", - "Description": "S3 bucket for asset \"9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90\"" + "Description": "S3 bucket for asset \"c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560\"" }, - "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3VersionKey73D4F058": { + "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4": { "Type": "String", - "Description": "S3 key for asset version \"9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90\"" + "Description": "S3 key for asset version \"c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560\"" }, - "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90ArtifactHashC00C7285": { + "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560ArtifactHash99A6E846": { "Type": "String", - "Description": "Artifact hash for asset \"9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90\"" + "Description": "Artifact hash for asset \"c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560\"" } }, "Outputs": { + "ExportsOutputFnGetAttLoggingBucket1E5A6F3BArn248EC7EA": { + "Value": { + "Fn::GetAtt": [ + "LoggingBucket1E5A6F3B", + "Arn" + ] + }, + "Export": { + "Name": "aws-cdk-msk-integ:ExportsOutputFnGetAttLoggingBucket1E5A6F3BArn248EC7EA" + } + }, + "ExportsOutputRefLoggingBucket1E5A6F3B2AAAD6ED": { + "Value": { + "Ref": "LoggingBucket1E5A6F3B" + }, + "Export": { + "Name": "aws-cdk-msk-integ:ExportsOutputRefLoggingBucket1E5A6F3B2AAAD6ED" + } + }, "BootstrapBrokers": { "Value": { "Fn::GetAtt": [ diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/integ.json b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/integ.json index 31418cff1804a..b762d75c9f7f5 100644 --- a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/integ.json @@ -1,14 +1,11 @@ { "version": "20.0.0", "testCases": { - "integ.cluster": { + "MskLogging/DefaultTest": { "stacks": [ "aws-cdk-msk-integ" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "MskLoggingDefaultTestDeployAssertC2F074AF" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/manifest.json index dddd296a97573..bada785238670 100644 --- a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/manifest.json @@ -19,13 +19,25 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90", - "id": "9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90", + "path": "asset.17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb", + "id": "17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb", "packaging": "zip", - "sourceHash": "9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90", - "s3BucketParameter": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3BucketB21FB59F", - "s3KeyParameter": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3VersionKey73D4F058", - "artifactHashParameter": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90ArtifactHashC00C7285" + "sourceHash": "17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb", + "s3BucketParameter": "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbS3Bucket196AD8D5", + "s3KeyParameter": "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbS3VersionKey53E5B9FA", + "artifactHashParameter": "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbArtifactHash35F1B2CD" + } + }, + { + "type": "aws:cdk:asset", + "data": { + "path": "asset.c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560", + "id": "c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560", + "packaging": "zip", + "sourceHash": "c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560", + "s3BucketParameter": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3Bucket648C0EE1", + "s3KeyParameter": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4", + "artifactHashParameter": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560ArtifactHash99A6E846" } } ], @@ -167,6 +179,72 @@ "data": "VPCVPCGW99B986DC" } ], + "/aws-cdk-msk-integ/LoggingBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LoggingBucket1E5A6F3B" + } + ], + "/aws-cdk-msk-integ/LoggingBucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LoggingBucketPolicy21938756" + } + ], + "/aws-cdk-msk-integ/LoggingBucket/AutoDeleteObjectsCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "LoggingBucketAutoDeleteObjectsCustomResource3835D361" + } + ], + "/aws-cdk-msk-integ/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + } + ], + "/aws-cdk-msk-integ/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F" + } + ], + "/aws-cdk-msk-integ/AssetParameters/17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/S3Bucket": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbS3Bucket196AD8D5" + } + ], + "/aws-cdk-msk-integ/AssetParameters/17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/S3VersionKey": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbS3VersionKey53E5B9FA" + } + ], + "/aws-cdk-msk-integ/AssetParameters/17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/ArtifactHash": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParameters17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccbArtifactHash35F1B2CD" + } + ], + "/aws-cdk-msk-integ/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/S3Bucket": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3Bucket648C0EE1" + } + ], + "/aws-cdk-msk-integ/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/S3VersionKey": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4" + } + ], + "/aws-cdk-msk-integ/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/ArtifactHash": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560ArtifactHash99A6E846" + } + ], "/aws-cdk-msk-integ/Cluster/SecurityGroup/Resource": [ { "type": "aws:cdk:logicalId", @@ -191,6 +269,18 @@ "data": "ClusterBootstrapBrokersBootstrapBrokerStringTls2E6167B7" } ], + "/aws-cdk-msk-integ/Exports/Output{\"Fn::GetAtt\":[\"LoggingBucket1E5A6F3B\",\"Arn\"]}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputFnGetAttLoggingBucket1E5A6F3BArn248EC7EA" + } + ], + "/aws-cdk-msk-integ/Exports/Output{\"Ref\":\"LoggingBucket1E5A6F3B\"}": [ + { + "type": "aws:cdk:logicalId", + "data": "ExportsOutputRefLoggingBucket1E5A6F3B2AAAD6ED" + } + ], "/aws-cdk-msk-integ/AWS679f53fac002430cb0da5b7982bd2287/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", @@ -203,38 +293,96 @@ "data": "AWS679f53fac002430cb0da5b7982bd22872D164C4C" } ], - "/aws-cdk-msk-integ/AssetParameters/9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90/S3Bucket": [ + "/aws-cdk-msk-integ/BootstrapBrokers": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3BucketB21FB59F" + "data": "BootstrapBrokers" } ], - "/aws-cdk-msk-integ/AssetParameters/9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90/S3VersionKey": [ + "/aws-cdk-msk-integ/BootstrapBrokers2": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3VersionKey73D4F058" + "data": "BootstrapBrokers2" + } + ] + }, + "displayName": "aws-cdk-msk-integ" + }, + "MskLoggingDefaultTestDeployAssertC2F074AF": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "MskLoggingDefaultTestDeployAssertC2F074AF.template.json", + "validateOnSynth": false + }, + "dependencies": [ + "aws-cdk-msk-integ" + ], + "metadata": { + "/MskLogging/DefaultTest/DeployAssert": [ + { + "type": "aws:cdk:asset", + "data": { + "path": "asset.41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736.bundle", + "id": "41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736", + "packaging": "zip", + "sourceHash": "41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736", + "s3BucketParameter": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3BucketA9F12763", + "s3KeyParameter": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3VersionKey589F30A2", + "artifactHashParameter": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736ArtifactHash2CC614EA" + } } ], - "/aws-cdk-msk-integ/AssetParameters/9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90/ArtifactHash": [ + "/MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/Default/Default": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90ArtifactHashC00C7285" + "data": "AwsApiCallS3listObjectsV2" } ], - "/aws-cdk-msk-integ/BootstrapBrokers": [ + "/MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/Default/Default": [ { "type": "aws:cdk:logicalId", - "data": "BootstrapBrokers" + "data": "AwsApiCallS3listObjectsV2AssertEqualsS3listObjectsV26A93E391" } ], - "/aws-cdk-msk-integ/BootstrapBrokers2": [ + "/MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/AssertionResults": [ { "type": "aws:cdk:logicalId", - "data": "BootstrapBrokers2" + "data": "AssertionResultsAssertEqualsS3listObjectsV2" + } + ], + "/MskLogging/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73" + } + ], + "/MskLogging/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" + } + ], + "/MskLogging/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/S3Bucket": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3BucketA9F12763" + } + ], + "/MskLogging/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/S3VersionKey": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3VersionKey589F30A2" + } + ], + "/MskLogging/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/ArtifactHash": [ + { + "type": "aws:cdk:logicalId", + "data": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736ArtifactHash2CC614EA" } ] }, - "displayName": "aws-cdk-msk-integ" + "displayName": "MskLogging/DefaultTest/DeployAssert" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/tree.json b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/tree.json index ac16e076cedea..d7882a48b154d 100644 --- a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "aws-cdk-msk-integ": { @@ -659,6 +659,334 @@ "version": "0.0.0" } }, + "LoggingBucket": { + "id": "LoggingBucket", + "path": "aws-cdk-msk-integ/LoggingBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-msk-integ/LoggingBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "aws-cdk:auto-delete-objects", + "value": "true" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucket", + "version": "0.0.0" + } + }, + "Policy": { + "id": "Policy", + "path": "aws-cdk-msk-integ/LoggingBucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-msk-integ/LoggingBucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "LoggingBucket1E5A6F3B" + }, + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "LoggingBucket1E5A6F3B", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "LoggingBucket1E5A6F3B", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "s3:PutObject", + "Condition": { + "StringEquals": { + "s3:x-amz-acl": "bucket-owner-full-control", + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "LoggingBucket1E5A6F3B", + "Arn" + ] + }, + "/AWSLogs/", + { + "Ref": "AWS::AccountId" + }, + "/*" + ] + ] + } + }, + { + "Action": [ + "s3:GetBucketAcl", + "s3:ListBucket" + ], + "Condition": { + "StringEquals": { + "aws:SourceAccount": { + "Ref": "AWS::AccountId" + } + }, + "ArnLike": { + "aws:SourceArn": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":*" + ] + ] + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "delivery.logs.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "LoggingBucket1E5A6F3B", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.CfnBucketPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.BucketPolicy", + "version": "0.0.0" + } + }, + "AutoDeleteObjectsCustomResource": { + "id": "AutoDeleteObjectsCustomResource", + "path": "aws-cdk-msk-integ/LoggingBucket/AutoDeleteObjectsCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-msk-integ/LoggingBucket/AutoDeleteObjectsCustomResource/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-s3.Bucket", + "version": "0.0.0" + } + }, + "Custom::S3AutoDeleteObjectsCustomResourceProvider": { + "id": "Custom::S3AutoDeleteObjectsCustomResourceProvider", + "path": "aws-cdk-msk-integ/Custom::S3AutoDeleteObjectsCustomResourceProvider", + "children": { + "Staging": { + "id": "Staging", + "path": "aws-cdk-msk-integ/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-cdk-msk-integ/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "aws-cdk-msk-integ/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResourceProvider", + "version": "0.0.0" + } + }, + "AssetParameters": { + "id": "AssetParameters", + "path": "aws-cdk-msk-integ/AssetParameters", + "children": { + "17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb": { + "id": "17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb", + "path": "aws-cdk-msk-integ/AssetParameters/17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb", + "children": { + "S3Bucket": { + "id": "S3Bucket", + "path": "aws-cdk-msk-integ/AssetParameters/17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/S3Bucket", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "S3VersionKey": { + "id": "S3VersionKey", + "path": "aws-cdk-msk-integ/AssetParameters/17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/S3VersionKey", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "ArtifactHash": { + "id": "ArtifactHash", + "path": "aws-cdk-msk-integ/AssetParameters/17cb4b37288c269a54418db6e9c7c3763b2d1a82bdc374be4653bd366345eccb/ArtifactHash", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560": { + "id": "c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560", + "path": "aws-cdk-msk-integ/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560", + "children": { + "S3Bucket": { + "id": "S3Bucket", + "path": "aws-cdk-msk-integ/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/S3Bucket", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "S3VersionKey": { + "id": "S3VersionKey", + "path": "aws-cdk-msk-integ/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/S3VersionKey", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "ArtifactHash": { + "id": "ArtifactHash", + "path": "aws-cdk-msk-integ/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/ArtifactHash", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, "Cluster": { "id": "Cluster", "path": "aws-cdk-msk-integ/Cluster", @@ -745,7 +1073,10 @@ "enabled": false }, "s3": { - "enabled": false + "enabled": true, + "bucket": { + "Ref": "LoggingBucket1E5A6F3B" + } } } } @@ -839,6 +1170,32 @@ "version": "0.0.0" } }, + "Exports": { + "id": "Exports", + "path": "aws-cdk-msk-integ/Exports", + "children": { + "Output{\"Fn::GetAtt\":[\"LoggingBucket1E5A6F3B\",\"Arn\"]}": { + "id": "Output{\"Fn::GetAtt\":[\"LoggingBucket1E5A6F3B\",\"Arn\"]}", + "path": "aws-cdk-msk-integ/Exports/Output{\"Fn::GetAtt\":[\"LoggingBucket1E5A6F3B\",\"Arn\"]}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "Output{\"Ref\":\"LoggingBucket1E5A6F3B\"}": { + "id": "Output{\"Ref\":\"LoggingBucket1E5A6F3B\"}", + "path": "aws-cdk-msk-integ/Exports/Output{\"Ref\":\"LoggingBucket1E5A6F3B\"}", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, "AWS679f53fac002430cb0da5b7982bd2287": { "id": "AWS679f53fac002430cb0da5b7982bd2287", "path": "aws-cdk-msk-integ/AWS679f53fac002430cb0da5b7982bd2287", @@ -926,7 +1283,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3BucketB21FB59F" + "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3Bucket648C0EE1" }, "s3Key": { "Fn::Join": [ @@ -939,7 +1296,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3VersionKey73D4F058" + "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4" } ] } @@ -952,7 +1309,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90S3VersionKey73D4F058" + "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4" } ] } @@ -984,69 +1341,241 @@ "version": "0.0.0" } }, - "AssetParameters": { - "id": "AssetParameters", - "path": "aws-cdk-msk-integ/AssetParameters", + "BootstrapBrokers": { + "id": "BootstrapBrokers", + "path": "aws-cdk-msk-integ/BootstrapBrokers", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "BootstrapBrokers2": { + "id": "BootstrapBrokers2", + "path": "aws-cdk-msk-integ/BootstrapBrokers2", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "MskLogging": { + "id": "MskLogging", + "path": "MskLogging", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "MskLogging/DefaultTest", "children": { - "9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90": { - "id": "9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90", - "path": "aws-cdk-msk-integ/AssetParameters/9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90", + "Default": { + "id": "Default", + "path": "MskLogging/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "MskLogging/DefaultTest/DeployAssert", "children": { - "S3Bucket": { - "id": "S3Bucket", - "path": "aws-cdk-msk-integ/AssetParameters/9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90/S3Bucket", + "AwsApiCallS3listObjectsV2": { + "id": "AwsApiCallS3listObjectsV2", + "path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/Default", + "children": { + "Default": { + "id": "Default", + "path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "AssertEqualsS3listObjectsV2": { + "id": "AssertEqualsS3listObjectsV2", + "path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2", + "children": { + "AssertionProvider": { + "id": "AssertionProvider", + "path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/AssertionProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/AssertionProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/Default", + "children": { + "Default": { + "id": "Default", + "path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "MskLogging/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.EqualsAssertion", + "version": "0.0.0" + } + } + }, "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", + "fqn": "@aws-cdk/integ-tests.AwsApiCall", "version": "0.0.0" } }, - "S3VersionKey": { - "id": "S3VersionKey", - "path": "aws-cdk-msk-integ/AssetParameters/9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90/S3VersionKey", + "SingletonFunction1488541a7b23466481b69b4408076b81": { + "id": "SingletonFunction1488541a7b23466481b69b4408076b81", + "path": "MskLogging/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81", + "children": { + "Staging": { + "id": "Staging", + "path": "MskLogging/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "MskLogging/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "MskLogging/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.33" } }, - "ArtifactHash": { - "id": "ArtifactHash", - "path": "aws-cdk-msk-integ/AssetParameters/9d784cf317cead201dfe56ed0404d6d23eba6d499ca7354138230c2267f2fe90/ArtifactHash", + "AssetParameters": { + "id": "AssetParameters", + "path": "MskLogging/DefaultTest/DeployAssert/AssetParameters", + "children": { + "41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736": { + "id": "41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736", + "path": "MskLogging/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736", + "children": { + "S3Bucket": { + "id": "S3Bucket", + "path": "MskLogging/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/S3Bucket", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "S3VersionKey": { + "id": "S3VersionKey", + "path": "MskLogging/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/S3VersionKey", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + }, + "ArtifactHash": { + "id": "ArtifactHash", + "path": "MskLogging/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/ArtifactHash", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnParameter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + } + }, "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.33" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.0.9" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.0.9" - } - }, - "BootstrapBrokers": { - "id": "BootstrapBrokers", - "path": "aws-cdk-msk-integ/BootstrapBrokers", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" - } - }, - "BootstrapBrokers2": { - "id": "BootstrapBrokers2", - "path": "aws-cdk-msk-integ/BootstrapBrokers2", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", + "fqn": "@aws-cdk/integ-tests.IntegTestCase", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", + "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } } diff --git a/packages/@aws-cdk/aws-msk/test/cluster.test.ts b/packages/@aws-cdk/aws-msk/test/cluster.test.ts index baf0585372f2a..7621c5563a80e 100644 --- a/packages/@aws-cdk/aws-msk/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-msk/test/cluster.test.ts @@ -364,6 +364,7 @@ describe('MSK Cluster', () => { }, }); + Template.fromStack(stack).resourceCountIs('AWS::S3::BucketPolicy', 0); Template.fromStack(stack).hasResourceProperties('AWS::MSK::Cluster', { LoggingInfo: { BrokerLogs: { @@ -378,6 +379,126 @@ describe('MSK Cluster', () => { }); }); + test('feature flag @aws-cdk/aws-s3:defaultBucketPolicy', () => { + const localStack = new core.Stack(); + localStack.node.setContext('@aws-cdk/aws-s3:createDefaultLoggingPolicy', true); + new msk.Cluster(localStack, 'Cluster', { + clusterName: 'cluster', + kafkaVersion: msk.KafkaVersion.V2_6_1, + vpc: new ec2.Vpc(localStack, 'Vpc'), + logging: { + s3: { bucket: new s3.Bucket(localStack, 'Bucket') }, + }, + }); + + Template.fromStack(localStack).hasResourceProperties('AWS::S3::BucketPolicy', { + PolicyDocument: { + Statement: [ + { + Action: 's3:PutObject', + Effect: 'Allow', + Condition: { + StringEquals: { + 's3:x-amz-acl': 'bucket-owner-full-control', + 'aws:SourceAccount': { + Ref: 'AWS::AccountId', + }, + }, + ArnLike: { + 'aws:SourceArn': { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':logs:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':*', + ], + ], + }, + }, + }, + Principal: { + Service: 'delivery.logs.amazonaws.com', + }, + Resource: { + 'Fn::Join': [ + '', + [ + { + 'Fn::GetAtt': [ + 'Bucket83908E77', + 'Arn', + ], + }, + '/AWSLogs/', + { + Ref: 'AWS::AccountId', + }, + '/*', + ], + ], + }, + }, + { + Action: [ + 's3:GetBucketAcl', + 's3:ListBucket', + ], + Condition: { + StringEquals: { + 'aws:SourceAccount': { + Ref: 'AWS::AccountId', + }, + }, + ArnLike: { + 'aws:SourceArn': { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':logs:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + ':*', + ], + ], + }, + }, + }, + Effect: 'Allow', + Principal: { + Service: 'delivery.logs.amazonaws.com', + }, + Resource: { + 'Fn::GetAtt': [ + 'Bucket83908E77', + 'Arn', + ], + }, + }, + ], + }, + }); + }); + test('firehose delivery stream is set', () => { new msk.Cluster(stack, 'Cluster', { clusterName: 'cluster', diff --git a/packages/@aws-cdk/aws-msk/test/integ.cluster.ts b/packages/@aws-cdk/aws-msk/test/integ.cluster.ts index 06ad0893d20d7..55aa8dd6948d2 100644 --- a/packages/@aws-cdk/aws-msk/test/integ.cluster.ts +++ b/packages/@aws-cdk/aws-msk/test/integ.cluster.ts @@ -1,22 +1,59 @@ -/// !cdk-integ pragma:ignore-assets import * as ec2 from '@aws-cdk/aws-ec2'; import * as cdk from '@aws-cdk/core'; +import * as s3 from '@aws-cdk/aws-s3'; +import { IntegTest, AssertionsProvider, ExpectedResult } from '@aws-cdk/integ-tests'; import * as msk from '../lib'; const app = new cdk.App(); -const stack = new cdk.Stack(app, 'aws-cdk-msk-integ'); -const vpc = new ec2.Vpc(stack, 'VPC', { maxAzs: 2 }); +class FeatureFlagStack extends cdk.Stack { + public readonly bucketArn: string; + public readonly bucket: s3.IBucket; + constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { + super(scope, id, props); + const vpc = new ec2.Vpc(this, 'VPC', { maxAzs: 2 }); -const cluster = new msk.Cluster(stack, 'Cluster', { - clusterName: 'integ-test', - kafkaVersion: msk.KafkaVersion.V2_8_1, - vpc, - removalPolicy: cdk.RemovalPolicy.DESTROY, + this.bucket = new s3.Bucket(this, 'LoggingBucket', { + removalPolicy: cdk.RemovalPolicy.DESTROY, + autoDeleteObjects: true, + }); + + const cluster = new msk.Cluster(this, 'Cluster', { + clusterName: 'integ-test', + kafkaVersion: msk.KafkaVersion.V2_8_1, + vpc, + logging: { + s3: { + bucket: this.bucket, + }, + }, + removalPolicy: cdk.RemovalPolicy.DESTROY, + }); + + this.bucketArn = this.exportValue(this.bucket.bucketArn); + // Test lazy instance of the AwsCustomResource + new cdk.CfnOutput(this, 'BootstrapBrokers', { value: cluster.bootstrapBrokersTls }); + new cdk.CfnOutput(this, 'BootstrapBrokers2', { value: cluster.bootstrapBrokersTls }); + } +} + +const stack = new FeatureFlagStack(app, 'aws-cdk-msk-integ'); + +const integ = new IntegTest(app, 'MskLogging', { + testCases: [stack], +}); + +const objects = integ.assertions.awsApiCall('S3', 'listObjectsV2', { + Bucket: stack.bucket.bucketName, + MaxKeys: 1, + Prefix: `AWSLogs/${stack.account}/KafkaBrokerLogs`, }); +const assertionProvider = objects.node.tryFindChild('SdkProvider') as AssertionsProvider; +assertionProvider.addPolicyStatementFromSdkCall('s3', 'ListBucket', [stack.bucketArn]); +assertionProvider.addPolicyStatementFromSdkCall('s3', 'GetObject', [`${stack.bucketArn}/*`]); -// Test lazy instance of the AwsCustomResource -new cdk.CfnOutput(stack, 'BootstrapBrokers', { value: cluster.bootstrapBrokersTls }); -new cdk.CfnOutput(stack, 'BootstrapBrokers2', { value: cluster.bootstrapBrokersTls }); +objects.expect(ExpectedResult.objectLike({ + KeyCount: 1, +})); app.synth(); diff --git a/packages/@aws-cdk/aws-neptune/lib/cluster.ts b/packages/@aws-cdk/aws-neptune/lib/cluster.ts index a9303286b3693..eb40b6ec3589b 100644 --- a/packages/@aws-cdk/aws-neptune/lib/cluster.ts +++ b/packages/@aws-cdk/aws-neptune/lib/cluster.ts @@ -54,6 +54,10 @@ export class EngineVersion { * Neptune engine version 1.1.0.0 */ public static readonly V1_1_0_0 = new EngineVersion('1.1.0.0'); + /** + * Neptune engine version 1.1.1.0 + */ + public static readonly V1_1_1_0 = new EngineVersion('1.1.1.0'); /** * Constructor for specifying a custom engine version diff --git a/packages/@aws-cdk/aws-neptune/test/cluster.test.ts b/packages/@aws-cdk/aws-neptune/test/cluster.test.ts index 915fe9cf34d0a..4bf730e8aa8d0 100644 --- a/packages/@aws-cdk/aws-neptune/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-neptune/test/cluster.test.ts @@ -118,6 +118,29 @@ describe('DatabaseCluster', () => { }); }); + test.each([ + ['1.1.1.0', EngineVersion.V1_1_1_0], + ])('can create a cluster for engine version %s', (expected, version) => { + // GIVEN + const stack = testStack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new DatabaseCluster(stack, 'Database', { + vpc, + instanceType: InstanceType.R5_LARGE, + engineVersion: version, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Neptune::DBCluster', { + EngineVersion: expected, + DBSubnetGroupName: { Ref: 'DatabaseSubnets3C9252C9' }, + VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['DatabaseSecurityGroup5C91FDCB', 'GroupId'] }], + }); + }); + + test('can create a cluster with imported vpc and security group', () => { // GIVEN const stack = testStack(); diff --git a/packages/@aws-cdk/aws-rds/README.md b/packages/@aws-cdk/aws-rds/README.md index 861c3607abbe3..bcd41b1aaad41 100644 --- a/packages/@aws-cdk/aws-rds/README.md +++ b/packages/@aws-cdk/aws-rds/README.md @@ -63,9 +63,30 @@ new rds.DatabaseClusterFromSnapshot(this, 'Database', { }); ``` +### Updating the database instances in a cluster + +Database cluster instances may be updated in bulk or on a rolling basis. + +An update to all instances in a cluster may cause significant downtime. To reduce the downtime, set the `instanceUpdateBehavior` property in `DatabaseClusterBaseProps` to `InstanceUpdateBehavior.ROLLING`. This adds a dependency between each instance so the update is performed on only one instance at a time. + +Use `InstanceUpdateBehavior.BULK` to update all instances at once. + +```ts +declare const vpc: ec2.Vpc; +const cluster = new rds.DatabaseCluster(this, 'Database', { + engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_3_01_0 }), + instances: 2, + instanceProps: { + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.SMALL), + vpc, + }, + instanceUpdateBehaviour: rds.InstanceUpdateBehaviour.ROLLING, // Optional - defaults to rds.InstanceUpdateBehaviour.BULK +}); +``` + ## Starting an instance database -To set up a instance database, define a `DatabaseInstance`. You must +To set up an instance database, define a `DatabaseInstance`. You must always launch a database in a VPC. Use the `vpcSubnets` attribute to control whether your instances will be launched privately or publicly: diff --git a/packages/@aws-cdk/aws-rds/lib/cluster.ts b/packages/@aws-cdk/aws-rds/lib/cluster.ts index 96ded1e61a730..f5f6b29ce871d 100644 --- a/packages/@aws-cdk/aws-rds/lib/cluster.ts +++ b/packages/@aws-cdk/aws-rds/lib/cluster.ts @@ -41,6 +41,13 @@ interface DatabaseClusterBaseProps { */ readonly instanceProps: InstanceProps; + /** + * The ordering of updates for instances + * + * @default InstanceUpdateBehaviour.BULK + */ + readonly instanceUpdateBehaviour?: InstanceUpdateBehaviour; + /** * The number of seconds to set a cluster's target backtrack window to. * This feature is only supported by the Aurora MySQL database engine and @@ -275,6 +282,25 @@ interface DatabaseClusterBaseProps { readonly copyTagsToSnapshot?: boolean; } +/** + * The orchestration of updates of multiple instances + */ +export enum InstanceUpdateBehaviour { + /** + * In a bulk update, all instances of the cluster are updated at the same time. + * This results in a faster update procedure. + * During the update, however, all instances might be unavailable at the same time and thus a downtime might occur. + */ + BULK = 'BULK', + + /** + * In a rolling update, one instance after another is updated. + * This results in at most one instance being unavailable during the update. + * If your cluster consists of more than 1 instance, the downtime periods are limited to the time a primary switch needs. + */ + ROLLING = 'ROLLING' +} + /** * A new or imported clustered database. */ @@ -805,6 +831,7 @@ interface InstanceConfig { */ function createInstances(cluster: DatabaseClusterNew, props: DatabaseClusterBaseProps, subnetGroup: ISubnetGroup): InstanceConfig { const instanceCount = props.instances != null ? props.instances : 2; + const instanceUpdateBehaviour = props.instanceUpdateBehaviour ?? InstanceUpdateBehaviour.BULK; if (Token.isUnresolved(instanceCount)) { throw new Error('The number of instances an RDS Cluster consists of cannot be provided as a deploy-time only value!'); } @@ -852,6 +879,8 @@ function createInstances(cluster: DatabaseClusterNew, props: DatabaseClusterBase ); const instanceParameterGroupConfig = instanceParameterGroup?.bindToInstance({}); + const instances: CfnDBInstance[] = []; + for (let i = 0; i < instanceCount; i++) { const instanceIndex = i + 1; const instanceIdentifier = props.instanceIdentifierBase != null ? `${props.instanceIdentifierBase}${instanceIndex}` : @@ -895,6 +924,14 @@ function createInstances(cluster: DatabaseClusterNew, props: DatabaseClusterBase instanceIdentifiers.push(instance.ref); instanceEndpoints.push(new Endpoint(instance.attrEndpointAddress, portAttribute)); + instances.push(instance); + } + + // Adding dependencies here to ensure that the instances are updated one after the other. + if (instanceUpdateBehaviour === InstanceUpdateBehaviour.ROLLING) { + for (let i = 1; i < instanceCount; i++) { + instances[i].node.addDependency(instances[i-1]); + } } return { instanceEndpoints, instanceIdentifiers }; diff --git a/packages/@aws-cdk/aws-rds/package.json b/packages/@aws-cdk/aws-rds/package.json index d244aa733c5cd..35cf7600f6ad9 100644 --- a/packages/@aws-cdk/aws-rds/package.json +++ b/packages/@aws-cdk/aws-rds/package.json @@ -86,6 +86,7 @@ "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", + "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/pkglint": "0.0.0", diff --git a/packages/@aws-cdk/aws-rds/test/cluster.test.ts b/packages/@aws-cdk/aws-rds/test/cluster.test.ts index a9ccf4b374182..a52c5e0ee353d 100644 --- a/packages/@aws-cdk/aws-rds/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-rds/test/cluster.test.ts @@ -10,7 +10,7 @@ import * as cxapi from '@aws-cdk/cx-api'; import { AuroraEngineVersion, AuroraMysqlEngineVersion, AuroraPostgresEngineVersion, CfnDBCluster, Credentials, DatabaseCluster, DatabaseClusterEngine, DatabaseClusterFromSnapshot, ParameterGroup, PerformanceInsightRetention, SubnetGroup, DatabaseSecret, - DatabaseInstanceEngine, SqlServerEngineVersion, SnapshotCredentials, + DatabaseInstanceEngine, SqlServerEngineVersion, SnapshotCredentials, InstanceUpdateBehaviour, } from '../lib'; describe('cluster', () => { @@ -122,6 +122,36 @@ describe('cluster', () => { }); }); + test('can create a cluster with ROLLING instance update behaviour', () => { + // GIVEN + const stack = testStack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new DatabaseCluster(stack, 'Database', { + engine: DatabaseClusterEngine.AURORA, + instances: 5, + instanceProps: { + vpc, + }, + instanceUpdateBehaviour: InstanceUpdateBehaviour.ROLLING, + }); + + // THEN + const instanceResources = Template.fromStack(stack).findResources('AWS::RDS::DBInstance'); + const instances = Object.keys(instanceResources); + const instanceDependencies = Object.values(instanceResources) + .map(properties => (properties.DependsOn as string[]).filter(dependency => instances.includes(dependency))); + // check that there are only required dependencies to form a chain of dependant instances + for (const dependencies of instanceDependencies) { + expect(dependencies.length).toBeLessThanOrEqual(1); + } + // check that all but one instance are a dependency of another instance + const dependantInstances = instanceDependencies.flat(); + expect(dependantInstances).toHaveLength(instances.length - 1); + expect(instances.filter(it => !dependantInstances.includes(it))).toHaveLength(1); + }); + test('can create a cluster with imported vpc and security group', () => { // GIVEN const stack = testStack(); diff --git a/packages/@aws-cdk/aws-rds/test/integ.rolling-instance-updates.ts b/packages/@aws-cdk/aws-rds/test/integ.rolling-instance-updates.ts new file mode 100644 index 0000000000000..733e5023d56d0 --- /dev/null +++ b/packages/@aws-cdk/aws-rds/test/integ.rolling-instance-updates.ts @@ -0,0 +1,45 @@ +import * as ec2 from '@aws-cdk/aws-ec2'; +import * as cdk from '@aws-cdk/core'; +import * as integTests from '@aws-cdk/integ-tests'; +import * as constructs from 'constructs'; +import * as rds from '../lib'; + +interface RollingInstanceUpdateTestStackProps extends cdk.StackProps { + instanceUpdateBehaviour: rds.InstanceUpdateBehaviour; +} + +class RollingInstanceUpdateTestStack extends cdk.Stack { + constructor(scope: constructs.Construct, id: string, props: RollingInstanceUpdateTestStackProps) { + super(scope, id, props); + const vpc = new ec2.Vpc(this, 'Vpc', { + maxAzs: 2, + }); + + new rds.DatabaseCluster(this, 'DatabaseCluster', { + engine: rds.DatabaseClusterEngine.AURORA, + instances: 3, + instanceProps: { + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.SMALL), + vpc, + }, + removalPolicy: cdk.RemovalPolicy.DESTROY, + instanceUpdateBehaviour: props.instanceUpdateBehaviour, + }); + } +} + + +// Beginning of the test suite +const app = new cdk.App(); +new integTests.IntegTest(app, 'InstanceUpdateBehaviorTests', { + testCases: [ + new RollingInstanceUpdateTestStack(app, 'BulkUpdate', { + instanceUpdateBehaviour: rds.InstanceUpdateBehaviour.BULK, + }), + new RollingInstanceUpdateTestStack(app, 'RollingUpdate', { + instanceUpdateBehaviour: rds.InstanceUpdateBehaviour.ROLLING, + }), + ], +}); + +app.synth(); diff --git a/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/BulkUpdate.template.json b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/BulkUpdate.template.json new file mode 100644 index 0000000000000..ab1dd31a6289c --- /dev/null +++ b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/BulkUpdate.template.json @@ -0,0 +1,554 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "BulkUpdate/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet2EIP3C605A87": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "BulkUpdate/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "BulkUpdate/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "DatabaseClusterSubnets7FAE1846": { + "Type": "AWS::RDS::DBSubnetGroup", + "Properties": { + "DBSubnetGroupDescription": "Subnets for DatabaseCluster database", + "SubnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + } + }, + "DatabaseClusterSecurityGroupCBE34284": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "RDS security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "DatabaseClusterSecret3F333A5B": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "Description": { + "Fn::Join": [ + "", + [ + "Generated by the CDK for stack: ", + { + "Ref": "AWS::StackName" + } + ] + ] + }, + "GenerateSecretString": { + "ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\", + "GenerateStringKey": "password", + "PasswordLength": 30, + "SecretStringTemplate": "{\"username\":\"admin\"}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DatabaseClusterSecretAttachmentB8BF2F7B": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + "TargetId": { + "Ref": "DatabaseCluster68FC2945" + }, + "TargetType": "AWS::RDS::DBCluster" + } + }, + "DatabaseCluster68FC2945": { + "Type": "AWS::RDS::DBCluster", + "Properties": { + "Engine": "aurora", + "CopyTagsToSnapshot": true, + "DBSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "MasterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + ":SecretString:username::}}" + ] + ] + }, + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + ":SecretString:password::}}" + ] + ] + }, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "DatabaseClusterSecurityGroupCBE34284", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DatabaseClusterInstance1C566869D": { + "Type": "AWS::RDS::DBInstance", + "Properties": { + "DBInstanceClass": "db.t3.small", + "DBClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "DBSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "Engine": "aurora" + }, + "DependsOn": [ + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet2DefaultRoute060D2087" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DatabaseClusterInstance252BB9A46": { + "Type": "AWS::RDS::DBInstance", + "Properties": { + "DBInstanceClass": "db.t3.small", + "DBClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "DBSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "Engine": "aurora" + }, + "DependsOn": [ + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet2DefaultRoute060D2087" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DatabaseClusterInstance3EA629143": { + "Type": "AWS::RDS::DBInstance", + "Properties": { + "DBInstanceClass": "db.t3.small", + "DBClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "DBSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "Engine": "aurora" + }, + "DependsOn": [ + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet2DefaultRoute060D2087" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/InstanceUpdateBehaviorTestsDefaultTestDeployAssert287956FD.template.json b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/InstanceUpdateBehaviorTestsDefaultTestDeployAssert287956FD.template.json new file mode 100644 index 0000000000000..9e26dfeeb6e64 --- /dev/null +++ b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/InstanceUpdateBehaviorTestsDefaultTestDeployAssert287956FD.template.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/RollingUpdate.template.json b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/RollingUpdate.template.json new file mode 100644 index 0000000000000..1ccb708db074e --- /dev/null +++ b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/RollingUpdate.template.json @@ -0,0 +1,556 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "RollingUpdate/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet2EIP3C605A87": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "Tags": [ + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PrivateSubnet1" + } + ] + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Private" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Private" + }, + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "Tags": [ + { + "Key": "Name", + "Value": "RollingUpdate/Vpc/PrivateSubnet2" + } + ] + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "RollingUpdate/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "VpcId": { + "Ref": "Vpc8378EB38" + }, + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "DatabaseClusterSubnets7FAE1846": { + "Type": "AWS::RDS::DBSubnetGroup", + "Properties": { + "DBSubnetGroupDescription": "Subnets for DatabaseCluster database", + "SubnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + } + }, + "DatabaseClusterSecurityGroupCBE34284": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "RDS security group", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "DatabaseClusterSecret3F333A5B": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "Description": { + "Fn::Join": [ + "", + [ + "Generated by the CDK for stack: ", + { + "Ref": "AWS::StackName" + } + ] + ] + }, + "GenerateSecretString": { + "ExcludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\", + "GenerateStringKey": "password", + "PasswordLength": 30, + "SecretStringTemplate": "{\"username\":\"admin\"}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DatabaseClusterSecretAttachmentB8BF2F7B": { + "Type": "AWS::SecretsManager::SecretTargetAttachment", + "Properties": { + "SecretId": { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + "TargetId": { + "Ref": "DatabaseCluster68FC2945" + }, + "TargetType": "AWS::RDS::DBCluster" + } + }, + "DatabaseCluster68FC2945": { + "Type": "AWS::RDS::DBCluster", + "Properties": { + "Engine": "aurora", + "CopyTagsToSnapshot": true, + "DBSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "MasterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + ":SecretString:username::}}" + ] + ] + }, + "MasterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + ":SecretString:password::}}" + ] + ] + }, + "VpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "DatabaseClusterSecurityGroupCBE34284", + "GroupId" + ] + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DatabaseClusterInstance1C566869D": { + "Type": "AWS::RDS::DBInstance", + "Properties": { + "DBInstanceClass": "db.t3.small", + "DBClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "DBSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "Engine": "aurora" + }, + "DependsOn": [ + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet2DefaultRoute060D2087" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DatabaseClusterInstance252BB9A46": { + "Type": "AWS::RDS::DBInstance", + "Properties": { + "DBInstanceClass": "db.t3.small", + "DBClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "DBSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "Engine": "aurora" + }, + "DependsOn": [ + "DatabaseClusterInstance1C566869D", + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet2DefaultRoute060D2087" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DatabaseClusterInstance3EA629143": { + "Type": "AWS::RDS::DBInstance", + "Properties": { + "DBInstanceClass": "db.t3.small", + "DBClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "DBSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "Engine": "aurora" + }, + "DependsOn": [ + "DatabaseClusterInstance252BB9A46", + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet2DefaultRoute060D2087" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/cdk.out new file mode 100644 index 0000000000000..588d7b269d34f --- /dev/null +++ b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/integ.json b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/integ.json new file mode 100644 index 0000000000000..29249d2b0f31e --- /dev/null +++ b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "20.0.0", + "testCases": { + "InstanceUpdateBehaviorTests/DefaultTest": { + "stacks": [ + "BulkUpdate", + "RollingUpdate" + ], + "assertionStack": "InstanceUpdateBehaviorTestsDefaultTestDeployAssert287956FD" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/manifest.json new file mode 100644 index 0000000000000..f04d94dc78966 --- /dev/null +++ b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/manifest.json @@ -0,0 +1,414 @@ +{ + "version": "20.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "BulkUpdate": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "BulkUpdate.template.json", + "validateOnSynth": false + }, + "metadata": { + "/BulkUpdate/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/BulkUpdate/Vpc/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1Subnet5C2D37C4" + } + ], + "/BulkUpdate/Vpc/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTable6C95E38E" + } + ], + "/BulkUpdate/Vpc/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTableAssociation97140677" + } + ], + "/BulkUpdate/Vpc/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1DefaultRoute3DA9E72A" + } + ], + "/BulkUpdate/Vpc/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1EIPD7E02669" + } + ], + "/BulkUpdate/Vpc/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1NATGateway4D7517AA" + } + ], + "/BulkUpdate/Vpc/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2Subnet691E08A3" + } + ], + "/BulkUpdate/Vpc/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTable94F7E489" + } + ], + "/BulkUpdate/Vpc/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTableAssociationDD5762D8" + } + ], + "/BulkUpdate/Vpc/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2DefaultRoute97F91067" + } + ], + "/BulkUpdate/Vpc/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2EIP3C605A87" + } + ], + "/BulkUpdate/Vpc/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2NATGateway9182C01D" + } + ], + "/BulkUpdate/Vpc/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1Subnet536B997A" + } + ], + "/BulkUpdate/Vpc/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableB2C5B500" + } + ], + "/BulkUpdate/Vpc/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableAssociation70C59FA6" + } + ], + "/BulkUpdate/Vpc/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1DefaultRouteBE02A9ED" + } + ], + "/BulkUpdate/Vpc/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "/BulkUpdate/Vpc/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableA678073B" + } + ], + "/BulkUpdate/Vpc/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + } + ], + "/BulkUpdate/Vpc/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2DefaultRoute060D2087" + } + ], + "/BulkUpdate/Vpc/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIGWD7BA715C" + } + ], + "/BulkUpdate/Vpc/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVPCGWBF912B6E" + } + ], + "/BulkUpdate/DatabaseCluster/Subnets/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterSubnets7FAE1846" + } + ], + "/BulkUpdate/DatabaseCluster/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterSecurityGroupCBE34284" + } + ], + "/BulkUpdate/DatabaseCluster/Secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterSecret3F333A5B" + } + ], + "/BulkUpdate/DatabaseCluster/Secret/Attachment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterSecretAttachmentB8BF2F7B" + } + ], + "/BulkUpdate/DatabaseCluster/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseCluster68FC2945" + } + ], + "/BulkUpdate/DatabaseCluster/Instance1": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterInstance1C566869D" + } + ], + "/BulkUpdate/DatabaseCluster/Instance2": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterInstance252BB9A46" + } + ], + "/BulkUpdate/DatabaseCluster/Instance3": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterInstance3EA629143" + } + ] + }, + "displayName": "BulkUpdate" + }, + "RollingUpdate": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "RollingUpdate.template.json", + "validateOnSynth": false + }, + "metadata": { + "/RollingUpdate/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/RollingUpdate/Vpc/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1Subnet5C2D37C4" + } + ], + "/RollingUpdate/Vpc/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTable6C95E38E" + } + ], + "/RollingUpdate/Vpc/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTableAssociation97140677" + } + ], + "/RollingUpdate/Vpc/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1DefaultRoute3DA9E72A" + } + ], + "/RollingUpdate/Vpc/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1EIPD7E02669" + } + ], + "/RollingUpdate/Vpc/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1NATGateway4D7517AA" + } + ], + "/RollingUpdate/Vpc/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2Subnet691E08A3" + } + ], + "/RollingUpdate/Vpc/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTable94F7E489" + } + ], + "/RollingUpdate/Vpc/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTableAssociationDD5762D8" + } + ], + "/RollingUpdate/Vpc/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2DefaultRoute97F91067" + } + ], + "/RollingUpdate/Vpc/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2EIP3C605A87" + } + ], + "/RollingUpdate/Vpc/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2NATGateway9182C01D" + } + ], + "/RollingUpdate/Vpc/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1Subnet536B997A" + } + ], + "/RollingUpdate/Vpc/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableB2C5B500" + } + ], + "/RollingUpdate/Vpc/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableAssociation70C59FA6" + } + ], + "/RollingUpdate/Vpc/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1DefaultRouteBE02A9ED" + } + ], + "/RollingUpdate/Vpc/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "/RollingUpdate/Vpc/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableA678073B" + } + ], + "/RollingUpdate/Vpc/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + } + ], + "/RollingUpdate/Vpc/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2DefaultRoute060D2087" + } + ], + "/RollingUpdate/Vpc/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIGWD7BA715C" + } + ], + "/RollingUpdate/Vpc/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVPCGWBF912B6E" + } + ], + "/RollingUpdate/DatabaseCluster/Subnets/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterSubnets7FAE1846" + } + ], + "/RollingUpdate/DatabaseCluster/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterSecurityGroupCBE34284" + } + ], + "/RollingUpdate/DatabaseCluster/Secret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterSecret3F333A5B" + } + ], + "/RollingUpdate/DatabaseCluster/Secret/Attachment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterSecretAttachmentB8BF2F7B" + } + ], + "/RollingUpdate/DatabaseCluster/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseCluster68FC2945" + } + ], + "/RollingUpdate/DatabaseCluster/Instance1": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterInstance1C566869D" + } + ], + "/RollingUpdate/DatabaseCluster/Instance2": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterInstance252BB9A46" + } + ], + "/RollingUpdate/DatabaseCluster/Instance3": [ + { + "type": "aws:cdk:logicalId", + "data": "DatabaseClusterInstance3EA629143" + } + ] + }, + "displayName": "RollingUpdate" + }, + "InstanceUpdateBehaviorTestsDefaultTestDeployAssert287956FD": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "InstanceUpdateBehaviorTestsDefaultTestDeployAssert287956FD.template.json", + "validateOnSynth": false + }, + "displayName": "InstanceUpdateBehaviorTests/DefaultTest/DeployAssert" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/tree.json b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/tree.json new file mode 100644 index 0000000000000..468c2cefc448e --- /dev/null +++ b/packages/@aws-cdk/aws-rds/test/rolling-instance-updates.integ.snapshot/tree.json @@ -0,0 +1,1881 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "BulkUpdate": { + "id": "BulkUpdate", + "path": "BulkUpdate", + "children": { + "Vpc": { + "id": "Vpc", + "path": "BulkUpdate/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "BulkUpdate/Vpc/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "BulkUpdate/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "BulkUpdate/Vpc/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "BulkUpdate/Vpc/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "BulkUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "BulkUpdate/Vpc/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "BulkUpdate/Vpc/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "BulkUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "BulkUpdate/Vpc/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "BulkUpdate/Vpc/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "BulkUpdate/Vpc/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "BulkUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "BulkUpdate/Vpc/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "tags": [ + { + "key": "Name", + "value": "BulkUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "BulkUpdate/Vpc/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "BulkUpdate/Vpc/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "BulkUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "BulkUpdate/Vpc/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "BulkUpdate/Vpc/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "BulkUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "BulkUpdate/Vpc/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "BulkUpdate/Vpc/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "BulkUpdate/Vpc/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "BulkUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "BulkUpdate/Vpc/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "tags": [ + { + "key": "Name", + "value": "BulkUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "BulkUpdate/Vpc/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "BulkUpdate/Vpc/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "BulkUpdate/Vpc/PrivateSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "BulkUpdate/Vpc/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "BulkUpdate/Vpc/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "BulkUpdate/Vpc/PrivateSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "BulkUpdate/Vpc/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "BulkUpdate/Vpc/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "BulkUpdate/Vpc/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "BulkUpdate/Vpc/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "BulkUpdate/Vpc/PrivateSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "BulkUpdate/Vpc/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "BulkUpdate/Vpc/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "BulkUpdate/Vpc/PrivateSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "BulkUpdate/Vpc/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "BulkUpdate/Vpc/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "BulkUpdate/Vpc/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "BulkUpdate/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "BulkUpdate/Vpc/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "internetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Vpc", + "version": "0.0.0" + } + }, + "DatabaseCluster": { + "id": "DatabaseCluster", + "path": "BulkUpdate/DatabaseCluster", + "children": { + "Subnets": { + "id": "Subnets", + "path": "BulkUpdate/DatabaseCluster/Subnets", + "children": { + "Default": { + "id": "Default", + "path": "BulkUpdate/DatabaseCluster/Subnets/Default", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBSubnetGroup", + "aws:cdk:cloudformation:props": { + "dbSubnetGroupDescription": "Subnets for DatabaseCluster database", + "subnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.CfnDBSubnetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.SubnetGroup", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "BulkUpdate/DatabaseCluster/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "BulkUpdate/DatabaseCluster/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "RDS security group", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Secret": { + "id": "Secret", + "path": "BulkUpdate/DatabaseCluster/Secret", + "children": { + "Resource": { + "id": "Resource", + "path": "BulkUpdate/DatabaseCluster/Secret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "description": { + "Fn::Join": [ + "", + [ + "Generated by the CDK for stack: ", + { + "Ref": "AWS::StackName" + } + ] + ] + }, + "generateSecretString": { + "passwordLength": 30, + "secretStringTemplate": "{\"username\":\"admin\"}", + "generateStringKey": "password", + "excludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecret", + "version": "0.0.0" + } + }, + "Attachment": { + "id": "Attachment", + "path": "BulkUpdate/DatabaseCluster/Secret/Attachment", + "children": { + "Resource": { + "id": "Resource", + "path": "BulkUpdate/DatabaseCluster/Secret/Attachment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::SecretTargetAttachment", + "aws:cdk:cloudformation:props": { + "secretId": { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + "targetId": { + "Ref": "DatabaseCluster68FC2945" + }, + "targetType": "AWS::RDS::DBCluster" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.SecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.DatabaseSecret", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "BulkUpdate/DatabaseCluster/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBCluster", + "aws:cdk:cloudformation:props": { + "engine": "aurora", + "copyTagsToSnapshot": true, + "dbSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "masterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + ":SecretString:username::}}" + ] + ] + }, + "masterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + ":SecretString:password::}}" + ] + ] + }, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "DatabaseClusterSecurityGroupCBE34284", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.CfnDBCluster", + "version": "0.0.0" + } + }, + "Instance1": { + "id": "Instance1", + "path": "BulkUpdate/DatabaseCluster/Instance1", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBInstance", + "aws:cdk:cloudformation:props": { + "dbInstanceClass": "db.t3.small", + "dbClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "dbSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "engine": "aurora" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.CfnDBInstance", + "version": "0.0.0" + } + }, + "Instance2": { + "id": "Instance2", + "path": "BulkUpdate/DatabaseCluster/Instance2", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBInstance", + "aws:cdk:cloudformation:props": { + "dbInstanceClass": "db.t3.small", + "dbClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "dbSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "engine": "aurora" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.CfnDBInstance", + "version": "0.0.0" + } + }, + "Instance3": { + "id": "Instance3", + "path": "BulkUpdate/DatabaseCluster/Instance3", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBInstance", + "aws:cdk:cloudformation:props": { + "dbInstanceClass": "db.t3.small", + "dbClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "dbSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "engine": "aurora" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.CfnDBInstance", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.DatabaseCluster", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "RollingUpdate": { + "id": "RollingUpdate", + "path": "RollingUpdate", + "children": { + "Vpc": { + "id": "Vpc", + "path": "RollingUpdate/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "RollingUpdate/Vpc/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPC", + "aws:cdk:cloudformation:props": { + "cidrBlock": "10.0.0.0/16", + "enableDnsHostnames": true, + "enableDnsSupport": true, + "instanceTenancy": "default", + "tags": [ + { + "key": "Name", + "value": "RollingUpdate/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "RollingUpdate/Vpc/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "RollingUpdate/Vpc/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.0.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "RollingUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "RollingUpdate/Vpc/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "RollingUpdate/Vpc/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "RollingUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "RollingUpdate/Vpc/PublicSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "RollingUpdate/Vpc/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "RollingUpdate/Vpc/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "RollingUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "RollingUpdate/Vpc/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "tags": [ + { + "key": "Name", + "value": "RollingUpdate/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "RollingUpdate/Vpc/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "RollingUpdate/Vpc/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.64.0/18", + "mapPublicIpOnLaunch": true, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Public" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Public" + }, + { + "key": "Name", + "value": "RollingUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "RollingUpdate/Vpc/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "RollingUpdate/Vpc/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "RollingUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "RollingUpdate/Vpc/PublicSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "RollingUpdate/Vpc/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "RollingUpdate/Vpc/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "RollingUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "RollingUpdate/Vpc/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "tags": [ + { + "key": "Name", + "value": "RollingUpdate/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "RollingUpdate/Vpc/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "RollingUpdate/Vpc/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.128.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "RollingUpdate/Vpc/PrivateSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "RollingUpdate/Vpc/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "RollingUpdate/Vpc/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "RollingUpdate/Vpc/PrivateSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "RollingUpdate/Vpc/PrivateSubnet1/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "RollingUpdate/Vpc/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "RollingUpdate/Vpc/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "RollingUpdate/Vpc/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "availabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "cidrBlock": "10.0.192.0/18", + "mapPublicIpOnLaunch": false, + "tags": [ + { + "key": "aws-cdk:subnet-name", + "value": "Private" + }, + { + "key": "aws-cdk:subnet-type", + "value": "Private" + }, + { + "key": "Name", + "value": "RollingUpdate/Vpc/PrivateSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "RollingUpdate/Vpc/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "RollingUpdate/Vpc/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "tags": [ + { + "key": "Name", + "value": "RollingUpdate/Vpc/PrivateSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "RollingUpdate/Vpc/PrivateSubnet2/RouteTableAssociation", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "subnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "RollingUpdate/Vpc/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "RollingUpdate/Vpc/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "RollingUpdate/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "RollingUpdate/Vpc/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "vpcId": { + "Ref": "Vpc8378EB38" + }, + "internetGatewayId": { + "Ref": "VpcIGWD7BA715C" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.Vpc", + "version": "0.0.0" + } + }, + "DatabaseCluster": { + "id": "DatabaseCluster", + "path": "RollingUpdate/DatabaseCluster", + "children": { + "Subnets": { + "id": "Subnets", + "path": "RollingUpdate/DatabaseCluster/Subnets", + "children": { + "Default": { + "id": "Default", + "path": "RollingUpdate/DatabaseCluster/Subnets/Default", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBSubnetGroup", + "aws:cdk:cloudformation:props": { + "dbSubnetGroupDescription": "Subnets for DatabaseCluster database", + "subnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.CfnDBSubnetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.SubnetGroup", + "version": "0.0.0" + } + }, + "SecurityGroup": { + "id": "SecurityGroup", + "path": "RollingUpdate/DatabaseCluster/SecurityGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "RollingUpdate/DatabaseCluster/SecurityGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "RDS security group", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "Secret": { + "id": "Secret", + "path": "RollingUpdate/DatabaseCluster/Secret", + "children": { + "Resource": { + "id": "Resource", + "path": "RollingUpdate/DatabaseCluster/Secret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "description": { + "Fn::Join": [ + "", + [ + "Generated by the CDK for stack: ", + { + "Ref": "AWS::StackName" + } + ] + ] + }, + "generateSecretString": { + "passwordLength": 30, + "secretStringTemplate": "{\"username\":\"admin\"}", + "generateStringKey": "password", + "excludeCharacters": " %+~`#$&*()|[]{}:;<>?!'/@\"\\" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecret", + "version": "0.0.0" + } + }, + "Attachment": { + "id": "Attachment", + "path": "RollingUpdate/DatabaseCluster/Secret/Attachment", + "children": { + "Resource": { + "id": "Resource", + "path": "RollingUpdate/DatabaseCluster/Secret/Attachment/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::SecretTargetAttachment", + "aws:cdk:cloudformation:props": { + "secretId": { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + "targetId": { + "Ref": "DatabaseCluster68FC2945" + }, + "targetType": "AWS::RDS::DBCluster" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.SecretTargetAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.DatabaseSecret", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "RollingUpdate/DatabaseCluster/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBCluster", + "aws:cdk:cloudformation:props": { + "engine": "aurora", + "copyTagsToSnapshot": true, + "dbSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "masterUsername": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + ":SecretString:username::}}" + ] + ] + }, + "masterUserPassword": { + "Fn::Join": [ + "", + [ + "{{resolve:secretsmanager:", + { + "Ref": "DatabaseClusterSecret3F333A5B" + }, + ":SecretString:password::}}" + ] + ] + }, + "vpcSecurityGroupIds": [ + { + "Fn::GetAtt": [ + "DatabaseClusterSecurityGroupCBE34284", + "GroupId" + ] + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.CfnDBCluster", + "version": "0.0.0" + } + }, + "Instance1": { + "id": "Instance1", + "path": "RollingUpdate/DatabaseCluster/Instance1", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBInstance", + "aws:cdk:cloudformation:props": { + "dbInstanceClass": "db.t3.small", + "dbClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "dbSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "engine": "aurora" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.CfnDBInstance", + "version": "0.0.0" + } + }, + "Instance2": { + "id": "Instance2", + "path": "RollingUpdate/DatabaseCluster/Instance2", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBInstance", + "aws:cdk:cloudformation:props": { + "dbInstanceClass": "db.t3.small", + "dbClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "dbSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "engine": "aurora" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.CfnDBInstance", + "version": "0.0.0" + } + }, + "Instance3": { + "id": "Instance3", + "path": "RollingUpdate/DatabaseCluster/Instance3", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::RDS::DBInstance", + "aws:cdk:cloudformation:props": { + "dbInstanceClass": "db.t3.small", + "dbClusterIdentifier": { + "Ref": "DatabaseCluster68FC2945" + }, + "dbSubnetGroupName": { + "Ref": "DatabaseClusterSubnets7FAE1846" + }, + "engine": "aurora" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.CfnDBInstance", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-rds.DatabaseCluster", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "InstanceUpdateBehaviorTests": { + "id": "InstanceUpdateBehaviorTests", + "path": "InstanceUpdateBehaviorTests", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "InstanceUpdateBehaviorTests/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "InstanceUpdateBehaviorTests/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "InstanceUpdateBehaviorTests/DefaultTest/DeployAssert", + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTest", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/lib/cluster.ts b/packages/@aws-cdk/aws-redshift/lib/cluster.ts index ab86540d3d7b3..3a61f3ad93afe 100644 --- a/packages/@aws-cdk/aws-redshift/lib/cluster.ts +++ b/packages/@aws-cdk/aws-redshift/lib/cluster.ts @@ -322,6 +322,19 @@ export interface ClusterProps { * @default false */ readonly publiclyAccessible?: boolean + + /** + * If this flag is set, the cluster resizing type will be set to classic. + * When resizing a cluster, classic resizing will always provision a new cluster and transfer the data there. + * + * Classic resize takes more time to complete, but it can be useful in cases where the change in node count or + * the node type to migrate to doesn't fall within the bounds for elastic resize. + * + * @see https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-operations.html#elastic-resize + * + * @default - Elastic resize type + */ + readonly classicResizing?: boolean } /** @@ -485,6 +498,7 @@ export class Cluster extends ClusterBase { // Encryption kmsKeyId: props.encryptionKey?.keyId, encrypted: props.encrypted ?? true, + classic: props.classicResizing, }); cluster.applyRemovalPolicy(removalPolicy, { diff --git a/packages/@aws-cdk/aws-redshift/test/cluster.test.ts b/packages/@aws-cdk/aws-redshift/test/cluster.test.ts index 6db5f18ade684..80a03cb7ac207 100644 --- a/packages/@aws-cdk/aws-redshift/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-redshift/test/cluster.test.ts @@ -422,6 +422,73 @@ test('default child returns a CfnCluster', () => { expect(cluster.node.defaultChild).toBeInstanceOf(CfnCluster); }); +test.each([ + ['elastic', false], + ['classic', true], +])('resize type (%s)', (_, classicResizing) => { + // WHEN + new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + masterPassword: cdk.SecretValue.unsafePlainText('tooshort'), + }, + classicResizing, + vpc, + }); + + // THEN + Template.fromStack(stack).hasResource('AWS::Redshift::Cluster', { + Properties: { + AllowVersionUpgrade: true, + MasterUsername: 'admin', + MasterUserPassword: 'tooshort', + ClusterType: 'multi-node', + AutomatedSnapshotRetentionPeriod: 1, + Encrypted: true, + NumberOfNodes: 2, + NodeType: 'dc2.large', + DBName: 'default_db', + PubliclyAccessible: false, + ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' }, + VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }], + Classic: classicResizing, + }, + DeletionPolicy: 'Retain', + UpdateReplacePolicy: 'Retain', + }); +}); + +test('resize type not set', () => { + // WHEN + new Cluster(stack, 'Redshift', { + masterUser: { + masterUsername: 'admin', + masterPassword: cdk.SecretValue.unsafePlainText('tooshort'), + }, + vpc, + }); + + // THEN + Template.fromStack(stack).hasResource('AWS::Redshift::Cluster', { + Properties: { + AllowVersionUpgrade: true, + MasterUsername: 'admin', + MasterUserPassword: 'tooshort', + ClusterType: 'multi-node', + AutomatedSnapshotRetentionPeriod: 1, + Encrypted: true, + NumberOfNodes: 2, + NodeType: 'dc2.large', + DBName: 'default_db', + PubliclyAccessible: false, + ClusterSubnetGroupName: { Ref: 'RedshiftSubnetsDFE70E0A' }, + VpcSecurityGroupIds: [{ 'Fn::GetAtt': ['RedshiftSecurityGroup796D74A7', 'GroupId'] }], + }, + DeletionPolicy: 'Retain', + UpdateReplacePolicy: 'Retain', + }); +}); + function testStack() { const newTestStack = new cdk.Stack(undefined, undefined, { env: { account: '12345', region: 'us-test-1' } }); newTestStack.node.setContext('availability-zones:12345:us-test-1', ['us-test-1a', 'us-test-1b']); diff --git a/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts b/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts index e58070474cc6d..c7cd541703c57 100644 --- a/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts +++ b/packages/@aws-cdk/aws-route53/lib/hosted-zone.ts @@ -250,8 +250,8 @@ export class PublicHostedZone extends HostedZone implements IPublicHostedZone { * @param id the logical name of this Construct * @param attrs the PublicHostedZoneAttributes (hosted zone ID and hosted zone name) */ - public static fromPublicHostedZoneAttributes(scope: Construct, id: string, attrs: PublicHostedZoneAttributes): IHostedZone { - class Import extends Resource implements IHostedZone { + public static fromPublicHostedZoneAttributes(scope: Construct, id: string, attrs: PublicHostedZoneAttributes): IPublicHostedZone { + class Import extends Resource implements IPublicHostedZone { public readonly hostedZoneId = attrs.hostedZoneId; public readonly zoneName = attrs.zoneName; public get hostedZoneArn(): string { diff --git a/packages/@aws-cdk/aws-secretsmanager/README.md b/packages/@aws-cdk/aws-secretsmanager/README.md index 780bdc8e022e6..3b99e340cf970 100644 --- a/packages/@aws-cdk/aws-secretsmanager/README.md +++ b/packages/@aws-cdk/aws-secretsmanager/README.md @@ -252,3 +252,36 @@ Alternatively, use `addReplicaRegion()`: const secret = new secretsmanager.Secret(this, 'Secret'); secret.addReplicaRegion('eu-west-1'); ``` + +## Creating JSON Secrets + +Sometimes it is necessary to create a secret in SecretsManager that contains a JSON object. +For example: + +```json +{ + "username": "myUsername", + "database": "foo", + "password": "mypassword" +} +``` + +In order to create this type of secret, use the `secretObjectValue` input prop. + +```ts +const user = new iam.User(stack, 'User'); +const accessKey = new iam.AccessKey(stack, 'AccessKey', { user }); +declare const stack: Stack; + +new secretsmanager.Secret(stack, 'Secret', { + secretObjectValue: { + username: SecretValue.unsafePlainText(user.userName), + database: SecretValue.unsafePlainText('foo'), + password: accessKey.secretAccessKey, + }, +}) +``` + +In this case both the `username` and `database` are not a `Secret` so `SecretValue.unsafePlainText` needs to be used. +This means that they will be rendered as plain text in the template, but in this case neither of those +are actual "secrets". diff --git a/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts b/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts index 7865b29c2c4bd..c7426329f61ce 100644 --- a/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts +++ b/packages/@aws-cdk/aws-secretsmanager/lib/secret.ts @@ -161,14 +161,44 @@ export interface SecretProps { * to the CloudFormation template (via the AWS Console, SDKs, or CLI). * * Specifies text data that you want to encrypt and store in this new version of the secret. - * May be a simple string value, or a string representation of a JSON structure. + * May be a simple string value. To provide a string representation of JSON structure, use {@link SecretProps.secretObjectValue} instead. * - * Only one of `secretStringBeta1`, `secretStringValue`, and `generateSecretString` can be provided. + * Only one of `secretStringBeta1`, `secretStringValue`, 'secretObjectValue', and `generateSecretString` can be provided. * * @default - SecretsManager generates a new secret value. */ readonly secretStringValue?: SecretValue; + /** + * Initial value for a JSON secret + * + * **NOTE:** *It is **highly** encouraged to leave this field undefined and allow SecretsManager to create the secret value. + * The secret object -- if provided -- will be included in the output of the cdk as part of synthesis, + * and will appear in the CloudFormation template in the console. This can be secure(-ish) if that value is merely reference to + * another resource (or one of its attributes), but if the value is a plaintext string, it will be visible to anyone with access + * to the CloudFormation template (via the AWS Console, SDKs, or CLI). + * + * Specifies a JSON object that you want to encrypt and store in this new version of the secret. + * To specify a simple string value instead, use {@link SecretProps.secretStringValue} + * + * Only one of `secretStringBeta1`, `secretStringValue`, 'secretObjectValue', and `generateSecretString` can be provided. + * + * @example + * declare const user: iam.User; + * declare const accessKey: iam.AccessKey; + * declare const stack: Stack; + * new secretsmanager.Secret(stack, 'JSONSecret', { + * secretObjectValue: { + * username: SecretValue.unsafePlainText(user.userName), // intrinsic reference, not exposed as plaintext + * database: SecretValue.unsafePlainText('foo'), // rendered as plain text, but not a secret + * password: accessKey.secretAccessKey, // SecretValue + * }, + * }); + * + * @default - SecretsManager generates a new secret value. + */ + readonly secretObjectValue?: { [key: string]: SecretValue }; + /** * Policy to apply when the secret is removed from this stack. * @@ -233,7 +263,7 @@ export class SecretStringValueBeta1 { * // Creates a new IAM user, access and secret keys, and stores the secret access key in a Secret. * const user = new iam.User(this, 'User'); * const accessKey = new iam.AccessKey(this, 'AccessKey', { user }); - * const secret = new secrets.Secret(this, 'Secret', { + * const secret = new secretsmanager.Secret(this, 'Secret', { * secretStringValue: accessKey.secretAccessKey, * }); * ``` @@ -582,11 +612,17 @@ export class Secret extends SecretBase { throw new Error('`secretStringTemplate` and `generateStringKey` must be specified together.'); } - if ((props.generateSecretString ? 1 : 0) + (props.secretStringBeta1 ? 1 : 0) + (props.secretStringValue ? 1 : 0) > 1) { - throw new Error('Cannot specify more than one of `generateSecretString`, `secretStringValue`, and `secretStringBeta1`.'); + if ((props.generateSecretString ? 1 : 0) + + (props.secretStringBeta1 ? 1 : 0) + + (props.secretStringValue ? 1 : 0) + + (props.secretObjectValue ? 1 : 0) + > 1) { + throw new Error('Cannot specify more than one of `generateSecretString`, `secretStringValue`, `secretObjectValue`, and `secretStringBeta1`.'); } - const secretString = props.secretStringValue?.unsafeUnwrap() ?? props.secretStringBeta1?.secretValue(); + const secretString = props.secretObjectValue + ? this.resolveSecretObjectValue(props.secretObjectValue) + : props.secretStringValue?.unsafeUnwrap() ?? props.secretStringBeta1?.secretValue(); const resource = new secretsmanager.CfnSecret(this, 'Resource', { description: props.description, @@ -627,6 +663,14 @@ export class Secret extends SecretBase { this.excludeCharacters = props.generateSecretString?.excludeCharacters; } + private resolveSecretObjectValue(secretObject: { [key: string]: SecretValue }): string { + const resolvedObject: { [key: string]: string } = {}; + for (const [key, value] of Object.entries(secretObject)) { + resolvedObject[key] = value.unsafeUnwrap(); + } + return JSON.stringify(resolvedObject); + } + /** * Adds a target attachment to the secret. * @@ -968,4 +1012,4 @@ function attachmentTargetTypeToString(x: AttachmentTargetType): string { case AttachmentTargetType.DOCDB_DB_CLUSTER: return 'AWS::DocDB::DBCluster'; } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-secretsmanager/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-secretsmanager/rosetta/default.ts-fixture index e05db08905105..64fc649d2d1c2 100644 --- a/packages/@aws-cdk/aws-secretsmanager/rosetta/default.ts-fixture +++ b/packages/@aws-cdk/aws-secretsmanager/rosetta/default.ts-fixture @@ -1,6 +1,6 @@ // Fixture with packages imported, but nothing else import { Construct } from 'constructs'; -import { Duration, Stack } from '@aws-cdk/core'; +import { Duration, Stack, SecretValue } from '@aws-cdk/core'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import * as kms from '@aws-cdk/aws-kms'; import * as iam from '@aws-cdk/aws-iam'; @@ -12,4 +12,4 @@ class Fixture extends Stack { /// here } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret.lit.ts b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret.lit.ts index 968a84337c800..3c511c03ee8ca 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret.lit.ts +++ b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret.lit.ts @@ -1,5 +1,6 @@ import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; +import { SecretValue } from '@aws-cdk/core'; import * as secretsmanager from '../lib'; class SecretsManagerStack extends cdk.Stack { @@ -37,10 +38,20 @@ class SecretsManagerStack extends cdk.Stack { new secretsmanager.Secret(this, 'PredefinedSecret', { secretStringValue: accessKey.secretAccessKey, }); + + // JSON secret + new secretsmanager.Secret(this, 'JSONSecret', { + secretObjectValue: { + username: SecretValue.unsafePlainText(user.userName), + database: SecretValue.unsafePlainText('foo'), + password: accessKey.secretAccessKey, + }, + }); /// !hide } } const app = new cdk.App(); new SecretsManagerStack(app, 'Integ-SecretsManager-Secret'); + app.synth(); diff --git a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/Integ-SecretsManager-Secret.template.json b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/Integ-SecretsManager-Secret.template.json index fad361e1fa06c..e349aad350f9e 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/Integ-SecretsManager-Secret.template.json +++ b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/Integ-SecretsManager-Secret.template.json @@ -147,6 +147,32 @@ }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" + }, + "JSONSecret6FE68AEF": { + "Type": "AWS::SecretsManager::Secret", + "Properties": { + "SecretString": { + "Fn::Join": [ + "", + [ + "{\"username\":\"", + { + "Ref": "User00B015A1" + }, + "\",\"database\":\"foo\",\"password\":\"", + { + "Fn::GetAtt": [ + "AccessKeyE6B25659", + "SecretAccessKey" + ] + }, + "\"}" + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/SecretTestDefaultTestDeployAssert519F6A06.template.json b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/SecretTestDefaultTestDeployAssert519F6A06.template.json new file mode 100644 index 0000000000000..9e26dfeeb6e64 --- /dev/null +++ b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/SecretTestDefaultTestDeployAssert519F6A06.template.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/integ.json b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/integ.json index 0acf5b3adbea4..acdf25c5c415c 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/integ.json @@ -1,14 +1,11 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-secretsmanager/test/integ.secret.lit": { + "SecretTest/DefaultTest": { "stacks": [ "Integ-SecretsManager-Secret" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "SecretTestDefaultTestDeployAssert519F6A06" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/manifest.json index adce184e5bb6a..bf5a6b403c293 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -62,9 +62,24 @@ "type": "aws:cdk:logicalId", "data": "PredefinedSecret660AF4EC" } + ], + "/Integ-SecretsManager-Secret/JSONSecret/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "JSONSecret6FE68AEF" + } ] }, "displayName": "Integ-SecretsManager-Secret" + }, + "SecretTestDefaultTestDeployAssert519F6A06": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "SecretTestDefaultTestDeployAssert519F6A06.template.json", + "validateOnSynth": false + }, + "displayName": "SecretTest/DefaultTest/DeployAssert" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/tree.json b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/tree.json index 7cd60f1c275c6..df648bb65be44 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "Integ-SecretsManager-Secret": { @@ -301,12 +301,90 @@ "fqn": "@aws-cdk/aws-secretsmanager.Secret", "version": "0.0.0" } + }, + "JSONSecret": { + "id": "JSONSecret", + "path": "Integ-SecretsManager-Secret/JSONSecret", + "children": { + "Resource": { + "id": "Resource", + "path": "Integ-SecretsManager-Secret/JSONSecret/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SecretsManager::Secret", + "aws:cdk:cloudformation:props": { + "secretString": { + "Fn::Join": [ + "", + [ + "{\"username\":\"", + { + "Ref": "User00B015A1" + }, + "\",\"database\":\"foo\",\"password\":\"", + { + "Fn::GetAtt": [ + "AccessKeyE6B25659", + "SecretAccessKey" + ] + }, + "\"}" + ] + ] + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.CfnSecret", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-secretsmanager.Secret", + "version": "0.0.0" + } } }, "constructInfo": { "fqn": "@aws-cdk/core.Stack", "version": "0.0.0" } + }, + "SecretTest": { + "id": "SecretTest", + "path": "SecretTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "SecretTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "SecretTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "SecretTest/DefaultTest/DeployAssert", + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTest", + "version": "0.0.0" + } } }, "constructInfo": { diff --git a/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts b/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts index 6caa06421d04e..af98a771f7ff6 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts +++ b/packages/@aws-cdk/aws-secretsmanager/test/secret.test.ts @@ -1335,3 +1335,57 @@ test('with replication regions', () => { ], }); }); + +describe('secretObjectValue', () => { + test('can be used with a mixture of plain text and SecretValue', () => { + const user = new iam.User(stack, 'User'); + const accessKey = new iam.AccessKey(stack, 'MyKey', { user }); + new secretsmanager.Secret(stack, 'Secret', { + secretObjectValue: { + username: cdk.SecretValue.unsafePlainText('username'), + password: accessKey.secretAccessKey, + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::SecretsManager::Secret', { + GenerateSecretString: Match.absent(), + SecretString: { + 'Fn::Join': [ + '', + [ + '{"username":"username","password":"', + { 'Fn::GetAtt': ['MyKey6AB29FA6', 'SecretAccessKey'] }, + '"}', + ], + ], + }, + }); + }); + + test('can be used with a mixture of plain text and SecretValue, with feature flag', () => { + const featureStack = new cdk.Stack(); + featureStack.node.setContext('@aws-cdk/core:checkSecretUsage', true); + const user = new iam.User(featureStack, 'User'); + const accessKey = new iam.AccessKey(featureStack, 'MyKey', { user }); + new secretsmanager.Secret(featureStack, 'Secret', { + secretObjectValue: { + username: cdk.SecretValue.unsafePlainText('username'), + password: accessKey.secretAccessKey, + }, + }); + + Template.fromStack(featureStack).hasResourceProperties('AWS::SecretsManager::Secret', { + GenerateSecretString: Match.absent(), + SecretString: { + 'Fn::Join': [ + '', + [ + '{"username":"username","password":"', + { 'Fn::GetAtt': ['MyKey6AB29FA6', 'SecretAccessKey'] }, + '"}', + ], + ], + }, + }); + }); +}); diff --git a/packages/@aws-cdk/aws-ses/README.md b/packages/@aws-cdk/aws-ses/README.md index 04fc9f2e26202..a4609fe075ccf 100644 --- a/packages/@aws-cdk/aws-ses/README.md +++ b/packages/@aws-cdk/aws-ses/README.md @@ -90,7 +90,7 @@ new ses.ReceiptRuleSet(this, 'RuleSet', { This will add a rule at the top of the rule set with a Lambda action that stops processing messages that have at least one spam indicator. See [Lambda Function Examples](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-action-lambda-example-functions.html). -## Receipt filter +### Receipt filter Create a receipt filter: @@ -112,3 +112,93 @@ new ses.AllowListReceiptFilter(this, 'AllowList', { ``` This will first create a block all filter and then create allow filters for the listed ip addresses. + +## Email sending + +### Dedicated IP pools + +When you create a new Amazon SES account, your emails are sent from IP addresses that are shared with other +Amazon SES users. For [an additional monthly charge](https://aws.amazon.com/ses/pricing/), you can lease +dedicated IP addresses that are reserved for your exclusive use. + +Use the `DedicatedIpPool` construct to create a pool of dedicated IP addresses: + +```ts +new ses.DedicatedIpPool(this, 'Pool'); +``` + +The pool can then be used in a configuration set. + +### Configuration sets + +Configuration sets are groups of rules that you can apply to your verified identities. A verified identity is +a domain, subdomain, or email address you use to send email through Amazon SES. When you apply a configuration +set to an email, all of the rules in that configuration set are applied to the email. + +Use the `ConfigurationSet` construct to create a configuration set: + +```ts +declare const myPool: ses.IDedicatedIpPool; + +new ses.ConfigurationSet(this, 'ConfigurationSet', { + customTrackingRedirectDomain: 'track.cdk.dev', + suppressionReasons: ses.SuppressionReasons.COMPLAINTS_ONLY, + tlsPolicy: ses.ConfigurationSetTlsPolicy.REQUIRE, + dedicatedIpPool: myPool, +}); +``` + +### Email identity + +In Amazon SES, a verified identity is a domain or email address that you use to send or receive email. Before you +can send an email using Amazon SES, you must create and verify each identity that you're going to use as a `From`, +`Source`, `Sender`, or `Return-Path` address. Verifying an identity with Amazon SES confirms that you own it and +helps prevent unauthorized use. + +To verify an identity for a hosted zone, you create an `EmailIdentity`: + +```ts +declare const myHostedZone: route53.IPublicHostedZone; + +const identity = new ses.EmailIdentity(stack, 'Identity', { + identity: ses.Identity.publicHostedZone(myHostedZone), + mailFromDomain: 'mail.cdk.dev', +}); +``` + +By default, [Easy DKIM](https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim-easy.html) with +a 2048-bit DKIM key is used. + +You can instead configure DKIM authentication by using your own public-private key pair. This process is known +as [Bring Your Own DKIM (BYODKIM)](https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim-bring-your-own.html): + +```ts +declare const myHostedZone: route53.IPublicHostedZone; + +new ses.EmailIdentity(stack, 'Identity', { + identity: ses.Identity.publicHostedZone(myHostedZone), + dkimIdentity: DkimIdentity.byoDkim({ + privateKey: SecretValue.secretsManager('dkim-private-key'), + publicKey: '...base64-encoded-public-key...', + selector: 'selector', + }), +}); +``` + +When using `publicHostedZone()` for the identity, all necessary Amazon Route 53 records are created automatically: + +* CNAME records for Easy DKIM +* TXT record for BYOD DKIM +* MX and TXT records for the custom MAIL FROM + +When working with `domain()`, records must be created manually: + +```ts +const identity = new ses.EmailIdentity(stack, 'Identity', { + identity: ses.Identity.domain('cdk.dev'), +}); + +for (const record of identity.dkimRecords) { + // create CNAME records using `record.name` and `record.value` +} +``` diff --git a/packages/@aws-cdk/aws-ses/lib/configuration-set.ts b/packages/@aws-cdk/aws-ses/lib/configuration-set.ts new file mode 100644 index 0000000000000..6e801a7f4f3f9 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/lib/configuration-set.ts @@ -0,0 +1,171 @@ +import { IResource, Resource } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { IDedicatedIpPool } from './dedicated-ip-pool'; +import { undefinedIfNoKeys } from './private/utils'; +import { CfnConfigurationSet } from './ses.generated'; + +/** + * A configuration set + */ +export interface IConfigurationSet extends IResource { + /** + * The name of the configuration set + * + * @attribute + */ + readonly configurationSetName: string; +} + +/** + * Properties for a configuration set + */ +export interface ConfigurationSetProps { + /** + * A name for the configuration set + * + * @default - a CloudFormation generated name + */ + readonly configurationSetName?: string; + + /** + * The dedicated IP pool to associate with the configuration set + * + * @default - do not use a dedicated IP pool + */ + readonly dedicatedIpPool?: IDedicatedIpPool; + + /** + * Specifies whether messages that use the configuration set are required to + * use Transport Layer Security (TLS) + * + * @default ConfigurationSetTlsPolicy.OPTIONAL + */ + readonly tlsPolicy?: ConfigurationSetTlsPolicy; + + /** + * Whether to publish reputation metrics for the configuration set, such as + * bounce and complaint rates, to Amazon CloudWatch + * + * @default false + */ + readonly reputationMetrics?: boolean; + + /** + * Whether email sending is enabled + * + * @default true + */ + readonly sendingEnabled?: boolean; + + /** + * The reasons for which recipient email addresses should be automatically added + * to your account's suppression list + * + * @default - use account level settings + */ + readonly suppressionReasons?: SuppressionReasons; + + /** + * The custom subdomain that is used to redirect email recipients to the + * Amazon SES event tracking domain + * + * @default - use the default awstrack.me domain + */ + readonly customTrackingRedirectDomain?: string, +} + +/** + * TLS policy for a configuration set + */ +export enum ConfigurationSetTlsPolicy { + /** + * Messages are only delivered if a TLS connection can be established + */ + REQUIRE = 'REQUIRE', + + /** + * Messages can be delivered in plain text if a TLS connection can't be established + */ + OPTIONAL = 'OPTIONAL', +} + +/** + * Reasons for which recipient email addresses should be automatically added + * to your account's suppression list + */ +export enum SuppressionReasons { + /** + * Bounces and complaints + */ + BOUNCES_AND_COMPLAINTS = 'BOUNCES_AND_COMPLAINTS', + + /** + * Bounces only + */ + BOUNCES_ONLY = 'BOUNCES_ONLY', + + /** + * Complaints only + */ + COMPLAINTS_ONLY = 'COMPLAINTS_ONLY', +} + +/** + * A configuration set + */ +export class ConfigurationSet extends Resource implements IConfigurationSet { + /** + * Use an existing configuration set + */ + public static fromConfigurationSetName(scope: Construct, id: string, configurationSetName: string): IConfigurationSet { + class Import extends Resource implements IConfigurationSet { + public readonly configurationSetName = configurationSetName; + } + return new Import(scope, id); + } + + public readonly configurationSetName: string; + + constructor(scope: Construct, id: string, props: ConfigurationSetProps = {}) { + super(scope, id, { + physicalName: props.configurationSetName, + }); + + const configurationSet = new CfnConfigurationSet(this, 'Resource', { + deliveryOptions: undefinedIfNoKeys({ + sendingPoolName: props.dedicatedIpPool?.dedicatedIpPoolName, + tlsPolicy: props.tlsPolicy, + }), + name: this.physicalName, + reputationOptions: undefinedIfNoKeys({ + reputationMetricsEnabled: props.reputationMetrics, + }), + sendingOptions: undefinedIfNoKeys({ + sendingEnabled: props.sendingEnabled, + }), + suppressionOptions: undefinedIfNoKeys({ + suppressedReasons: renderSuppressedReasons(props.suppressionReasons), + }), + trackingOptions: undefinedIfNoKeys({ + customRedirectDomain: props.customTrackingRedirectDomain, + }), + }); + + this.configurationSetName = configurationSet.ref; + } +} + +function renderSuppressedReasons(suppressionReasons?: SuppressionReasons): string[] | undefined { + if (!suppressionReasons) { + return undefined; + } + + switch (suppressionReasons) { + case SuppressionReasons.BOUNCES_AND_COMPLAINTS: + return ['BOUNCE', 'COMPLAINT']; + case SuppressionReasons.BOUNCES_ONLY: + return ['BOUNCE']; + case SuppressionReasons.COMPLAINTS_ONLY: + return ['COMPLAINT']; + } +} diff --git a/packages/@aws-cdk/aws-ses/lib/dedicated-ip-pool.ts b/packages/@aws-cdk/aws-ses/lib/dedicated-ip-pool.ts new file mode 100644 index 0000000000000..f650c45465376 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/lib/dedicated-ip-pool.ts @@ -0,0 +1,56 @@ +import { IResource, Resource } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { CfnDedicatedIpPool } from './ses.generated'; + +/** + * A dedicated IP pool + */ +export interface IDedicatedIpPool extends IResource { + /** + * The name of the dedicated IP pool + * + * @attribute + */ + readonly dedicatedIpPoolName: string +} + +/** + * Properties for a dedicated IP pool + */ +export interface DedicatedIpPoolProps { + /** + * A name for the dedicated IP pool + * + * @default - a CloudFormation generated name + */ + readonly dedicatedIpPoolName?: string; +} + +/** + * A dedicated IP pool + */ +export class DedicatedIpPool extends Resource implements IDedicatedIpPool { + /** + * Use an existing dedicated IP pool + */ + public static fromDedicatedIpPoolName(scope: Construct, id: string, dedicatedIpPoolName: string): IDedicatedIpPool { + class Import extends Resource implements IDedicatedIpPool { + public readonly dedicatedIpPoolName = dedicatedIpPoolName; + } + return new Import(scope, id); + } + + public readonly dedicatedIpPoolName: string; + + constructor(scope: Construct, id: string, props: DedicatedIpPoolProps = {}) { + super(scope, id, { + physicalName: props.dedicatedIpPoolName, + }); + + const pool = new CfnDedicatedIpPool(this, 'Resource', { + poolName: this.physicalName, + }); + + this.dedicatedIpPoolName = pool.ref; + } +} diff --git a/packages/@aws-cdk/aws-ses/lib/email-identity.ts b/packages/@aws-cdk/aws-ses/lib/email-identity.ts new file mode 100644 index 0000000000000..ad905f5a5ed5c --- /dev/null +++ b/packages/@aws-cdk/aws-ses/lib/email-identity.ts @@ -0,0 +1,444 @@ +import * as route53 from '@aws-cdk/aws-route53'; +import { IPublicHostedZone } from '@aws-cdk/aws-route53'; +import { IResource, Lazy, Resource, SecretValue, Stack } from '@aws-cdk/core'; +import { Construct } from 'constructs'; +import { IConfigurationSet } from './configuration-set'; +import { undefinedIfNoKeys } from './private/utils'; +import { CfnEmailIdentity } from './ses.generated'; + +/** + * An email identity + */ +export interface IEmailIdentity extends IResource { + /** + * The name of the email identity + * + * @attribute + */ + readonly emailIdentityName: string; +} + +/** + * Properties for an email identity + */ +export interface EmailIdentityProps { + /** + * The email address or domain to verify. + */ + readonly identity: Identity; + + /** + * The configuration set to associate with the email identity + * + * @default - do not use a specific configuration set + */ + readonly configurationSet?: IConfigurationSet; + + /** + * Whether the messages that are sent from the identity are signed using DKIM + * + * @default true + */ + readonly dkimSigning?: boolean; + + /** + * The type of DKIM identity to use + * + * @default - Easy DKIM with a key length of 2048-bit + */ + readonly dkimIdentity?: DkimIdentity; + + /** + * Whether to receive email notifications when bounce or complaint events occur. + * These notifications are sent to the address that you specified in the `Return-Path` + * header of the original email. + * + * You're required to have a method of tracking bounces and complaints. If you haven't set + * up another mechanism for receiving bounce or complaint notifications (for example, by + * setting up an event destination), you receive an email notification when these events + * occur (even if this setting is disabled). + * + * @default true + */ + readonly feedbackForwarding?: boolean; + + /** + * The custom MAIL FROM domain that you want the verified identity to use. The MAIL FROM domain + * must meet the following criteria: + * - It has to be a subdomain of the verified identity + * - It can't be used to receive email + * - It can't be used in a "From" address if the MAIL FROM domain is a destination for feedback + * forwarding emails + * + * @default - use amazonses.com + */ + readonly mailFromDomain?: string; + + /** + * The action to take if the required MX record for the MAIL FROM domain isn't + * found when you send an email + * + * @default MailFromBehaviorOnMxFailure.USE_DEFAULT_VALUE + */ + readonly mailFromBehaviorOnMxFailure?: MailFromBehaviorOnMxFailure; +} + +/** + * Identity + */ +export abstract class Identity { + /** + * Verify an email address + * + * To complete the verification process look for an email from + * no-reply-aws@amazon.com, open it and click the link. + */ + public static email(email: string): Identity { + return { value: email }; + } + + /** + * Verify a domain name + * + * DKIM records will have to be added manually to complete the verification + * process + */ + public static domain(domain: string): Identity { + return { value: domain }; + } + + /** + * Verify a public hosted zone + * + * DKIM and MAIL FROM records will be added automatically to the hosted + * zone + */ + public static publicHostedZone(hostedZone: IPublicHostedZone): Identity { + return { + value: hostedZone.zoneName, + hostedZone, + }; + } + + /** + * The value of the identity + */ + public abstract readonly value: string; + + /** + * The hosted zone associated with this identity + * + * @default - no hosted zone is associated and no records are created + */ + public abstract readonly hostedZone?: IPublicHostedZone; +} + +/** + * The action to take if the required MX record for the MAIL FROM domain isn't + * found + */ +export enum MailFromBehaviorOnMxFailure { + /** + * The mail is sent using amazonses.com as the MAIL FROM domain + */ + USE_DEFAULT_VALUE = 'USE_DEFAULT_VALUE', + + /** + * The Amazon SES API v2 returns a `MailFromDomainNotVerified` error and doesn't + * attempt to deliver the email + */ + REJECT_MESSAGE = 'REJECT_MESSAGE', +} + +/** + * Configuration for DKIM identity + */ +export interface DkimIdentityConfig { + /** + * A private key that's used to generate a DKIM signature + * + * @default - use Easy DKIM + */ + readonly domainSigningPrivateKey?: string; + + /** + * A string that's used to identify a public key in the DNS configuration for + * a domain + * + * @default - use Easy DKIM + */ + readonly domainSigningSelector?: string; + + /** + * The key length of the future DKIM key pair to be generated. This can be changed + * at most once per day. + * + * @default EasyDkimSigningKeyLength.RSA_2048_BIT + */ + readonly nextSigningKeyLength?: EasyDkimSigningKeyLength +} + +/** + * The identity to use for DKIM + */ +export abstract class DkimIdentity { + /** + * Easy DKIM + * + * @param signingKeyLength The length of the signing key. This can be changed at + * most once per day. + * + * @see https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim-easy.html + */ + public static easyDkim(signingKeyLength?: EasyDkimSigningKeyLength): DkimIdentity { + return new EasyDkim(signingKeyLength); + } + + /** + * Bring Your Own DKIM + * + * @param options Options for BYO DKIM + * + * @see https://docs.aws.amazon.com/ses/latest/dg/send-email-authentication-dkim-bring-your-own.html + */ + public static byoDkim(options: ByoDkimOptions): DkimIdentity { + return new ByoDkim(options); + } + + /** + * Binds this DKIM identity to the email identity + */ + public abstract bind(emailIdentity: EmailIdentity, hostedZone?: route53.IPublicHostedZone): DkimIdentityConfig | undefined; +} + +class EasyDkim extends DkimIdentity { + constructor(private readonly signingKeyLength?: EasyDkimSigningKeyLength) { + super(); + } + + public bind(emailIdentity: EmailIdentity, hostedZone?: route53.IPublicHostedZone): DkimIdentityConfig | undefined { + if (hostedZone) { + new route53.CnameRecord(emailIdentity, 'DkimDnsToken1', { + zone: hostedZone, + recordName: Lazy.string({ produce: () => emailIdentity.dkimDnsTokenName1 }), + domainName: Lazy.string({ produce: () => emailIdentity.dkimDnsTokenValue1 }), + }); + + new route53.CnameRecord(hostedZone, 'DkimDnsToken2', { + zone: hostedZone, + recordName: Lazy.string({ produce: () => emailIdentity.dkimDnsTokenName2 }), + domainName: Lazy.string({ produce: () => emailIdentity.dkimDnsTokenValue2 }), + }); + + new route53.CnameRecord(hostedZone, 'DkimDnsToken3', { + zone: hostedZone, + recordName: Lazy.string({ produce: () => emailIdentity.dkimDnsTokenName3 }), + domainName: Lazy.string({ produce: () => emailIdentity.dkimDnsTokenValue3 }), + }); + } + + return this.signingKeyLength + ? { nextSigningKeyLength: this.signingKeyLength } + : undefined; + } +} + +/** + * Options for BYO DKIM + */ +export interface ByoDkimOptions { + /** + * The private key that's used to generate a DKIM signature + */ + readonly privateKey: SecretValue; + + /** + * A string that's used to identify a public key in the DNS configuration for + * a domain + */ + readonly selector: string; + + /** + * The public key. If specified, a TXT record with the public key is created. + * + * @default - the validation TXT record with the public key is not created + */ + readonly publicKey?: string; +} + +class ByoDkim extends DkimIdentity { + constructor(private readonly options: ByoDkimOptions) { + super(); + } + + public bind(emailIdentity: EmailIdentity, hostedZone?: route53.IPublicHostedZone): DkimIdentityConfig | undefined { + if (hostedZone && this.options.publicKey) { + new route53.TxtRecord(emailIdentity, 'DkimTxt', { + zone: hostedZone, + recordName: `${this.options.selector}._domainkey`, + values: [`p=${this.options.publicKey}`], + }); + } + + return { + domainSigningPrivateKey: this.options.privateKey.unsafeUnwrap(), // safe usage + domainSigningSelector: this.options.selector, + }; + } +} + +/** + * The signing key length for Easy DKIM + */ +export enum EasyDkimSigningKeyLength { + /** + * RSA 1024-bit + */ + RSA_1024_BIT = 'RSA_1024_BIT', + + /** + * RSA 2048-bit + */ + RSA_2048_BIT = 'RSA_2048_BIT' +} + +/** + * An email identity + */ +export class EmailIdentity extends Resource implements IEmailIdentity { + /** + * Use an existing email identity + */ + public static fromEmailIdentityName(scope: Construct, id: string, emailIdentityName: string): IEmailIdentity { + class Import extends Resource implements IEmailIdentity { + public readonly emailIdentityName = emailIdentityName; + } + return new Import(scope, id); + } + + public readonly emailIdentityName: string; + + /** + * The host name for the first token that you have to add to the + * DNS configurationfor your domain + * + * @attribute + */ + public readonly dkimDnsTokenName1: string; + + /** + * The host name for the second token that you have to add to the + * DNS configuration for your domain + * + * @attribute + */ + public readonly dkimDnsTokenName2: string; + + /** + * The host name for the third token that you have to add to the + * DNS configuration for your domain + * + * @attribute + */ + public readonly dkimDnsTokenName3: string; + + /** + * The record value for the first token that you have to add to the + * DNS configuration for your domain + * + * @attribute + */ + public readonly dkimDnsTokenValue1: string; + + /** + * The record value for the second token that you have to add to the + * DNS configuration for your domain + * + * @attribute + */ + public readonly dkimDnsTokenValue2: string; + + /** + * The record value for the third token that you have to add to the + * DNS configuration for your domain + * + * @attribute + */ + public readonly dkimDnsTokenValue3: string; + + /** + * DKIM records for this identity + */ + public readonly dkimRecords: DkimRecord[]; + + constructor(scope: Construct, id: string, props: EmailIdentityProps) { + super(scope, id); + + const dkimIdentity = props.dkimIdentity ?? DkimIdentity.easyDkim(); + + const identity = new CfnEmailIdentity(this, 'Resource', { + emailIdentity: props.identity.value, + configurationSetAttributes: undefinedIfNoKeys({ + configurationSetName: props.configurationSet?.configurationSetName, + }), + dkimAttributes: undefinedIfNoKeys({ + signingEnabled: props.dkimSigning, + }), + dkimSigningAttributes: dkimIdentity.bind(this, props.identity.hostedZone), + feedbackAttributes: undefinedIfNoKeys({ + emailForwardingEnabled: props.feedbackForwarding, + }), + mailFromAttributes: undefinedIfNoKeys({ + mailFromDomain: props.mailFromDomain, + behaviorOnMxFailure: props.mailFromBehaviorOnMxFailure, + }), + }); + + if (props.mailFromDomain && props.identity.hostedZone) { + new route53.MxRecord(this, 'MailFromMxRecord', { + zone: props.identity.hostedZone, + recordName: props.mailFromDomain, + values: [{ + priority: 10, + hostName: `feedback-smtp.${Stack.of(this).region}.amazonses.com`, + }], + }); + + new route53.TxtRecord(this, 'MailFromTxtRecord', { + zone: props.identity.hostedZone, + recordName: props.mailFromDomain, + values: ['v=spf1 include:amazonses.com ~all'], + }); + } + + this.emailIdentityName = identity.ref; + + this.dkimDnsTokenName1 = identity.attrDkimDnsTokenName1; + this.dkimDnsTokenName2 = identity.attrDkimDnsTokenName2; + this.dkimDnsTokenName3 = identity.attrDkimDnsTokenName3; + this.dkimDnsTokenValue1 = identity.attrDkimDnsTokenValue1; + this.dkimDnsTokenValue2 = identity.attrDkimDnsTokenValue2; + this.dkimDnsTokenValue3 = identity.attrDkimDnsTokenValue3; + + this.dkimRecords = [ + { name: this.dkimDnsTokenName1, value: this.dkimDnsTokenValue1 }, + { name: this.dkimDnsTokenName2, value: this.dkimDnsTokenValue2 }, + { name: this.dkimDnsTokenName3, value: this.dkimDnsTokenValue3 }, + ]; + } +} + +/** + * A DKIM record + */ +export interface DkimRecord { + /** + * The name of the record + */ + readonly name: string; + + /** + * The value of the record + */ + readonly value: string; +} diff --git a/packages/@aws-cdk/aws-ses/lib/index.ts b/packages/@aws-cdk/aws-ses/lib/index.ts index 078887862180c..94837f91a38ae 100644 --- a/packages/@aws-cdk/aws-ses/lib/index.ts +++ b/packages/@aws-cdk/aws-ses/lib/index.ts @@ -2,6 +2,9 @@ export * from './receipt-rule-set'; export * from './receipt-rule'; export * from './receipt-rule-action'; export * from './receipt-filter'; +export * from './dedicated-ip-pool'; +export * from './configuration-set'; +export * from './email-identity'; // AWS::SES CloudFormation Resources: export * from './ses.generated'; diff --git a/packages/@aws-cdk/aws-ses/lib/private/utils.ts b/packages/@aws-cdk/aws-ses/lib/private/utils.ts new file mode 100644 index 0000000000000..fd00f3bda7b77 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/lib/private/utils.ts @@ -0,0 +1,4 @@ +export function undefinedIfNoKeys(obj: A): A | undefined { + const allUndefined = Object.values(obj).every(val => val === undefined); + return allUndefined ? undefined : obj; +} diff --git a/packages/@aws-cdk/aws-ses/package.json b/packages/@aws-cdk/aws-ses/package.json index ce52874575bc6..428330f4963a0 100644 --- a/packages/@aws-cdk/aws-ses/package.json +++ b/packages/@aws-cdk/aws-ses/package.json @@ -82,6 +82,7 @@ "devDependencies": { "@aws-cdk/assertions": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", + "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", @@ -92,6 +93,7 @@ "dependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", + "@aws-cdk/aws-route53": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^10.0.0" }, @@ -99,6 +101,7 @@ "peerDependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", + "@aws-cdk/aws-route53": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^10.0.0" }, @@ -118,7 +121,8 @@ "docs-public-apis:@aws-cdk/aws-ses.DropSpamReceiptRuleProps", "props-default-doc:@aws-cdk/aws-ses.ReceiptRuleActionConfig.s3Action", "props-default-doc:@aws-cdk/aws-ses.ReceiptRuleActionConfig.bounceAction", - "props-default-doc:@aws-cdk/aws-ses.ReceiptRuleActionConfig.lambdaAction" + "props-default-doc:@aws-cdk/aws-ses.ReceiptRuleActionConfig.lambdaAction", + "props-physical-name:@aws-cdk/aws-ses.EmailIdentityProps" ] }, "awscdkio": { diff --git a/packages/@aws-cdk/aws-ses/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-ses/rosetta/default.ts-fixture index f86757d5fe6f4..344e962cb852d 100644 --- a/packages/@aws-cdk/aws-ses/rosetta/default.ts-fixture +++ b/packages/@aws-cdk/aws-ses/rosetta/default.ts-fixture @@ -3,10 +3,11 @@ import { Stack } from '@aws-cdk/core'; import { Construct } from 'constructs'; import * as ses from '@aws-cdk/aws-ses'; import * as sns from '@aws-cdk/aws-sns'; +import * as route53 from '@aws-cdk/aws-route53'; class Fixture extends Stack { constructor(scope: Construct, id: string) { super(scope, id); /// here } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/ConfigurationSetIntegDefaultTestDeployAssert9B6AD46A.template.json b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/ConfigurationSetIntegDefaultTestDeployAssert9B6AD46A.template.json new file mode 100644 index 0000000000000..9e26dfeeb6e64 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/ConfigurationSetIntegDefaultTestDeployAssert9B6AD46A.template.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/cdk-ses-configuration-set-integ.template.json b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/cdk-ses-configuration-set-integ.template.json new file mode 100644 index 0000000000000..5a0081e6930f0 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/cdk-ses-configuration-set-integ.template.json @@ -0,0 +1,7 @@ +{ + "Resources": { + "ConfigurationSet3DD38186": { + "Type": "AWS::SES::ConfigurationSet" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/cdk.out new file mode 100644 index 0000000000000..588d7b269d34f --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/integ.json b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/integ.json new file mode 100644 index 0000000000000..ecc0733ebfbdf --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/integ.json @@ -0,0 +1,11 @@ +{ + "version": "20.0.0", + "testCases": { + "ConfigurationSetInteg/DefaultTest": { + "stacks": [ + "cdk-ses-configuration-set-integ" + ], + "assertionStack": "ConfigurationSetIntegDefaultTestDeployAssert9B6AD46A" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/manifest.json new file mode 100644 index 0000000000000..40ef7b019b59d --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/manifest.json @@ -0,0 +1,37 @@ +{ + "version": "20.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "cdk-ses-configuration-set-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "cdk-ses-configuration-set-integ.template.json", + "validateOnSynth": false + }, + "metadata": { + "/cdk-ses-configuration-set-integ/ConfigurationSet/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ConfigurationSet3DD38186" + } + ] + }, + "displayName": "cdk-ses-configuration-set-integ" + }, + "ConfigurationSetIntegDefaultTestDeployAssert9B6AD46A": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "ConfigurationSetIntegDefaultTestDeployAssert9B6AD46A.template.json", + "validateOnSynth": false + }, + "displayName": "ConfigurationSetInteg/DefaultTest/DeployAssert" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/tree.json b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/tree.json new file mode 100644 index 0000000000000..f5b731b191619 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/configuration-set.integ.snapshot/tree.json @@ -0,0 +1,89 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "cdk-ses-configuration-set-integ": { + "id": "cdk-ses-configuration-set-integ", + "path": "cdk-ses-configuration-set-integ", + "children": { + "ConfigurationSet": { + "id": "ConfigurationSet", + "path": "cdk-ses-configuration-set-integ/ConfigurationSet", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-ses-configuration-set-integ/ConfigurationSet/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SES::ConfigurationSet", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ses.CfnConfigurationSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ses.ConfigurationSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "ConfigurationSetInteg": { + "id": "ConfigurationSetInteg", + "path": "ConfigurationSetInteg", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "ConfigurationSetInteg/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "ConfigurationSetInteg/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "ConfigurationSetInteg/DefaultTest/DeployAssert", + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTest", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/configuration-set.test.ts b/packages/@aws-cdk/aws-ses/test/configuration-set.test.ts new file mode 100644 index 0000000000000..9a9fb8ebb0dc9 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/configuration-set.test.ts @@ -0,0 +1,42 @@ +import { Template, Match } from '@aws-cdk/assertions'; +import { Stack } from '@aws-cdk/core'; +import { ConfigurationSet, ConfigurationSetTlsPolicy, DedicatedIpPool, SuppressionReasons } from '../lib'; + +let stack: Stack; +beforeEach(() => { + stack = new Stack(); +}); + +test('default configuration set', () => { + new ConfigurationSet(stack, 'ConfigurationSet'); + + Template.fromStack(stack).hasResourceProperties('AWS::SES::ConfigurationSet', { + Name: Match.absent(), + }); +}); + +test('configuration set with options', () => { + new ConfigurationSet(stack, 'ConfigurationSet', { + customTrackingRedirectDomain: 'track.cdk.dev', + suppressionReasons: SuppressionReasons.COMPLAINTS_ONLY, + tlsPolicy: ConfigurationSetTlsPolicy.REQUIRE, + dedicatedIpPool: new DedicatedIpPool(stack, 'Pool'), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::SES::ConfigurationSet', { + DeliveryOptions: { + SendingPoolName: { + Ref: 'PoolD3F588B8', + }, + TlsPolicy: 'REQUIRE', + }, + SuppressionOptions: { + SuppressedReasons: [ + 'COMPLAINT', + ], + }, + TrackingOptions: { + CustomRedirectDomain: 'track.cdk.dev', + }, + }); +}); diff --git a/packages/@aws-cdk/aws-ses/test/dedicated-ip-pool.test.ts b/packages/@aws-cdk/aws-ses/test/dedicated-ip-pool.test.ts new file mode 100644 index 0000000000000..c635da3790319 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/dedicated-ip-pool.test.ts @@ -0,0 +1,17 @@ +import { Template, Match } from '@aws-cdk/assertions'; +import { Stack } from '@aws-cdk/core'; +import { DedicatedIpPool } from '../lib'; + +let stack: Stack; +beforeEach(() => { + stack = new Stack(); +}); + +test('default dedicated IP pool', () => { + // GIVEN + new DedicatedIpPool(stack, 'Pool'); + + Template.fromStack(stack).hasResourceProperties('AWS::SES::DedicatedIpPool', { + PoolName: Match.absent(), + }); +}); diff --git a/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/EmailIdentityIntegDefaultTestDeployAssert3F909307.template.json b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/EmailIdentityIntegDefaultTestDeployAssert3F909307.template.json new file mode 100644 index 0000000000000..9e26dfeeb6e64 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/EmailIdentityIntegDefaultTestDeployAssert3F909307.template.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/cdk-ses-email-identity-integ.template.json b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/cdk-ses-email-identity-integ.template.json new file mode 100644 index 0000000000000..6f3239479a0e6 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/cdk-ses-email-identity-integ.template.json @@ -0,0 +1,154 @@ +{ + "Resources": { + "HostedZoneDB99F866": { + "Type": "AWS::Route53::HostedZone", + "Properties": { + "Name": "cdk.dev." + } + }, + "HostedZoneDkimDnsToken2A07BC1AD": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "Name": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenName2" + ] + }, + ".cdk.dev." + ] + ] + }, + "Type": "CNAME", + "HostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "ResourceRecords": [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenValue2" + ] + } + ], + "TTL": "1800" + } + }, + "HostedZoneDkimDnsToken34DA6A373": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "Name": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenName3" + ] + }, + ".cdk.dev." + ] + ] + }, + "Type": "CNAME", + "HostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "ResourceRecords": [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenValue3" + ] + } + ], + "TTL": "1800" + } + }, + "EmailIdentityDkimDnsToken15F8EC787": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "Name": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenName1" + ] + }, + ".cdk.dev." + ] + ] + }, + "Type": "CNAME", + "HostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "ResourceRecords": [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenValue1" + ] + } + ], + "TTL": "1800" + } + }, + "EmailIdentity7187767D": { + "Type": "AWS::SES::EmailIdentity", + "Properties": { + "EmailIdentity": "cdk.dev", + "MailFromAttributes": { + "MailFromDomain": "mail.cdk.dev" + } + } + }, + "EmailIdentityMailFromMxRecordCEAAECD0": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "Name": "mail.cdk.dev.", + "Type": "MX", + "HostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "ResourceRecords": [ + { + "Fn::Join": [ + "", + [ + "10 feedback-smtp.", + { + "Ref": "AWS::Region" + }, + ".amazonses.com" + ] + ] + } + ], + "TTL": "1800" + } + }, + "EmailIdentityMailFromTxtRecordE6B5E5D0": { + "Type": "AWS::Route53::RecordSet", + "Properties": { + "Name": "mail.cdk.dev.", + "Type": "TXT", + "HostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "ResourceRecords": [ + "\"v=spf1 include:amazonses.com ~all\"" + ], + "TTL": "1800" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/cdk.out new file mode 100644 index 0000000000000..588d7b269d34f --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/integ.json b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/integ.json new file mode 100644 index 0000000000000..c8f2061eef610 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/integ.json @@ -0,0 +1,11 @@ +{ + "version": "20.0.0", + "testCases": { + "EmailIdentityInteg/DefaultTest": { + "stacks": [ + "cdk-ses-email-identity-integ" + ], + "assertionStack": "EmailIdentityIntegDefaultTestDeployAssert3F909307" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/manifest.json new file mode 100644 index 0000000000000..787ac36f4d175 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/manifest.json @@ -0,0 +1,73 @@ +{ + "version": "20.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "cdk-ses-email-identity-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "cdk-ses-email-identity-integ.template.json", + "validateOnSynth": false + }, + "metadata": { + "/cdk-ses-email-identity-integ/HostedZone/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "HostedZoneDB99F866" + } + ], + "/cdk-ses-email-identity-integ/HostedZone/DkimDnsToken2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "HostedZoneDkimDnsToken2A07BC1AD" + } + ], + "/cdk-ses-email-identity-integ/HostedZone/DkimDnsToken3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "HostedZoneDkimDnsToken34DA6A373" + } + ], + "/cdk-ses-email-identity-integ/EmailIdentity/DkimDnsToken1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EmailIdentityDkimDnsToken15F8EC787" + } + ], + "/cdk-ses-email-identity-integ/EmailIdentity/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EmailIdentity7187767D" + } + ], + "/cdk-ses-email-identity-integ/EmailIdentity/MailFromMxRecord/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EmailIdentityMailFromMxRecordCEAAECD0" + } + ], + "/cdk-ses-email-identity-integ/EmailIdentity/MailFromTxtRecord/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EmailIdentityMailFromTxtRecordE6B5E5D0" + } + ] + }, + "displayName": "cdk-ses-email-identity-integ" + }, + "EmailIdentityIntegDefaultTestDeployAssert3F909307": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "EmailIdentityIntegDefaultTestDeployAssert3F909307.template.json", + "validateOnSynth": false + }, + "displayName": "EmailIdentityInteg/DefaultTest/DeployAssert" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/tree.json b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/tree.json new file mode 100644 index 0000000000000..477ac6f768970 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/email-identity.integ.snapshot/tree.json @@ -0,0 +1,343 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "cdk-ses-email-identity-integ": { + "id": "cdk-ses-email-identity-integ", + "path": "cdk-ses-email-identity-integ", + "children": { + "HostedZone": { + "id": "HostedZone", + "path": "cdk-ses-email-identity-integ/HostedZone", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-ses-email-identity-integ/HostedZone/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::HostedZone", + "aws:cdk:cloudformation:props": { + "name": "cdk.dev." + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CfnHostedZone", + "version": "0.0.0" + } + }, + "DkimDnsToken2": { + "id": "DkimDnsToken2", + "path": "cdk-ses-email-identity-integ/HostedZone/DkimDnsToken2", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-ses-email-identity-integ/HostedZone/DkimDnsToken2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "name": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenName2" + ] + }, + ".cdk.dev." + ] + ] + }, + "type": "CNAME", + "hostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "resourceRecords": [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenValue2" + ] + } + ], + "ttl": "1800" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CnameRecord", + "version": "0.0.0" + } + }, + "DkimDnsToken3": { + "id": "DkimDnsToken3", + "path": "cdk-ses-email-identity-integ/HostedZone/DkimDnsToken3", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-ses-email-identity-integ/HostedZone/DkimDnsToken3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "name": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenName3" + ] + }, + ".cdk.dev." + ] + ] + }, + "type": "CNAME", + "hostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "resourceRecords": [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenValue3" + ] + } + ], + "ttl": "1800" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CnameRecord", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.PublicHostedZone", + "version": "0.0.0" + } + }, + "EmailIdentity": { + "id": "EmailIdentity", + "path": "cdk-ses-email-identity-integ/EmailIdentity", + "children": { + "DkimDnsToken1": { + "id": "DkimDnsToken1", + "path": "cdk-ses-email-identity-integ/EmailIdentity/DkimDnsToken1", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-ses-email-identity-integ/EmailIdentity/DkimDnsToken1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "name": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenName1" + ] + }, + ".cdk.dev." + ] + ] + }, + "type": "CNAME", + "hostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "resourceRecords": [ + { + "Fn::GetAtt": [ + "EmailIdentity7187767D", + "DkimDNSTokenValue1" + ] + } + ], + "ttl": "1800" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CnameRecord", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "cdk-ses-email-identity-integ/EmailIdentity/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::SES::EmailIdentity", + "aws:cdk:cloudformation:props": { + "emailIdentity": "cdk.dev", + "mailFromAttributes": { + "mailFromDomain": "mail.cdk.dev" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ses.CfnEmailIdentity", + "version": "0.0.0" + } + }, + "MailFromMxRecord": { + "id": "MailFromMxRecord", + "path": "cdk-ses-email-identity-integ/EmailIdentity/MailFromMxRecord", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-ses-email-identity-integ/EmailIdentity/MailFromMxRecord/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "name": "mail.cdk.dev.", + "type": "MX", + "hostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "resourceRecords": [ + { + "Fn::Join": [ + "", + [ + "10 feedback-smtp.", + { + "Ref": "AWS::Region" + }, + ".amazonses.com" + ] + ] + } + ], + "ttl": "1800" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.MxRecord", + "version": "0.0.0" + } + }, + "MailFromTxtRecord": { + "id": "MailFromTxtRecord", + "path": "cdk-ses-email-identity-integ/EmailIdentity/MailFromTxtRecord", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-ses-email-identity-integ/EmailIdentity/MailFromTxtRecord/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", + "aws:cdk:cloudformation:props": { + "name": "mail.cdk.dev.", + "type": "TXT", + "hostedZoneId": { + "Ref": "HostedZoneDB99F866" + }, + "resourceRecords": [ + "\"v=spf1 include:amazonses.com ~all\"" + ], + "ttl": "1800" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.CfnRecordSet", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-route53.TxtRecord", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-ses.EmailIdentity", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "EmailIdentityInteg": { + "id": "EmailIdentityInteg", + "path": "EmailIdentityInteg", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "EmailIdentityInteg/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "EmailIdentityInteg/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "EmailIdentityInteg/DefaultTest/DeployAssert", + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTest", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/test/email-identity.test.ts b/packages/@aws-cdk/aws-ses/test/email-identity.test.ts new file mode 100644 index 0000000000000..1b15e9c3dbed2 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/email-identity.test.ts @@ -0,0 +1,217 @@ +import { Template } from '@aws-cdk/assertions'; +import * as route53 from '@aws-cdk/aws-route53'; +import { SecretValue, Stack } from '@aws-cdk/core'; +import { ConfigurationSet, DkimIdentity, EmailIdentity, Identity, MailFromBehaviorOnMxFailure } from '../lib'; + +let stack: Stack; +beforeEach(() => { + stack = new Stack(); +}); + +test('default email identity for a domain', () => { + new EmailIdentity(stack, 'Identity', { + identity: Identity.domain('cdk.dev'), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::SES::EmailIdentity', { + EmailIdentity: 'cdk.dev', + }); +}); + +test('email identity from a hosted zone with easy dkim', () => { + const hostedZone = new route53.PublicHostedZone(stack, 'HostedZone', { + zoneName: 'cdk.dev', + }); + + new EmailIdentity(stack, 'Identity', { + identity: Identity.publicHostedZone(hostedZone), + configurationSet: new ConfigurationSet(stack, 'ConfigurationSet'), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::SES::EmailIdentity', { + EmailIdentity: 'cdk.dev', + ConfigurationSetAttributes: { + ConfigurationSetName: { + Ref: 'ConfigurationSet3DD38186', + }, + }, + }); + + Template.fromStack(stack).resourceCountIs('AWS::Route53::RecordSet', 3); + + Template.fromStack(stack).hasResourceProperties('AWS::Route53::RecordSet', { + Name: { + 'Fn::Join': [ + '', + [ + { + 'Fn::GetAtt': [ + 'Identity2D60E2CC', + 'DkimDNSTokenName1', + ], + }, + '.cdk.dev.', + ], + ], + }, + Type: 'CNAME', + HostedZoneId: { + Ref: 'HostedZoneDB99F866', + }, + ResourceRecords: [ + { + 'Fn::GetAtt': [ + 'Identity2D60E2CC', + 'DkimDNSTokenValue1', + ], + }, + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::Route53::RecordSet', { + Name: { + 'Fn::Join': [ + '', + [ + { + 'Fn::GetAtt': [ + 'Identity2D60E2CC', + 'DkimDNSTokenName2', + ], + }, + '.cdk.dev.', + ], + ], + }, + Type: 'CNAME', + HostedZoneId: { + Ref: 'HostedZoneDB99F866', + }, + ResourceRecords: [ + { + 'Fn::GetAtt': [ + 'Identity2D60E2CC', + 'DkimDNSTokenValue2', + ], + }, + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::Route53::RecordSet', { + Name: { + 'Fn::Join': [ + '', + [ + { + 'Fn::GetAtt': [ + 'Identity2D60E2CC', + 'DkimDNSTokenName3', + ], + }, + '.cdk.dev.', + ], + ], + }, + Type: 'CNAME', + HostedZoneId: { + Ref: 'HostedZoneDB99F866', + }, + ResourceRecords: [ + { + 'Fn::GetAtt': [ + 'Identity2D60E2CC', + 'DkimDNSTokenValue3', + ], + }, + ], + }); +}); + +test('email identity from a hosted zone with BYO dkim', () => { + const hostedZone = new route53.PublicHostedZone(stack, 'HostedZone', { + zoneName: 'cdk.dev', + }); + + new EmailIdentity(stack, 'Identity', { + identity: Identity.publicHostedZone(hostedZone), + dkimIdentity: DkimIdentity.byoDkim({ + privateKey: SecretValue.secretsManager('my-secret'), + selector: 'selector', + publicKey: 'public-key', + }), + }); + + Template.fromStack(stack).hasResourceProperties('AWS::SES::EmailIdentity', { + EmailIdentity: 'cdk.dev', + DkimSigningAttributes: { + DomainSigningPrivateKey: '{{resolve:secretsmanager:my-secret:SecretString:::}}', + DomainSigningSelector: 'selector', + }, + }); + + Template.fromStack(stack).resourceCountIs('AWS::Route53::RecordSet', 1); + + Template.fromStack(stack).hasResourceProperties('AWS::Route53::RecordSet', { + Name: 'selector._domainkey.cdk.dev.', + Type: 'TXT', + HostedZoneId: { + Ref: 'HostedZoneDB99F866', + }, + ResourceRecords: [ + '"p=public-key"', + ], + }); +}); + +test('with mail from and hosted zone', () => { + const hostedZone = new route53.PublicHostedZone(stack, 'HostedZone', { + zoneName: 'cdk.dev', + }); + + new EmailIdentity(stack, 'Identity', { + identity: Identity.publicHostedZone(hostedZone), + mailFromDomain: 'mail.cdk.dev', + mailFromBehaviorOnMxFailure: MailFromBehaviorOnMxFailure.REJECT_MESSAGE, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::SES::EmailIdentity', { + MailFromAttributes: { + BehaviorOnMxFailure: 'REJECT_MESSAGE', + MailFromDomain: 'mail.cdk.dev', + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::Route53::RecordSet', { + Name: 'mail.cdk.dev.', + Type: 'MX', + HostedZoneId: { + Ref: 'HostedZoneDB99F866', + }, + ResourceRecords: [ + { + 'Fn::Join': [ + '', + [ + '10 feedback-smtp.', + { + Ref: 'AWS::Region', + }, + '.amazonses.com', + ], + ], + }, + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::Route53::RecordSet', { + Name: 'mail.cdk.dev.', + Type: 'TXT', + HostedZoneId: { + Ref: 'HostedZoneDB99F866', + }, + ResourceRecords: [ + '"v=spf1 include:amazonses.com ~all"', + ], + }); +}); + diff --git a/packages/@aws-cdk/aws-ses/test/integ.configuration-set.ts b/packages/@aws-cdk/aws-ses/test/integ.configuration-set.ts new file mode 100644 index 0000000000000..ad13af5ea47eb --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/integ.configuration-set.ts @@ -0,0 +1,20 @@ +import { App, Stack, StackProps } from '@aws-cdk/core'; +import * as integ from '@aws-cdk/integ-tests'; +import { Construct } from 'constructs'; +import * as ses from '../lib'; + +class TestStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + new ses.ConfigurationSet(this, 'ConfigurationSet'); + } +} + +const app = new App(); + +new integ.IntegTest(app, 'ConfigurationSetInteg', { + testCases: [new TestStack(app, 'cdk-ses-configuration-set-integ')], +}); + +app.synth(); diff --git a/packages/@aws-cdk/aws-ses/test/integ.email-identity.ts b/packages/@aws-cdk/aws-ses/test/integ.email-identity.ts new file mode 100644 index 0000000000000..0e82eaf575642 --- /dev/null +++ b/packages/@aws-cdk/aws-ses/test/integ.email-identity.ts @@ -0,0 +1,28 @@ +import { PublicHostedZone } from '@aws-cdk/aws-route53'; +import { App, Stack, StackProps } from '@aws-cdk/core'; +import * as integ from '@aws-cdk/integ-tests'; +import { Construct } from 'constructs'; +import * as ses from '../lib'; + +class TestStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + const hostedZone = new PublicHostedZone(this, 'HostedZone', { + zoneName: 'cdk.dev', + }); + + new ses.EmailIdentity(this, 'EmailIdentity', { + identity: ses.Identity.publicHostedZone(hostedZone), + mailFromDomain: 'mail.cdk.dev', + }); + } +} + +const app = new App(); + +new integ.IntegTest(app, 'EmailIdentityInteg', { + testCases: [new TestStack(app, 'cdk-ses-email-identity-integ')], +}); + +app.synth(); diff --git a/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts b/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts index 8b8f533ad6788..3d9acff2d2a65 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts +++ b/packages/@aws-cdk/aws-sns-subscriptions/lib/sqs.ts @@ -1,7 +1,8 @@ import * as iam from '@aws-cdk/aws-iam'; import * as sns from '@aws-cdk/aws-sns'; import * as sqs from '@aws-cdk/aws-sqs'; -import { ArnFormat, Names, Stack, Token } from '@aws-cdk/core'; +import { ArnFormat, FeatureFlags, Names, Stack, Token } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; import { SubscriptionProps } from './subscription'; @@ -55,6 +56,9 @@ export class SqsSubscription implements sns.ITopicSubscription { resources: ['*'], actions: ['kms:Decrypt', 'kms:GenerateDataKey'], principals: [snsServicePrincipal], + conditions: FeatureFlags.of(topic).isEnabled(cxapi.SNS_SUBSCRIPTIONS_SQS_DECRYPTION_POLICY) + ? { ArnEquals: { 'aws:SourceArn': topic.topicArn } } + : undefined, })); } diff --git a/packages/@aws-cdk/aws-sns-subscriptions/package.json b/packages/@aws-cdk/aws-sns-subscriptions/package.json index a5477a14400ca..5c8d4c76df917 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/package.json +++ b/packages/@aws-cdk/aws-sns-subscriptions/package.json @@ -87,6 +87,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", "constructs": "^10.0.0" }, "homepage": "https://github.com/aws/aws-cdk", diff --git a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-sqs.lit.ts b/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-sqs.lit.ts old mode 100644 new mode 100755 index 4c65c3ca011c7..cb3f4d8e27151 --- a/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-sqs.lit.ts +++ b/packages/@aws-cdk/aws-sns-subscriptions/test/integ.sns-sqs.lit.ts @@ -1,15 +1,21 @@ +import * as kms from '@aws-cdk/aws-kms'; import * as sns from '@aws-cdk/aws-sns'; import * as sqs from '@aws-cdk/aws-sqs'; import * as cdk from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import * as subs from '../lib'; +const restrictSqsDescryption = { [cxapi.SNS_SUBSCRIPTIONS_SQS_DECRYPTION_POLICY]: true }; + class SnsToSqs extends cdk.Stack { constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { super(scope, id, props); /// !show const topic = new sns.Topic(this, 'MyTopic'); - const queue = new sqs.Queue(this, 'MyQueue'); + const queue = new sqs.Queue(this, 'MyQueue', { + encryptionMasterKey: new kms.Key(this, 'EncryptionMasterKey'), + }); topic.addSubscription(new subs.SqsSubscription(queue, { deadLetterQueue: new sqs.Queue(this, 'DeadLetterQueue'), @@ -18,7 +24,9 @@ class SnsToSqs extends cdk.Stack { } } -const app = new cdk.App(); +const app = new cdk.App({ + context: restrictSqsDescryption, +}); new SnsToSqs(app, 'aws-cdk-sns-sqs'); diff --git a/packages/@aws-cdk/aws-sns-subscriptions/test/sns-sqs.lit.integ.snapshot/aws-cdk-sns-sqs.template.json b/packages/@aws-cdk/aws-sns-subscriptions/test/sns-sqs.lit.integ.snapshot/aws-cdk-sns-sqs.template.json index 4d4d40244ceae..20a1f73ef916f 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/test/sns-sqs.lit.integ.snapshot/aws-cdk-sns-sqs.template.json +++ b/packages/@aws-cdk/aws-sns-subscriptions/test/sns-sqs.lit.integ.snapshot/aws-cdk-sns-sqs.template.json @@ -1,110 +1,171 @@ { - "Resources": { - "MyTopic86869434": { - "Type": "AWS::SNS::Topic" - }, - "MyQueueE6CA6235": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "MyQueuePolicy6BBEDDAC": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { - "Ref": "MyTopic86869434" - } + "Resources": { + "MyTopic86869434": { + "Type": "AWS::SNS::Topic" + }, + "MyQueueE6CA6235": { + "Type": "AWS::SQS::Queue", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Properties": { + "KmsMasterKeyId": { + "Fn::GetAtt": [ + "EncryptionMasterKey5BD393B9", + "Arn" + ] } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] - } } - ], - "Version": "2012-10-17" }, - "Queues": [ - { - "Ref": "MyQueueE6CA6235" - } - ] - } - }, - "MyQueueawscdksnssqsMyTopic9361DEA223429051": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "sqs", - "TopicArn": { - "Ref": "MyTopic86869434" - }, - "Endpoint": { - "Fn::GetAtt": [ - "MyQueueE6CA6235", - "Arn" - ] + "MyQueuePolicy6BBEDDAC": { + "Type": "AWS::SQS::QueuePolicy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "sqs:SendMessage", + "Condition": { + "ArnEquals": { + "aws:SourceArn": { + "Ref": "MyTopic86869434" + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "sns.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "MyQueueE6CA6235", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "Queues": [ + { + "Ref": "MyQueueE6CA6235" + } + ] + } }, - "RedrivePolicy": { - "deadLetterTargetArn": { - "Fn::GetAtt": [ - "DeadLetterQueue9F481546", - "Arn" - ] - } - } - } - }, - "DeadLetterQueue9F481546": { - "Type": "AWS::SQS::Queue", - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "DeadLetterQueuePolicyB1FB890C": { - "Type": "AWS::SQS::QueuePolicy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "sqs:SendMessage", - "Condition": { - "ArnEquals": { - "aws:SourceArn": { + "MyQueueawscdksnssqsMyTopic9361DEA223429051": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Protocol": "sqs", + "TopicArn": { "Ref": "MyTopic86869434" - } + }, + "Endpoint": { + "Fn::GetAtt": [ + "MyQueueE6CA6235", + "Arn" + ] + }, + "RedrivePolicy": { + "deadLetterTargetArn": { + "Fn::GetAtt": [ + "DeadLetterQueue9F481546", + "Arn" + ] + } } - }, - "Effect": "Allow", - "Principal": { - "Service": "sns.amazonaws.com" - }, - "Resource": { - "Fn::GetAtt": [ - "DeadLetterQueue9F481546", - "Arn" + } + }, + "DeadLetterQueue9F481546": { + "Type": "AWS::SQS::Queue", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DeadLetterQueuePolicyB1FB890C": { + "Type": "AWS::SQS::QueuePolicy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "sqs:SendMessage", + "Condition": { + "ArnEquals": { + "aws:SourceArn": { + "Ref": "MyTopic86869434" + } + } + }, + "Effect": "Allow", + "Principal": { + "Service": "sns.amazonaws.com" + }, + "Resource": { + "Fn::GetAtt": [ + "DeadLetterQueue9F481546", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "Queues": [ + { + "Ref": "DeadLetterQueue9F481546" + } ] - } } - ], - "Version": "2012-10-17" }, - "Queues": [ - { - "Ref": "DeadLetterQueue9F481546" - } - ] - } + "EncryptionMasterKey5BD393B9": { + "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": "*" + }, + { + "Action": [ + "kms:Decrypt", + "kms:GenerateDataKey" + ], + "Effect": "Allow", + "Principal": { + "Service": "sns.amazonaws.com" + }, + "Condition": { + "ArnEquals": { + "aws:SourceArn": { + "Ref": "MyTopic86869434" + } + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + }, + "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Retain" + } } - } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sns-subscriptions/test/subs.test.ts b/packages/@aws-cdk/aws-sns-subscriptions/test/subs.test.ts index 69cb80216d0e0..4eed6baf482e1 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/test/subs.test.ts +++ b/packages/@aws-cdk/aws-sns-subscriptions/test/subs.test.ts @@ -4,10 +4,11 @@ import * as lambda from '@aws-cdk/aws-lambda'; import * as sns from '@aws-cdk/aws-sns'; import * as sqs from '@aws-cdk/aws-sqs'; import { App, CfnParameter, Duration, RemovalPolicy, Stack, Token } from '@aws-cdk/core'; +import * as cxapi from '@aws-cdk/cx-api'; import * as subs from '../lib'; /* eslint-disable quote-props */ - +const restrictSqsDescryption = { [cxapi.SNS_SUBSCRIPTIONS_SQS_DECRYPTION_POLICY]: true }; let stack: Stack; let topic: sns.Topic; @@ -1042,6 +1043,156 @@ test('encrypted queue subscription', () => { }); }); +describe('Restrict sqs decryption feature flag', () => { + test('Restrict decryption of sqs to sns service principal', () => { + const stackUnderTest = new Stack( + new App(), + ); + const topicUnderTest = new sns.Topic(stackUnderTest, 'MyTopic', { + topicName: 'topicName', + displayName: 'displayName', + }); + const key = new kms.Key(stackUnderTest, 'MyKey', { + removalPolicy: RemovalPolicy.DESTROY, + }); + + const queue = new sqs.Queue(stackUnderTest, 'MyQueue', { + encryptionMasterKey: key, + }); + + topicUnderTest.addSubscription(new subs.SqsSubscription(queue)); + + Template.fromStack(stackUnderTest).templateMatches({ + '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': '*', + }, + { + 'Action': [ + 'kms:Decrypt', + 'kms:GenerateDataKey', + ], + 'Effect': 'Allow', + 'Principal': { + 'Service': 'sns.amazonaws.com', + }, + 'Resource': '*', + }, + ], + 'Version': '2012-10-17', + }, + }, + 'UpdateReplacePolicy': 'Delete', + 'DeletionPolicy': 'Delete', + }, + }, + }); + }); + test('Restrict decryption of sqs to sns topic', () => { + const stackUnderTest = new Stack( + new App({ + context: restrictSqsDescryption, + }), + ); + const topicUnderTest = new sns.Topic(stackUnderTest, 'MyTopic', { + topicName: 'topicName', + displayName: 'displayName', + }); + const key = new kms.Key(stackUnderTest, 'MyKey', { + removalPolicy: RemovalPolicy.DESTROY, + }); + + const queue = new sqs.Queue(stackUnderTest, 'MyQueue', { + encryptionMasterKey: key, + }); + + topicUnderTest.addSubscription(new subs.SqsSubscription(queue)); + + Template.fromStack(stackUnderTest).templateMatches({ + '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': '*', + }, + { + 'Action': [ + 'kms:Decrypt', + 'kms:GenerateDataKey', + ], + 'Effect': 'Allow', + 'Principal': { + 'Service': 'sns.amazonaws.com', + }, + 'Resource': '*', + 'Condition': { + 'ArnEquals': { + 'aws:SourceArn': { + 'Ref': 'MyTopic86869434', + }, + }, + }, + }, + ], + 'Version': '2012-10-17', + }, + }, + 'UpdateReplacePolicy': 'Delete', + 'DeletionPolicy': 'Delete', + }, + }, + }); + }); +}); + test('lambda subscription', () => { const fction = new lambda.Function(stack, 'MyFunc', { runtime: lambda.Runtime.NODEJS_14_X, diff --git a/packages/@aws-cdk/aws-sns/lib/topic-base.ts b/packages/@aws-cdk/aws-sns/lib/topic-base.ts index 35fef62dc2e0f..01a12275d7bb0 100644 --- a/packages/@aws-cdk/aws-sns/lib/topic-base.ts +++ b/packages/@aws-cdk/aws-sns/lib/topic-base.ts @@ -35,7 +35,7 @@ export interface ITopic extends IResource, notifications.INotificationRuleTarget /** * Subscribe some endpoint to this topic */ - addSubscription(subscription: ITopicSubscription): void; + addSubscription(subscription: ITopicSubscription): Subscription; /** * Adds a statement to the IAM resource policy associated with this topic. @@ -80,7 +80,7 @@ export abstract class TopicBase extends Resource implements ITopic { /** * Subscribe some endpoint to this topic */ - public addSubscription(subscription: ITopicSubscription) { + public addSubscription(subscription: ITopicSubscription): Subscription { const subscriptionConfig = subscription.bind(this); const scope = subscriptionConfig.subscriberScope || this; @@ -95,7 +95,7 @@ export abstract class TopicBase extends Resource implements ITopic { throw new Error(`A subscription with id "${id}" already exists under the scope ${scope.node.path}`); } - new Subscription(scope, id, { + return new Subscription(scope, id, { topic: this, ...subscriptionConfig, }); diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md index ad4c2a365c38b..7dd2cf1ad845e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md @@ -1404,6 +1404,25 @@ new tasks.StepFunctionsInvokeActivity(this, 'Submit Job', { }); ``` +Use the [Parameters](https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-parameters) field to create a collection of key-value pairs that are passed as input. +The values of each can either be static values that you include in your state machine definition, or selected from either the input or the context object with a path. + +```ts +const submitJobActivity = new sfn.Activity(this, 'SubmitJob'); + +new tasks.StepFunctionsInvokeActivity(this, 'Submit Job', { + activity: submitJobActivity, + parameters: { + comment: 'Selecting what I care about.', + MyDetails: { + size: sfn.JsonPath.stringAt('$.product.details.size'), + exists: sfn.JsonPath.stringAt('$.product.availability'), + StaticValue: 'foo' + }, + }, +}); +``` + ## SQS Step Functions supports [Amazon SQS](https://docs.aws.amazon.com/step-functions/latest/dg/connect-sqs.html) diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/stepfunctions/invoke-activity.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/stepfunctions/invoke-activity.ts index 0fb6007b8b7bc..a3d123bf04bc7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/stepfunctions/invoke-activity.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/stepfunctions/invoke-activity.ts @@ -11,6 +11,15 @@ export interface StepFunctionsInvokeActivityProps extends sfn.TaskStateBaseProps * Step Functions Activity to invoke */ readonly activity: sfn.IActivity + + /** + * Parameters pass a collection of key-value pairs, either static values or JSONPath expressions that select from the input. + * + * @see https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-parameters + * + * @default No parameters + */ + readonly parameters?: { [name: string]: any }; } /** @@ -39,6 +48,7 @@ export class StepFunctionsInvokeActivity extends sfn.TaskStateBase { protected _renderTask(): any { return { Resource: this.props.activity.activityArn, + Parameters: this.props.parameters ? sfn.FieldUtils.renderObject(this.props.parameters) : undefined, }; } } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.ts index 918c31d809aaf..c4f3f024dca73 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity.ts @@ -42,6 +42,14 @@ class InvokeActivityStack extends cdk.Stack { const finalStatus = new tasks.StepFunctionsInvokeActivity(this, 'Get Final Job Status', { activity: checkJobActivity, inputPath: '$.guid', + parameters: { + 'input.$': '$', + 'stringArgument': 'inital-task', + 'numberArgument': 123, + 'booleanArgument': true, + 'arrayArgument': ['a', 'b', 'c'], + 'jsonPath': sfn.JsonPath.stringAt('$.status'), + }, }); const chain = sfn.Chain diff --git a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/Integ-SecretsManager-Secret.assets.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/aws-stepfunctions-integ.assets.json similarity index 62% rename from packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/Integ-SecretsManager-Secret.assets.json rename to packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/aws-stepfunctions-integ.assets.json index af60091dfed5f..30a5ec55fc9fe 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/secret.lit.integ.snapshot/Integ-SecretsManager-Secret.assets.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/aws-stepfunctions-integ.assets.json @@ -1,15 +1,15 @@ { - "version": "17.0.0", + "version": "20.0.0", "files": { - "693c390ede695f635dd57c39306695df3b3030b9d0a594a87198632d063d477f": { + "b9edde5b0344ecb8e67455541ca7cae1ee0b7f594b359920852dcb647be6a6f2": { "source": { - "path": "Integ-SecretsManager-Secret.template.json", + "path": "aws-stepfunctions-integ.template.json", "packaging": "file" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "693c390ede695f635dd57c39306695df3b3030b9d0a594a87198632d063d477f.json", + "objectKey": "b9edde5b0344ecb8e67455541ca7cae1ee0b7f594b359920852dcb647be6a6f2.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/aws-stepfunctions-integ.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/aws-stepfunctions-integ.template.json index c62b7ac4097a3..8a0300f605fb4 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/aws-stepfunctions-integ.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/aws-stepfunctions-integ.template.json @@ -62,7 +62,7 @@ { "Ref": "CheckJob5FFC1D6F" }, - "\"}},\"TimeoutSeconds\":300}" + "\",\"Parameters\":{\"input.$\":\"$\",\"stringArgument\":\"inital-task\",\"numberArgument\":123,\"booleanArgument\":true,\"arrayArgument\":[\"a\",\"b\",\"c\"],\"jsonPath.$\":\"$.status\"}}},\"TimeoutSeconds\":300}" ] ] } diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/integ.json index 79cb5c49f757d..1198a87155e86 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/integ.json @@ -1,7 +1,7 @@ { - "version": "18.0.0", + "version": "20.0.0", "testCases": { - "aws-stepfunctions-tasks/test/stepfunctions/integ.invoke-activity": { + "stepfunctions/integ.invoke-activity": { "stacks": [ "aws-stepfunctions-integ" ], diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/manifest.json index 4575882e46d5e..c68109ad085de 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/tree.json index 5e6f1538bf15a..346091f46c60c 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/stepfunctions/invoke-activity.integ.snapshot/tree.json @@ -8,8 +8,8 @@ "id": "Tree", "path": "Tree", "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.33" } }, "aws-stepfunctions-integ": { @@ -187,7 +187,7 @@ { "Ref": "CheckJob5FFC1D6F" }, - "\"}},\"TimeoutSeconds\":300}" + "\",\"Parameters\":{\"input.$\":\"$\",\"stringArgument\":\"inital-task\",\"numberArgument\":123,\"booleanArgument\":true,\"arrayArgument\":[\"a\",\"b\",\"c\"],\"jsonPath.$\":\"$.status\"}}},\"TimeoutSeconds\":300}" ] ] } diff --git a/packages/@aws-cdk/cfnspec/CHANGELOG.md b/packages/@aws-cdk/cfnspec/CHANGELOG.md index 41a4a07343e52..50bb2ab389f94 100644 --- a/packages/@aws-cdk/cfnspec/CHANGELOG.md +++ b/packages/@aws-cdk/cfnspec/CHANGELOG.md @@ -1,3 +1,58 @@ +# CloudFormation Resource Specification v79.0.0 + +## New Resource Types + +* AWS::RedshiftServerless::Workgroup + +## Attribute Changes + + +## Property Changes + +* AWS::IoT::CACertificate CertificateMode (__added__) +* AWS::IoT::CACertificate CACertificatePem.Required (__changed__) + * Old: false + * New: true +* AWS::Logs::MetricFilter FilterName (__added__) +* AWS::Logs::MetricFilter FilterPattern.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-cwl-metricfilter-filterpattern + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-logs-metricfilter-filterpattern +* AWS::Logs::MetricFilter LogGroupName.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-cwl-metricfilter-loggroupname + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-logs-metricfilter-loggroupname +* AWS::Logs::MetricFilter MetricTransformations.DuplicatesAllowed (__deleted__) +* AWS::Logs::MetricFilter MetricTransformations.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-cwl-metricfilter-metrictransformations + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-logs-metricfilter-metrictransformations +* AWS::StepFunctions::StateMachine DefinitionSubstitutions.PrimitiveItemType (__changed__) + * Old: String + * New: Json + +## Property Type Changes + +* AWS::Logs::MetricFilter.Dimension (__added__) +* AWS::CloudFormation::StackSet.DeploymentTargets AccountFilterType (__added__) +* AWS::Logs::MetricFilter.MetricTransformation Dimensions (__added__) +* AWS::Logs::MetricFilter.MetricTransformation Unit (__added__) +* AWS::Logs::MetricFilter.MetricTransformation DefaultValue.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-cwl-metricfilter-metrictransformation-defaultvalue + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-defaultvalue +* AWS::Logs::MetricFilter.MetricTransformation MetricName.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-cwl-metricfilter-metrictransformation-metricname + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricname +* AWS::Logs::MetricFilter.MetricTransformation MetricNamespace.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-cwl-metricfilter-metrictransformation-metricnamespace + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricnamespace +* AWS::Logs::MetricFilter.MetricTransformation MetricValue.Documentation (__changed__) + * Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-cwl-metricfilter-metrictransformation-metricvalue + * New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricvalue +* AWS::SSMIncidents::ResponsePlan.IncidentTemplate IncidentTags (__added__) + +## Unapplied changes + +* AWS::Rekognition is at 68.0.0 +* AWS::SageMaker is at 72.0.0 + # CloudFormation Resource Specification v78.1.0 ## New Resource Types diff --git a/packages/@aws-cdk/cfnspec/cfn.version b/packages/@aws-cdk/cfnspec/cfn.version index f26f41190ea02..971544f3d6e8a 100644 --- a/packages/@aws-cdk/cfnspec/cfn.version +++ b/packages/@aws-cdk/cfnspec/cfn.version @@ -1 +1 @@ -78.1.0 +79.0.0 diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json index f990d628b63e0..71e3c406079e5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ACMPCA.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ACMPCA::Certificate.ApiPassthrough": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-apipassthrough.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json index d225c4aeaefa1..27eeec0e9bab5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_APS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::APS::RuleGroupsNamespace": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json index a42006ee9baec..4becdabcc23f1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AccessAnalyzer.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AccessAnalyzer::Analyzer.ArchiveRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-accessanalyzer-analyzer-archiverule.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json index e854d6ff35703..5513d26de9f2c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmazonMQ.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AmazonMQ::Broker.ConfigurationId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-configurationid.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json index 927ffe985e9eb..c0763af3b5bec 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Amplify.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Amplify::App.AutoBranchCreationConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json index 9aaa00f4e8285..4dbd02a6eb8c9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AmplifyUIBuilder.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AmplifyUIBuilder::Component.ActionParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-actionparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json index 1f02cabe11a12..981d1ac8ead37 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGateway.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ApiGateway::ApiKey.StageKey": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-apikey-stagekey.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json index 4fb44602b7ac4..bcdd85601ef3d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApiGatewayV2.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ApiGatewayV2::Api.BodyS3Location": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json index 77ee24393d37d..deff925e70d68 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppConfig.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AppConfig::Application.Tags": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appconfig-application-tags.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json index 130e4722fe89f..32a7c156ff5e6 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppFlow.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AppFlow::ConnectorProfile.AmplitudeConnectorProfileCredentials": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-amplitudeconnectorprofilecredentials.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json index 721fcb772d678..133ad426c9507 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppIntegrations.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AppIntegrations::DataIntegration.ScheduleConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-dataintegration-scheduleconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json index 7bc079c57c2fe..1b4e2e7a9008b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppMesh.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AppMesh::GatewayRoute.GatewayRouteHostnameMatch": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-gatewayroutehostnamematch.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json index d4636bc175ee9..5cd652ad95b61 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppRunner.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AppRunner::ObservabilityConfiguration.TraceConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-observabilityconfiguration-traceconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json index 9b5d8260602a2..6b6d3477a4e55 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppStream.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AppStream::AppBlock.S3Location": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-appblock-s3location.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json index 0a0c808a336b7..2dd98c0f86fef 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AppSync.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AppSync::DataSource.AuthorizationConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-authorizationconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json index cc461c2fe4fe7..e4d8d34cfc87a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationAutoScaling.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ApplicationAutoScaling::ScalableTarget.ScalableTargetAction": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scalabletargetaction.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json index 2096043b580ed..68a940afc69e5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ApplicationInsights.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ApplicationInsights::Application.Alarm": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarm.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json index 5305effee7610..a2233e18b024b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Athena.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Athena::WorkGroup.EncryptionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-encryptionconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json index 35f07a49e8c94..c03ec145d8fc3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AuditManager.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AuditManager::Assessment.AWSAccount": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-auditmanager-assessment-awsaccount.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json index b4671ab17ecb0..554982efcf9b1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScaling.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AutoScaling::AutoScalingGroup.AcceleratorCountRequest": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratorcountrequest.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json index 743408d830bd3..00e11d82e609e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_AutoScalingPlans.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::AutoScalingPlans::ScalingPlan.ApplicationSource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-applicationsource.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json index 43882a76c3a79..b46c290deb5c5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Backup.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Backup::BackupPlan.AdvancedBackupSettingResourceType": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-advancedbackupsettingresourcetype.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json index 9848a3afed7ce..0972eb18c2591 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Batch.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Batch::ComputeEnvironment.ComputeResources": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json index a0a6ea8f10b00..16700eacdf4a5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_BillingConductor.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::BillingConductor::BillingGroup.AccountGrouping": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billingconductor-billinggroup-accountgrouping.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json index ea896564cb635..46f2d6a806fd1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Budgets.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Budgets::Budget.BudgetData": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-budgetdata.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json index 214e32b061aae..b1d9e8cef460e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CE.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CE::AnomalyMonitor.ResourceTag": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ce-anomalymonitor-resourcetag.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json index 0993c2901f921..55bf7a27bf010 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CUR.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CUR::ReportDefinition": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json index 3e3dc5db123cd..b70d71ad15d13 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cassandra.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Cassandra::Table.BillingMode": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-billingmode.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json index 3455e490dbd57..6706e45023fef 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CertificateManager.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CertificateManager::Account.ExpiryEventsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-certificatemanager-account-expiryeventsconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json index 4c7b5a77fb78b..6fa167ca75e1f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Chatbot.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Chatbot::SlackChannelConfiguration": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json index 21ee8e796da91..3d3be2a078abe 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cloud9.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Cloud9::EnvironmentEC2.Repository": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloud9-environmentec2-repository.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json index a94ae6903ce2a..9ac442e40ebf4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFormation.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CloudFormation::HookVersion.LoggingConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-hookversion-loggingconfig.html", @@ -55,6 +55,12 @@ "AWS::CloudFormation::StackSet.DeploymentTargets": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html", "Properties": { + "AccountFilterType": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html#cfn-cloudformation-stackset-deploymenttargets-accountfiltertype", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, "Accounts": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html#cfn-cloudformation-stackset-deploymenttargets-accounts", "DuplicatesAllowed": false, diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json index 1bf2f6dac97cc..de1375ba1e323 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudFront.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CloudFront::CachePolicy.CachePolicyConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-cachepolicy-cachepolicyconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json index 65906d2cdb748..f69945bba040f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudTrail.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CloudTrail::EventDataStore.AdvancedEventSelector": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-eventdatastore-advancedeventselector.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json index 85d04d11c2e3e..a44f1d7dda962 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CloudWatch.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CloudWatch::Alarm.Dimension": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-dimension.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json index 3520a46780d96..31702eace9c29 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeArtifact.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CodeArtifact::Domain": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json index a24e4548cbe88..c16d05a8c1557 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeBuild.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CodeBuild::Project.Artifacts": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json index 018cf3b32f292..87e928b8f2ec9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeCommit.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CodeCommit::Repository.Code": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codecommit-repository-code.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json index 99a075fd518b6..d0b4170239536 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeDeploy.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CodeDeploy::DeploymentConfig.MinimumHealthyHosts": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentconfig-minimumhealthyhosts.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json index eb95353bf78fc..7a4a1f9f4d3cf 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruProfiler.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CodeGuruProfiler::ProfilingGroup.Channel": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codeguruprofiler-profilinggroup-channel.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json index 510ec909dbf3c..a458420e560bd 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeGuruReviewer.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CodeGuruReviewer::RepositoryAssociation": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json index e85c98be9efc2..7c1e87a78e074 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodePipeline.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CodePipeline::CustomActionType.ArtifactDetails": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-customactiontype-artifactdetails.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json index 5faa9d13681d3..b49caf629135d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStar.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CodeStar::GitHubRepository.Code": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestar-githubrepository-code.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json index 5a6f61fc8c21e..789bb076b3f0d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarConnections.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::CodeStarConnections::Connection": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json index 4f8f3c68e9895..c3db0b0afd9a9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CodeStarNotifications.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CodeStarNotifications::NotificationRule.Target": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codestarnotifications-notificationrule-target.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json index 66192c9b27757..68f1d2cdf8055 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Cognito.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Cognito::IdentityPool.CognitoIdentityProvider": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypool-cognitoidentityprovider.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json index 3bfae34a4acf8..8550e4c188fe0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Config.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Config::ConfigRule.Scope": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configrule-scope.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json index 3927b3a887b34..807d9c2eb4648 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Connect.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Connect::HoursOfOperation.HoursOfOperationConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-hoursofoperation-hoursofoperationconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json index d88a546b31879..dbc16ed4e10de 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_CustomerProfiles.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::CustomerProfiles::Integration.ConnectorOperator": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-integration-connectoroperator.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json index 40d5379ab0424..8f1450b4239ca 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DAX.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::DAX::Cluster.SSESpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dax-cluster-ssespecification.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json index c811952b44b06..6157077d1814b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DLM.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::DLM::LifecyclePolicy.Action": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dlm-lifecyclepolicy-action.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json index 8fd485a2b8d2b..b688984baabeb 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DMS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::DMS::Endpoint.DocDbSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dms-endpoint-docdbsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json index f71227eefeb38..00895186ed2f5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataBrew.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::DataBrew::Dataset.CsvOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-dataset-csvoptions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json index dfcd84b4f5f00..d50c25285fd23 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataPipeline.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::DataPipeline::Pipeline.Field": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datapipeline-pipeline-pipelineobjects-fields.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json index c72f8f7c809b5..058dd7fb8919c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DataSync.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::DataSync::LocationEFS.Ec2Config": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-locationefs-ec2config.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json index 45ac186de2faa..3cfdf48597cde 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Detective.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Detective::Graph": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json index 615e80dc443bb..29288450342c6 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DevOpsGuru.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::DevOpsGuru::NotificationChannel.NotificationChannelConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-devopsguru-notificationchannel-notificationchannelconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json index 481e35a0a170d..6c935899fd655 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DirectoryService.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::DirectoryService::MicrosoftAD.VpcSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-directoryservice-microsoftad-vpcsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json index 9eb795ff91a7c..2a20933479b34 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DocDB.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::DocDB::DBCluster": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json index 2289c4d97afa0..ae55d8b2b6f9b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_DynamoDB.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::DynamoDB::GlobalTable.AttributeDefinition": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-attributedefinition.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json index 32b78bfb13db4..05a9482b85aa7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EC2.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::EC2::CapacityReservation.TagSpecification": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservation-tagspecification.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json index 556346062ec93..e2ec9c091ac89 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECR.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ECR::ReplicationConfiguration.ReplicationConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecr-replicationconfiguration-replicationconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json index 031e5fe032ed4..6b1e11788e9fb 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ECS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ECS::CapacityProvider.AutoScalingGroupProvider": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json index 8ff2c312a3c18..5dff566e76a52 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EFS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::EFS::AccessPoint.AccessPointTag": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-efs-accesspoint-accesspointtag.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json index deb9d0a318d92..9715dd7fd3249 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EKS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::EKS::Cluster.ClusterLogging": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-clusterlogging.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json index 661efc07a53a8..7a474f2b8935c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMR.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::EMR::Cluster.Application": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-application.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json index d1a6db0a6adcd..d2da4dec3b7f4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRContainers.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::EMRContainers::VirtualCluster.ContainerInfo": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrcontainers-virtualcluster-containerinfo.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json index 3dfe10f41da05..bb21753a7af93 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EMRServerless.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::EMRServerless::Application.AutoStartConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emrserverless-application-autostartconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json index a875ee9a83162..6640261e19315 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElastiCache.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ElastiCache::CacheCluster.CloudWatchLogsDestinationDetails": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-cloudwatchlogsdestinationdetails.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json index ac3f124711257..fe9398005a8ba 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticBeanstalk.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ElasticBeanstalk::Application.ApplicationResourceLifecycleConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticbeanstalk-application-applicationresourcelifecycleconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json index 3bfefa62f268e..ade5a8cf50c13 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancing.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ElasticLoadBalancing::LoadBalancer.AccessLoggingPolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json index 05cf0ca3643b0..315522214bde5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ElasticLoadBalancingV2.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ElasticLoadBalancingV2::Listener.Action": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json index 8075c9099d4a0..2b4bba9742b73 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Elasticsearch.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Elasticsearch::Domain.AdvancedSecurityOptionsInput": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-advancedsecurityoptionsinput.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json index b41f9386e43c8..5e91cb1a3f096 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_EventSchemas.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::EventSchemas::Discoverer.TagsEntry": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventschemas-discoverer-tagsentry.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json index 5686d54ccdc1a..731ce7007013a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Events.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Events::Connection.ApiKeyAuthParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-connection-apikeyauthparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json index f92f0c5d5bc6f..e8c9b7713f9c9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Evidently.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Evidently::Experiment.MetricGoalObject": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-evidently-experiment-metricgoalobject.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json index 0b8ff2314986b..249586ccba077 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FIS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::FIS::ExperimentTemplate.ExperimentTemplateAction": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fis-experimenttemplate-experimenttemplateaction.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json index a1bb85e73e8d6..ba2e07f48900f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FMS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::FMS::Policy.IEMap": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fms-policy-iemap.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json index 6df50693aa2d0..98ffbeb28f825 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FSx.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::FSx::FileSystem.AuditLogConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-auditlogconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json index c951e882500a8..7e274f7513051 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FinSpace.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::FinSpace::Environment.FederationParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-finspace-environment-federationparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json index adc15088bef6a..99cfe6aa540e0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Forecast.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Forecast::Dataset": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json index 002204a8ff534..14135191d9f1b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_FraudDetector.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::FraudDetector::Detector.EntityType": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-frauddetector-detector-entitytype.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json index 8483a9da79dc5..156ba17b0af5a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GameLift.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::GameLift::Alias.RoutingStrategy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-alias-routingstrategy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json index d808bcceb754c..6a972675abdf4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GlobalAccelerator.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::GlobalAccelerator::EndpointGroup.EndpointConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json index b72b6471b5d15..0b27c5c941295 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Glue.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Glue::Classifier.CsvClassifier": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-csvclassifier.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json index 3249876d8a6cb..de1e182175c30 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Greengrass.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Greengrass::ConnectorDefinition.Connector": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-connectordefinition-connector.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json index 795b21248413c..feb9474a82fab 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GreengrassV2.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::GreengrassV2::ComponentVersion.ComponentDependencyRequirement": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentdependencyrequirement.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json index 8d90af4d732b8..e371a6f4b1c77 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GroundStation.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::GroundStation::Config.AntennaDownlinkConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-groundstation-config-antennadownlinkconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json index f907bd1e3b816..8eb2c91c2e9b6 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_GuardDuty.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::GuardDuty::Detector.CFNDataSourceConfigurations": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-guardduty-detector-cfndatasourceconfigurations.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json index afb8f5b1cb7ad..8e08ba880dd37 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_HealthLake.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::HealthLake::FHIRDatastore.KmsEncryptionConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-healthlake-fhirdatastore-kmsencryptionconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json index 7f0d1836bf7fd..cb241fe626ee3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IAM.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::IAM::Group.Policy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json index 53eba94c5feaa..761dd0be104e6 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IVS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::IVS::RecordingConfiguration.DestinationConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ivs-recordingconfiguration-destinationconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json index eec03535c7c7a..0607001c0c7b5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ImageBuilder.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ImageBuilder::ContainerRecipe.ComponentConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-containerrecipe-componentconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json index 08c0c8147ce45..2f4738b68aed4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Inspector.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::Inspector::AssessmentTarget": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json index edc1fa6cf0d41..455e26b04f826 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_InspectorV2.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::InspectorV2::Filter.DateFilter": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-inspectorv2-filter-datefilter.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json index 6a1260859cbb1..084b3b0951b4d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::IoT::AccountAuditConfiguration.AuditCheckConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-accountauditconfiguration-auditcheckconfiguration.html", @@ -1675,6 +1675,12 @@ "CACertificatePem": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-cacertificate.html#cfn-iot-cacertificate-cacertificatepem", "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + }, + "CertificateMode": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-cacertificate.html#cfn-iot-cacertificate-certificatemode", + "PrimitiveType": "String", "Required": false, "UpdateType": "Immutable" }, diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json index f3e7d4aa1b27e..0eb96375d11a9 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoT1Click.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::IoT1Click::Project.DeviceTemplate": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot1click-project-devicetemplate.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json index 6d655aaf2539f..7df231f3760fe 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTAnalytics.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::IoTAnalytics::Channel.ChannelStorage": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-channel-channelstorage.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json index a3519e3baf69b..a94c339952be7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTCoreDeviceAdvisor.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::IoTCoreDeviceAdvisor::SuiteDefinition": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json index b2cfbc7e7d8d1..80e8557136d0e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTEvents.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::IoTEvents::AlarmModel.AcknowledgeFlow": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-acknowledgeflow.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json index 15a7376e17b65..935bc2b76c1a1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTFleetHub.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::IoTFleetHub::Application": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json index f73b660b617ea..ecc4e730989b2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTSiteWise.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::IoTSiteWise::AccessPolicy.AccessPolicyIdentity": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-accesspolicy-accesspolicyidentity.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json index 0feaa40fe8ab9..82be485c8ae3b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTThingsGraph.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::IoTThingsGraph::FlowTemplate.DefinitionDocument": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotthingsgraph-flowtemplate-definitiondocument.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json index 38114cfd6013f..afcd02e10dde8 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTTwinMaker.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::IoTTwinMaker::ComponentType.DataConnector": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iottwinmaker-componenttype-dataconnector.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json index e68ab594d36ad..fe71ec6921618 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_IoTWireless.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::IoTWireless::DeviceProfile.LoRaWANDeviceProfile": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotwireless-deviceprofile-lorawandeviceprofile.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json index 08fe2369bb69f..213b6f81d9416 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KMS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::KMS::Alias": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json index af80292d25cd0..996c9afbf0642 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KafkaConnect.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::KafkaConnect::Connector.ApacheKafkaCluster": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kafkaconnect-connector-apachekafkacluster.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json index 556535330016e..3f77a7a29109a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kendra.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Kendra::DataSource.AccessControlListConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-accesscontrollistconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json index ba353db9557ef..7e8f71cabc844 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Kinesis.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Kinesis::Stream.StreamEncryption": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streamencryption.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json index 3c54d54eb6574..6a9c76a5331c3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalytics.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::KinesisAnalytics::Application.CSVMappingParameters": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalytics-application-csvmappingparameters.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json index 1750c9124ed01..e4c5aa3516a87 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisAnalyticsV2.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::KinesisAnalyticsV2::Application.ApplicationCodeConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalyticsv2-application-applicationcodeconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json index a7f2dad966220..3864788db9941 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisFirehose.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::KinesisFirehose::DeliveryStream.AmazonopensearchserviceBufferingHints": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-amazonopensearchservicebufferinghints.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json index e76ad535a76a3..ec29975cc4993 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_KinesisVideo.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::KinesisVideo::SignalingChannel": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json index 4d163f56395bb..4a70da81e6b45 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LakeFormation.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::LakeFormation::DataCellsFilter.ColumnWildcard": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lakeformation-datacellsfilter-columnwildcard.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json index ddeca5e92a264..0c1ee7c3aada5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lambda.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Lambda::Alias.AliasRoutingConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-aliasroutingconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json index b776803139512..e390b3c7fb096 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lex.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Lex::Bot.AdvancedRecognitionSetting": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lex-bot-advancedrecognitionsetting.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json index 8d35e6cba430c..470bcadbe96c0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LicenseManager.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::LicenseManager::License.BorrowConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-licensemanager-license-borrowconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json index c018485e7622b..d7402fc99ef42 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Lightsail.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Lightsail::Bucket.AccessRules": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-bucket-accessrules.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json index 317f54e25e129..ec3c01f5a5758 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Location.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Location::Map.MapConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-location-map-mapconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json index 29d6d8686ab6e..48230c9d94573 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Logs.json @@ -1,32 +1,63 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { + "AWS::Logs::MetricFilter.Dimension": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-dimension.html", + "Properties": { + "Key": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-dimension.html#cfn-logs-metricfilter-dimension-key", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + }, + "Value": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-dimension.html#cfn-logs-metricfilter-dimension-value", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Mutable" + } + } + }, "AWS::Logs::MetricFilter.MetricTransformation": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html", "Properties": { "DefaultValue": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-cwl-metricfilter-metrictransformation-defaultvalue", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-defaultvalue", "PrimitiveType": "Double", "Required": false, "UpdateType": "Mutable" }, + "Dimensions": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-dimensions", + "DuplicatesAllowed": false, + "ItemType": "Dimension", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "MetricName": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-cwl-metricfilter-metrictransformation-metricname", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricname", "PrimitiveType": "String", "Required": true, "UpdateType": "Mutable" }, "MetricNamespace": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-cwl-metricfilter-metrictransformation-metricnamespace", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricnamespace", "PrimitiveType": "String", "Required": true, "UpdateType": "Mutable" }, "MetricValue": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-cwl-metricfilter-metrictransformation-metricvalue", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricvalue", "PrimitiveType": "String", "Required": true, "UpdateType": "Mutable" + }, + "Unit": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-unit", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" } } } @@ -122,21 +153,26 @@ "AWS::Logs::MetricFilter": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html", "Properties": { + "FilterName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-logs-metricfilter-filtername", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, "FilterPattern": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-cwl-metricfilter-filterpattern", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-logs-metricfilter-filterpattern", "PrimitiveType": "String", "Required": true, "UpdateType": "Mutable" }, "LogGroupName": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-cwl-metricfilter-loggroupname", + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-logs-metricfilter-loggroupname", "PrimitiveType": "String", "Required": true, "UpdateType": "Immutable" }, "MetricTransformations": { - "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-cwl-metricfilter-metrictransformations", - "DuplicatesAllowed": false, + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html#cfn-logs-metricfilter-metrictransformations", "ItemType": "MetricTransformation", "Required": true, "Type": "List", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json index beab3de81a094..ab327233ea251 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutEquipment.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::LookoutEquipment::InferenceScheduler": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json index d71934fe24d1e..61de56dec9a3a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutMetrics.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::LookoutMetrics::Alert.Action": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-action.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json index b4be479c89e83..99b34c08963b3 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_LookoutVision.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::LookoutVision::Project": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json index 71368b7985169..41c545d5a075e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MSK.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::MSK::Cluster.BrokerLogs": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-brokerlogs.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json index da34a11ada697..443ddb2a3c25c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MWAA.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::MWAA::Environment.LoggingConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json index 0a7b69fcf3372..ac371e5bae7cd 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Macie.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Macie::FindingsFilter.Criterion": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-macie-findingsfilter-criterion.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json index 6a2d3f96020ab..f86c8a18c7327 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ManagedBlockchain.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ManagedBlockchain::Member.ApprovalThresholdPolicy": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-managedblockchain-member-approvalthresholdpolicy.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json index fbf83505aa9e1..09a7c0bd87528 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConnect.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::MediaConnect::Flow.Encryption": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flow-encryption.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json index c685cff602102..9c5228f25df54 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaConvert.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::MediaConvert::JobTemplate.AccelerationSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconvert-jobtemplate-accelerationsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json index 1ba2534971048..c7d06ccbd26dc 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaLive.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::MediaLive::Channel.AacSettings": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-aacsettings.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json index b02ac6d271d5a..d4703fa092a35 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaPackage.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::MediaPackage::Asset.EgressEndpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-asset-egressendpoint.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json index 6ddb83493c9c9..a4e57efed3aff 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaStore.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::MediaStore::Container.CorsRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediastore-container-corsrule.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json index 87add421abc5a..e45a971bf37b4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MediaTailor.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::MediaTailor::PlaybackConfiguration.AdMarkerPassthrough": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-playbackconfiguration-admarkerpassthrough.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json index 63bf1b28f5e00..bed69a50f579e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_MemoryDB.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::MemoryDB::Cluster.Endpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-memorydb-cluster-endpoint.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json index 3e5bfef6bb76c..e0ab75d05bb7f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Neptune.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Neptune::DBCluster.DBClusterRole": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-neptune-dbcluster-dbclusterrole.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json index c9907ce793514..dfcc67324ed10 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkFirewall.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::NetworkFirewall::Firewall.SubnetMapping": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewall-subnetmapping.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json index 538daece05ec5..8e880a892d99d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NetworkManager.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::NetworkManager::ConnectAttachment.ConnectAttachmentOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkmanager-connectattachment-connectattachmentoptions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json index 3a921f11edb57..2bc48f41f579f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_NimbleStudio.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::NimbleStudio::LaunchProfile.StreamConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-nimblestudio-launchprofile-streamconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json index 2147fd7147331..23905870ffe6f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpenSearchService.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::OpenSearchService::Domain.AdvancedSecurityOptionsInput": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-advancedsecurityoptionsinput.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json index b47466192c1b7..89ccd50a7a872 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorks.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::OpsWorks::App.DataSource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworks-app-datasource.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json index 1b22f52907009..8c3f00980562a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_OpsWorksCM.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::OpsWorksCM::Server.EngineAttribute": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opsworkscm-server-engineattribute.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json index 9c0c0d85a7b5d..e953759fce108 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Panorama.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Panorama::ApplicationInstance.ManifestOverridesPayload": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-panorama-applicationinstance-manifestoverridespayload.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json index 932647cf9ea1b..ed131bf1e96cb 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Personalize.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Personalize::Dataset.DatasetImportJob": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-personalize-dataset-datasetimportjob.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json index 8c5f75e18d5c7..01f90302a27bb 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Pinpoint.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Pinpoint::ApplicationSettings.CampaignHook": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-campaignhook.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json index 2adde264a65c7..fcb0139a6dea4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_PinpointEmail.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::PinpointEmail::ConfigurationSet.DeliveryOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpointemail-configurationset-deliveryoptions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json index 606887a037f9b..5ed73273eeef1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QLDB.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::QLDB::Stream.KinesisConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qldb-stream-kinesisconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json index f1deb4669e886..910156db282f1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_QuickSight.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::QuickSight::Analysis.AnalysisError": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-analysiserror.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json index b8bcd0ea10797..943874ab8ab30 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RAM.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::RAM::ResourceShare": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json index 8d868c32b2642..672685376f286 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RDS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::RDS::DBCluster.DBClusterRole": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbcluster-dbclusterrole.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json index e2bd9059db9ae..b5c2d79f60840 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RUM.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::RUM::AppMonitor.AppMonitorConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rum-appmonitor-appmonitorconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json index d719a912604f6..c1599ca140cf1 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Redshift.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Redshift::Cluster.Endpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshift-cluster-endpoint.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RedshiftServerless.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RedshiftServerless.json index 1ddea2f7fef9b..c59207137f7c0 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RedshiftServerless.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RedshiftServerless.json @@ -1,6 +1,24 @@ { - "$version": "78.1.0", - "PropertyTypes": {}, + "$version": "79.0.0", + "PropertyTypes": { + "AWS::RedshiftServerless::Workgroup.ConfigParameter": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshiftserverless-workgroup-configparameter.html", + "Properties": { + "ParameterKey": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshiftserverless-workgroup-configparameter.html#cfn-redshiftserverless-workgroup-configparameter-parameterkey", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + }, + "ParameterValue": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-redshiftserverless-workgroup-configparameter.html#cfn-redshiftserverless-workgroup-configparameter-parametervalue", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Mutable" + } + } + } + }, "ResourceTypes": { "AWS::RedshiftServerless::Namespace": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshiftserverless-namespace.html", @@ -75,6 +93,70 @@ "UpdateType": "Immutable" } } + }, + "AWS::RedshiftServerless::Workgroup": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshiftserverless-workgroup.html", + "Properties": { + "BaseCapacity": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshiftserverless-workgroup.html#cfn-redshiftserverless-workgroup-basecapacity", + "PrimitiveType": "Integer", + "Required": false, + "UpdateType": "Mutable" + }, + "ConfigParameters": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshiftserverless-workgroup.html#cfn-redshiftserverless-workgroup-configparameters", + "DuplicatesAllowed": false, + "ItemType": "ConfigParameter", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "EnhancedVpcRouting": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshiftserverless-workgroup.html#cfn-redshiftserverless-workgroup-enhancedvpcrouting", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "NamespaceName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshiftserverless-workgroup.html#cfn-redshiftserverless-workgroup-namespacename", + "PrimitiveType": "String", + "Required": false, + "UpdateType": "Immutable" + }, + "PubliclyAccessible": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshiftserverless-workgroup.html#cfn-redshiftserverless-workgroup-publiclyaccessible", + "PrimitiveType": "Boolean", + "Required": false, + "UpdateType": "Mutable" + }, + "SecurityGroupIds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshiftserverless-workgroup.html#cfn-redshiftserverless-workgroup-securitygroupids", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "SubnetIds": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshiftserverless-workgroup.html#cfn-redshiftserverless-workgroup-subnetids", + "PrimitiveItemType": "String", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "Tags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshiftserverless-workgroup.html#cfn-redshiftserverless-workgroup-tags", + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, + "WorkgroupName": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshiftserverless-workgroup.html#cfn-redshiftserverless-workgroup-workgroupname", + "PrimitiveType": "String", + "Required": true, + "UpdateType": "Immutable" + } + } } } } diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json index d3a4ada733fff..b55e492a7abdb 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RefactorSpaces.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::RefactorSpaces::Application.ApiGatewayProxyInput": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-refactorspaces-application-apigatewayproxyinput.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json index 0b55443ab6a9f..4c6387bfe531a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResilienceHub.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ResilienceHub::App.PhysicalResourceId": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resiliencehub-app-physicalresourceid.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json index 0dc8f3ee10f28..2165669a3aeff 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ResourceGroups.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ResourceGroups::Group.ConfigurationItem": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourcegroups-group-configurationitem.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json index a3e6a27213f56..3b1dd797a2dc5 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_RoboMaker.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::RoboMaker::RobotApplication.RobotSoftwareSuite": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-robomaker-robotapplication-robotsoftwaresuite.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json index 98158e6b71aa1..1e657443464b2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Route53::CidrCollection.Location": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-cidrcollection-location.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json index d50fe8a11f057..263fadb3cf72f 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryControl.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Route53RecoveryControl::Cluster.ClusterEndpoint": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoverycontrol-cluster-clusterendpoint.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json index 1c1d0199c9ce7..5fdd36044dae2 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53RecoveryReadiness.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Route53RecoveryReadiness::ResourceSet.DNSTargetResource": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoveryreadiness-resourceset-dnstargetresource.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json index 2c04c3be029cd..ab191af80629d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Route53Resolver.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Route53Resolver::FirewallRuleGroup.FirewallRule": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53resolver-firewallrulegroup-firewallrule.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json index a0401b1a7a1f4..31a2ecb96f91a 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::S3::AccessPoint.PublicAccessBlockConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-accesspoint-publicaccessblockconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json index 3bad8c467f0f5..b4f6a0bfb7125 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3ObjectLambda.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::S3ObjectLambda::AccessPoint.ObjectLambdaConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3objectlambda-accesspoint-objectlambdaconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json index 07b46da935907..69f6a15d0b906 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_S3Outposts.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::S3Outposts::AccessPoint.VpcConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3outposts-accesspoint-vpcconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json index 5bcb059d217ae..d19b14f81ddcd 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SDB.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::SDB::Domain": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json index 2bb9718e72e0f..189a56ef7a663 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SES.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::SES::ConfigurationSet.DeliveryOptions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ses-configurationset-deliveryoptions.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json index dccf7df6c56dc..b21e9bcbcd360 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SNS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::SNS::Topic.Subscription": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-subscription.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json index 1db0d1e5af294..521aa2171a2cd 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SQS.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::SQS::Queue": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json index 018a6296e380f..5c92fde0bf2ef 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSM.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::SSM::Association.InstanceAssociationOutputLocation": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-association-instanceassociationoutputlocation.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json index ea97a917e07eb..88848c2143282 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMContacts.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::SSMContacts::Contact.ChannelTargetInfo": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmcontacts-contact-channeltargetinfo.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json index 8a49bb4da5413..f6020ccbd7bec 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSMIncidents.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::SSMIncidents::ReplicationSet.RegionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-replicationset-regionconfiguration.html", @@ -95,6 +95,14 @@ "Required": true, "UpdateType": "Mutable" }, + "IncidentTags": { + "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-incidenttemplate.html#cfn-ssmincidents-responseplan-incidenttemplate-incidenttags", + "DuplicatesAllowed": false, + "ItemType": "Tag", + "Required": false, + "Type": "List", + "UpdateType": "Mutable" + }, "NotificationTargets": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssmincidents-responseplan-incidenttemplate.html#cfn-ssmincidents-responseplan-incidenttemplate-notificationtargets", "ItemType": "NotificationTargetItem", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json index 2017ec4a6c540..6b9c48a537b28 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SSO.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::SSO::InstanceAccessControlAttributeConfiguration.AccessControlAttribute": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sso-instanceaccesscontrolattributeconfiguration-accesscontrolattribute.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json index 19d39c0b62436..cf11e2acb54c7 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecretsManager.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::SecretsManager::RotationSchedule.HostedRotationLambda": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-secretsmanager-rotationschedule-hostedrotationlambda.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json index 4098b5d9a26b9..1ce471318bad8 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_SecurityHub.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::SecurityHub::Hub": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json index 86845b3d51132..8869a949227ef 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalog.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ServiceCatalog::CloudFormationProduct.ProvisioningArtifactProperties": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicecatalog-cloudformationproduct-provisioningartifactproperties.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json index cb049588967d4..dd14a62f96b1e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceCatalogAppRegistry.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": {}, "ResourceTypes": { "AWS::ServiceCatalogAppRegistry::Application": { diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json index a8442b6659f5a..0cd2d41abd2fd 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_ServiceDiscovery.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::ServiceDiscovery::PrivateDnsNamespace.PrivateDnsPropertiesMutable": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-privatednsnamespace-privatednspropertiesmutable.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json index c08a34d6fe9fa..60d4ecd85911c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Signer.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Signer::SigningProfile.SignatureValidityPeriod": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-signer-signingprofile-signaturevalidityperiod.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json index 30f2382d3f54a..a8e22874d220e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_StepFunctions.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::StepFunctions::Activity.TagsEntry": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-activity-tagsentry.html", @@ -181,7 +181,7 @@ }, "DefinitionSubstitutions": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#cfn-stepfunctions-statemachine-definitionsubstitutions", - "PrimitiveItemType": "String", + "PrimitiveItemType": "Json", "Required": false, "Type": "Map", "UpdateType": "Mutable" diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json index 8dbf548910f75..e2735bf2847af 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Synthetics.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Synthetics::Canary.ArtifactConfig": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-artifactconfig.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json index 3d157b8d81b57..317b7dc70e48e 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Timestream.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Timestream::ScheduledQuery.DimensionMapping": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-dimensionmapping.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json index 9b579b865e558..72388d75454eb 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Transfer.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Transfer::Server.EndpointDetails": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-server-endpointdetails.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json index 7aba4cac54bc3..4d7d1046c5866 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_VoiceID.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::VoiceID::Domain.ServerSideEncryptionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-voiceid-domain-serversideencryptionconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json index caaabc5659aaf..c42b062e50c49 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAF.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::WAF::ByteMatchSet.ByteMatchTuple": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waf-bytematchset-bytematchtuples.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json index 068a869aebb7d..ca3a90a04572d 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFRegional.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::WAFRegional::ByteMatchSet.ByteMatchTuple": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-bytematchset-bytematchtuple.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json index eec8d9b089db4..60c7976689fad 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WAFv2.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::WAFv2::LoggingConfiguration.FieldToMatch": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-fieldtomatch.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json index 34195112db532..423f7d7627dd4 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_Wisdom.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::Wisdom::Assistant.ServerSideEncryptionConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wisdom-assistant-serversideencryptionconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json index f17b5ee99a0a6..47641bb02ecdf 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_WorkSpaces.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::WorkSpaces::ConnectionAlias.ConnectionAliasAssociation": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspaces-connectionalias-connectionaliasassociation.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json index d4a85a6969f97..322a26106ae8c 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_AWS_XRay.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "AWS::XRay::Group.InsightsConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-xray-group-insightsconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json index 90d564154efc8..31769e4638b59 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Alexa_ASK.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "Alexa::ASK::Skill.AuthenticationConfiguration": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ask-skill-authenticationconfiguration.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json index d7c4925aab789..daf652f7cf6ca 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/000_Tag.json @@ -1,5 +1,5 @@ { - "$version": "78.1.0", + "$version": "79.0.0", "PropertyTypes": { "Tag": { "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html", diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json index 97cb95c77a1d2..2e6d9a42cf80b 100644 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json +++ b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/000_official/001_Version.json @@ -1,3 +1,3 @@ { - "ResourceSpecificationVersion": "78.1.0" + "ResourceSpecificationVersion": "79.0.0" } diff --git a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_Cognito_UserPool_UsernameConfiguration_patch.json b/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_Cognito_UserPool_UsernameConfiguration_patch.json deleted file mode 100644 index 2e921a70e94cf..0000000000000 --- a/packages/@aws-cdk/cfnspec/spec-source/specification/000_cfn/500_Cognito_UserPool_UsernameConfiguration_patch.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "PropertyTypes": { - "AWS::Cognito::UserPool.UsernameConfiguration": { - "patch": { - "description": "make UserPool.UsernameConfiguration.CaseSensitive optional", - "operations": [ - { - "op": "replace", - "path": "/Properties/CaseSensitive/Required", - "value": false - } - ] - } - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/cloudformation-include/lib/cfn-include.ts b/packages/@aws-cdk/cloudformation-include/lib/cfn-include.ts index 2dcc4ee6b32e3..238118f20ab51 100644 --- a/packages/@aws-cdk/cloudformation-include/lib/cfn-include.ts +++ b/packages/@aws-cdk/cloudformation-include/lib/cfn-include.ts @@ -50,7 +50,11 @@ export interface CfnIncludeProps { * If you include a parameter here with an ID that isn't in the template, * template creation will fail and an error will be thrown. * - * @default - no parameters will be replaced + * If you are importing a parameter from a live stack, we cannot know the value of that + * parameter. You will need to supply a value for your parameters, else the default + * value will be used. + * + * @default - parameters will retain their original definitions */ readonly parameters?: { [parameterName: string]: any }; } diff --git a/packages/@aws-cdk/core/README.md b/packages/@aws-cdk/core/README.md index 773c2802a839b..215365c730108 100644 --- a/packages/@aws-cdk/core/README.md +++ b/packages/@aws-cdk/core/README.md @@ -995,6 +995,16 @@ const stack = new Stack(app, 'StackName', { By default, termination protection is disabled. +### Description + +You can add a description of the stack in the same way as `StackProps`. + +```ts +const stack = new Stack(app, 'StackName', { + description: 'This is a description.', +}); +``` + ### CfnJson `CfnJson` allows you to postpone the resolution of a JSON blob from diff --git a/packages/@aws-cdk/core/lib/nested-stack.ts b/packages/@aws-cdk/core/lib/nested-stack.ts index ea24698ac2b28..3adb30e677800 100644 --- a/packages/@aws-cdk/core/lib/nested-stack.ts +++ b/packages/@aws-cdk/core/lib/nested-stack.ts @@ -68,6 +68,13 @@ export interface NestedStackProps { * @default RemovalPolicy.DESTROY */ readonly removalPolicy?: RemovalPolicy; + + /** + * A description of the stack. + * + * @default - No description. + */ + readonly description?: string; } /** @@ -112,6 +119,7 @@ export class NestedStack extends Stack { super(scope, id, { env: { account: parentStack.account, region: parentStack.region }, synthesizer: new NestedStackSynthesizer(parentStack.synthesizer), + description: props.description, }); this._parentStack = parentStack; diff --git a/packages/@aws-cdk/core/lib/private/runtime-info.ts b/packages/@aws-cdk/core/lib/private/runtime-info.ts index be2b814d658b2..f3c04f0efed3e 100644 --- a/packages/@aws-cdk/core/lib/private/runtime-info.ts +++ b/packages/@aws-cdk/core/lib/private/runtime-info.ts @@ -4,7 +4,7 @@ import { Stage } from '../stage'; const ALLOWED_FQN_PREFIXES = [ // SCOPES - '@aws-cdk/', '@aws-cdk-containers/', '@aws-solutions-konstruk/', '@aws-solutions-constructs/', '@amzn/', + '@aws-cdk/', '@aws-cdk-containers/', '@aws-solutions-konstruk/', '@aws-solutions-constructs/', '@amzn/', '@cdklabs/', // PACKAGES 'aws-rfdk.', 'aws-cdk-lib.', 'monocdk.', ]; diff --git a/packages/@aws-cdk/core/lib/secret-value.ts b/packages/@aws-cdk/core/lib/secret-value.ts index ebbf471896cba..12e747f2592eb 100644 --- a/packages/@aws-cdk/core/lib/secret-value.ts +++ b/packages/@aws-cdk/core/lib/secret-value.ts @@ -68,7 +68,18 @@ export class SecretValue extends Intrinsic { * will be visible to anyone who has access to the CloudFormation template * (via the AWS Console, SDKs, or CLI). * - * The only reasonable use case for using this method is when you are testing. + * The primary use case for using this method is when you are testing. + * + * The other use case where this is appropriate is when constructing a JSON secret. + * For example, a JSON secret might have multiple fields where only some are actual + * secret values. + * + * @example + * declare const secret: SecretValue; + * const jsonSecret = { + * username: SecretValue.unsafePlainText('myUsername'), + * password: secret, + * }; */ public static unsafePlainText(secret: string): SecretValue { return new SecretValue(secret); @@ -254,4 +265,4 @@ Object.defineProperty(SecretValue.prototype, SECRET_VALUE_SYM, { configurable: false, enumerable: false, writable: false, -}); \ No newline at end of file +}); diff --git a/packages/@aws-cdk/core/lib/stack.ts b/packages/@aws-cdk/core/lib/stack.ts index 65298001d5876..23097a90914f2 100644 --- a/packages/@aws-cdk/core/lib/stack.ts +++ b/packages/@aws-cdk/core/lib/stack.ts @@ -1315,7 +1315,7 @@ export function rootPathTo(construct: IConstruct, ancestor?: IConstruct): IConst */ function makeStackName(components: string[]) { if (components.length === 1) { return components[0]; } - return makeUniqueId(components); + return makeUniqueResourceName(components, { maxLength: 128 }); } function getCreateExportsScope(stack: Stack) { @@ -1388,4 +1388,5 @@ import { Token, Tokenization } from './token'; import { referenceNestedStackValueInParent } from './private/refs'; import { Fact, RegionInfo } from '@aws-cdk/region-info'; import { deployTimeLookup } from './private/region-lookup'; +import { makeUniqueResourceName } from './private/unique-resource-name'; diff --git a/packages/@aws-cdk/core/test/nested-stack.test.ts b/packages/@aws-cdk/core/test/nested-stack.test.ts index b1508e8bf148f..697253fe5f7fd 100644 --- a/packages/@aws-cdk/core/test/nested-stack.test.ts +++ b/packages/@aws-cdk/core/test/nested-stack.test.ts @@ -22,4 +22,13 @@ describe('nested-stack', () => { }, }); }); + test('a nested-stack has a description in templateOptions.', () => { + const description = 'This is a description.'; + const stack = new Stack(); + var nestedStack = new NestedStack(stack, 'MyNestedStack', { + description, + }); + + expect(nestedStack.templateOptions.description).toEqual(description); + }); }); \ No newline at end of file diff --git a/packages/@aws-cdk/core/test/stack.test.ts b/packages/@aws-cdk/core/test/stack.test.ts index 48ae7d185d97f..35630f888f8d1 100644 --- a/packages/@aws-cdk/core/test/stack.test.ts +++ b/packages/@aws-cdk/core/test/stack.test.ts @@ -919,6 +919,17 @@ describe('stack', () => { expect(stack.stackName).toEqual('ProdStackD5279B22'); }); + test('generated stack names will not exceed 128 characters', () => { + // WHEN + const root = new App(); + const app = new Construct(root, 'ProdAppThisNameButItWillOnlyBeTooLongWhenCombinedWithTheStackName' + 'z'.repeat(60)); + const stack = new Stack(app, 'ThisNameIsVeryLongButItWillOnlyBeTooLongWhenCombinedWithTheAppNameStack'); + + // THEN + expect(stack.stackName.length).toEqual(128); + expect(stack.stackName).toEqual('ProdAppThisNameButItWillOnlyBeTooLongWhenCombinedWithTheStaceryLongButItWillOnlyBeTooLongWhenCombinedWithTheAppNameStack864CC1D3'); + }); + test('stack construct id does not go through stack name validation if there is an explicit stack name', () => { // GIVEN const app = new App(); diff --git a/packages/@aws-cdk/custom-resources/README.md b/packages/@aws-cdk/custom-resources/README.md index 1257486e4d8b7..db40ad6904544 100644 --- a/packages/@aws-cdk/custom-resources/README.md +++ b/packages/@aws-cdk/custom-resources/README.md @@ -547,33 +547,6 @@ path in `PhysicalResourceId.fromResponse()`. ### Custom Resource Examples -#### Verify a domain with SES - -```ts -import * as route53 from '@aws-cdk/aws-route53'; - -const verifyDomainIdentity = new cr.AwsCustomResource(this, 'VerifyDomainIdentity', { - onCreate: { - service: 'SES', - action: 'verifyDomainIdentity', - parameters: { - Domain: 'example.com', - }, - physicalResourceId: cr.PhysicalResourceId.fromResponse('VerificationToken'), // Use the token returned by the call as physical id - }, - policy: cr.AwsCustomResourcePolicy.fromSdkCalls({ - resources: cr.AwsCustomResourcePolicy.ANY_RESOURCE, - }), -}); - -declare const zone: route53.HostedZone; -new route53.TxtRecord(this, 'SESVerificationRecord', { - zone, - recordName: `_amazonses.example.com`, - values: [verifyDomainIdentity.getResponseField('VerificationToken')], -}); -``` - #### Get the latest version of a secure SSM parameter ```ts diff --git a/packages/@aws-cdk/custom-resources/lib/provider-framework/runtime/framework.ts b/packages/@aws-cdk/custom-resources/lib/provider-framework/runtime/framework.ts index 97b7c4de61e4b..20c0144311b94 100644 --- a/packages/@aws-cdk/custom-resources/lib/provider-framework/runtime/framework.ts +++ b/packages/@aws-cdk/custom-resources/lib/provider-framework/runtime/framework.ts @@ -29,7 +29,7 @@ async function onEvent(cfnRequest: AWSLambda.CloudFormationCustomResourceEvent) cfnRequest.ResourceProperties = cfnRequest.ResourceProperties || { }; - const onEventResult = await invokeUserFunction(consts.USER_ON_EVENT_FUNCTION_ARN_ENV, sanitizedRequest) as OnEventResponse; + const onEventResult = await invokeUserFunction(consts.USER_ON_EVENT_FUNCTION_ARN_ENV, sanitizedRequest, cfnRequest.ResponseURL) as OnEventResponse; log('onEvent returned:', onEventResult); // merge the request and the result from onEvent to form the complete resource event @@ -61,7 +61,7 @@ async function isComplete(event: AWSCDKAsyncCustomResource.IsCompleteRequest) { const sanitizedRequest = { ...event, ResponseURL: '...' } as const; log('isComplete', sanitizedRequest); - const isCompleteResult = await invokeUserFunction(consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV, sanitizedRequest) as IsCompleteResponse; + const isCompleteResult = await invokeUserFunction(consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV, sanitizedRequest, event.ResponseURL) as IsCompleteResponse; log('user isComplete returned:', isCompleteResult); // if we are not complete, return false, and don't send a response back. @@ -96,7 +96,7 @@ async function onTimeout(timeoutEvent: any) { }); } -async function invokeUserFunction(functionArnEnv: string, sanitizedPayload: A) { +async function invokeUserFunction(functionArnEnv: string, sanitizedPayload: A, responseUrl: string) { const functionArn = getEnv(functionArnEnv); log(`executing user function ${functionArn} with payload`, sanitizedPayload); @@ -106,8 +106,8 @@ async function invokeUserFunction(functionArnE const resp = await invokeFunction({ FunctionName: functionArn, - // Strip 'ResponseURL' -- the downstream CR doesn't need it and can only log it by accident - Payload: JSON.stringify({ ...sanitizedPayload, ResponseURL: undefined }), + // Cannot strip 'ResponseURL' here as this would be a breaking change even though the downstream CR doesn't need it + Payload: JSON.stringify({ ...sanitizedPayload, ResponseURL: responseUrl }), }); log('user function response:', resp, typeof(resp)); diff --git a/packages/@aws-cdk/custom-resources/test/provider-framework/runtime.test.ts b/packages/@aws-cdk/custom-resources/test/provider-framework/runtime.test.ts index 751e33e6408e0..2d35a9e63eac9 100644 --- a/packages/@aws-cdk/custom-resources/test/provider-framework/runtime.test.ts +++ b/packages/@aws-cdk/custom-resources/test/provider-framework/runtime.test.ts @@ -18,7 +18,10 @@ outbound.httpRequest = mocks.httpRequestMock; outbound.invokeFunction = mocks.invokeFunctionMock; outbound.startExecution = mocks.startExecutionMock; +const invokeFunctionSpy = jest.spyOn(outbound, 'invokeFunction'); + beforeEach(() => mocks.setup()); +afterEach(() => invokeFunctionSpy.mockClear()); test('async flow: isComplete returns true only after 3 times', async () => { let isCompleteCalls = 0; @@ -346,6 +349,41 @@ describe('if CREATE fails, the subsequent DELETE will be ignored', () => { }); +describe('ResponseURL is passed to user function', () => { + test('for onEvent', async () => { + // GIVEN + mocks.onEventImplMock = async () => ({ PhysicalResourceId: MOCK_PHYSICAL_ID }); + + // WHEN + await simulateEvent({ + RequestType: 'Create', + }); + + // THEN + expect(invokeFunctionSpy).toHaveBeenCalledTimes(1); + expect(invokeFunctionSpy).toBeCalledWith(expect.objectContaining({ + Payload: expect.stringContaining(`"ResponseURL":"${mocks.MOCK_REQUEST.ResponseURL}"`), + })); + }); + + test('for isComplete', async () => { + // GIVEN + mocks.onEventImplMock = async () => ({ PhysicalResourceId: MOCK_PHYSICAL_ID }); + mocks.isCompleteImplMock = async () => ({ IsComplete: true }); + + // WHEN + await simulateEvent({ + RequestType: 'Create', + }); + + // THEN + expect(invokeFunctionSpy).toHaveBeenCalledTimes(2); + expect(invokeFunctionSpy).toHaveBeenLastCalledWith(expect.objectContaining({ + Payload: expect.stringContaining(`"ResponseURL":"${mocks.MOCK_REQUEST.ResponseURL}"`), + })); + }); +}); + // ----------------------------------------------------------------------------------------------------------------------- /** diff --git a/packages/@aws-cdk/cx-api/README.md b/packages/@aws-cdk/cx-api/README.md index 49dee59c9dd85..84d45500e0008 100644 --- a/packages/@aws-cdk/cx-api/README.md +++ b/packages/@aws-cdk/cx-api/README.md @@ -10,3 +10,51 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. + +## V2 Feature Flags + +* `@aws-cdk/aws-s3:createDefaultLoggingPolicy` + +Enable this feature flag to create an S3 bucket policy by default in cases where +an AWS service would automatically create the Policy if one does not exist. + +For example, in order to send VPC flow logs to an S3 bucket, there is a specific Bucket Policy +that needs to be attached to the bucket. If you create the bucket without a policy and then add the +bucket as the flow log destination, the service will automatically create the bucket policy with the +necessary permissions. If you were to then try and add your own bucket policy CloudFormation will throw +and error indicating that a bucket policy already exists. + +In cases where we know what the required policy is we can go ahead and create the policy so we can +remain in control of it. + +https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-logs-infrastructure-S3 + +_cdk.json_ + +```json +{ + "context": { + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true + } +} +``` + +* `@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption` + +Enable this feature flag to restrict the decryption of a SQS queue, which is subscribed to a SNS topic, to +only the topic which it is subscribed to and not the whole SNS service of an account. + +Previously the decryption was only restricted to the SNS service principal. To make the SQS subscription more +secure, it is a good practice to restrict the decryption further and only allow the connected SNS topic to decryption +the subscribed queue. + +_cdk.json_ + +```json +{ + "context": { + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true + } +} +``` + diff --git a/packages/@aws-cdk/cx-api/lib/features.ts b/packages/@aws-cdk/cx-api/lib/features.ts index 64537dddd6a3f..06e4b8e66e87a 100644 --- a/packages/@aws-cdk/cx-api/lib/features.ts +++ b/packages/@aws-cdk/cx-api/lib/features.ts @@ -31,9 +31,16 @@ export const ENABLE_STACK_NAME_DUPLICATES_CONTEXT = '@aws-cdk/core:enableStackNameDuplicates'; /** - * IF this is set, `cdk diff` will always exit with 0. + * Determines what status code `cdk diff` should return when the specified stack + * differs from the deployed stack or the local CloudFormation template: * - * Use `cdk diff --fail` to exit with 1 if there's a diff. + * * aws-cdk:enableDiffNoFail=true => status code == 0 + * * aws-cdk:enableDiffNoFail=false => status code == 1 + * + * You can override this behavior with the --fail flag: + * + * * --fail => status code == 1 + * * --no-fail => status code == 0 */ export const ENABLE_DIFF_NO_FAIL_CONTEXT = 'aws-cdk:enableDiffNoFail'; /** @deprecated use `ENABLE_DIFF_NO_FAIL_CONTEXT` */ @@ -265,6 +272,34 @@ export const VALIDATE_SNAPSHOT_REMOVAL_POLICY = '@aws-cdk/core:validateSnapshotR */ export const CODEPIPELINE_CROSS_ACCOUNT_KEY_ALIAS_STACK_SAFE_RESOURCE_NAME = '@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName'; +/** + * Enable this feature flag to create an S3 bucket policy by default in cases where + * an AWS service would automatically create the Policy if one does not exist. + * + * For example, in order to send VPC flow logs to an S3 bucket, there is a specific Bucket Policy + * that needs to be attached to the bucket. If you create the bucket without a policy and then add the + * bucket as the flow log destination, the service will automatically create the bucket policy with the + * necessary permissions. If you were to then try and add your own bucket policy CloudFormation will throw + * and error indicating that a bucket policy already exists. + * + * In cases where we know what the required policy is we can go ahead and create the policy so we can + * remain in control of it. + * + * @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-logs-infrastructure-S3 + */ +export const S3_CREATE_DEFAULT_LOGGING_POLICY = '@aws-cdk/aws-s3:createDefaultLoggingPolicy'; + +/** +* Enable this feature flag to restrict the decryption of a SQS queue, which is subscribed to a SNS topic, to +* only the topic which it is subscribed to and not the whole SNS service of an account. +* +* Previously the decryption was only restricted to the SNS service principal. To make the SQS subscription more +* secure, it is a good practice to restrict the decryption further and only allow the connected SNS topic to decryption +* the subscribed queue. +* +*/ +export const SNS_SUBSCRIPTIONS_SQS_DECRYPTION_POLICY = '@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption'; + /** * Flag values that should apply for new projects * @@ -295,6 +330,8 @@ export const FUTURE_FLAGS: { [key: string]: boolean } = { [IAM_MINIMIZE_POLICIES]: true, [VALIDATE_SNAPSHOT_REMOVAL_POLICY]: true, [CODEPIPELINE_CROSS_ACCOUNT_KEY_ALIAS_STACK_SAFE_RESOURCE_NAME]: true, + [S3_CREATE_DEFAULT_LOGGING_POLICY]: true, + [SNS_SUBSCRIPTIONS_SQS_DECRYPTION_POLICY]: true, }; /** diff --git a/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts b/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts index ac139187c500a..5259a9d0ff85c 100644 --- a/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts +++ b/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts @@ -48,6 +48,13 @@ export class IntegTest { */ public readonly absoluteFileName: string; + /** + * The normalized name of the test. This name + * will be the same regardless of what directory the tool + * is run from. + */ + public readonly normalizedTestName: string; + /** * Directory the test is in */ @@ -91,6 +98,7 @@ export class IntegTest { : path.join(path.relative(this.info.discoveryRoot, parsed.dir), parsed.name); const nakedTestName = parsed.name.slice(6); // Leave name without 'integ.' and '.ts' + this.normalizedTestName = parsed.name; this.snapshotDir = path.join(this.directory, `${nakedTestName}.integ.snapshot`); this.temporaryOutputDir = path.join(this.directory, `${CDK_OUTDIR_PREFIX}.${nakedTestName}`); } diff --git a/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts b/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts index 052b944da95d4..58ba669ab4d70 100644 --- a/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts +++ b/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts @@ -204,7 +204,7 @@ export abstract class IntegRunner { } catch (e) { const testCases = LegacyIntegTestSuite.fromLegacy({ cdk: this.cdk, - testName: this.testName, + testName: this.test.normalizedTestName, integSourceFilePath: this.test.fileName, listOptions: { ...this.defaultArgs, diff --git a/packages/@aws-cdk/integ-runner/test/runner/snapshot-test-runner.test.ts b/packages/@aws-cdk/integ-runner/test/runner/snapshot-test-runner.test.ts index f51116d5272d7..f5247bc390889 100644 --- a/packages/@aws-cdk/integ-runner/test/runner/snapshot-test-runner.test.ts +++ b/packages/@aws-cdk/integ-runner/test/runner/snapshot-test-runner.test.ts @@ -175,7 +175,7 @@ describe('IntegTest runSnapshotTests', () => { // THEN expect(integTest.actualTests()).toEqual(expect.objectContaining({ - 'test-data/xxxxx.integ-test1': { + 'xxxxx.integ-test1': { diffAssets: false, stackUpdateWorkflow: true, stacks: ['stack1'], @@ -197,7 +197,7 @@ describe('IntegTest runSnapshotTests', () => { // THEN expect(integTest.actualTests()).toEqual(expect.objectContaining({ - 'test-data/xxxxx.integ-test2': { + 'xxxxx.integ-test2': { diffAssets: false, stackUpdateWorkflow: true, stacks: ['stackabc'], diff --git a/packages/@aws-cdk/integ-tests/README.md b/packages/@aws-cdk/integ-tests/README.md index 17e3419c286ca..b27610cbd531f 100644 --- a/packages/@aws-cdk/integ-tests/README.md +++ b/packages/@aws-cdk/integ-tests/README.md @@ -264,6 +264,34 @@ integ.assertions.awsApiCall('SQS', 'receiveMessage', { }); ``` +By default, the `AwsApiCall` construct will automatically add the correct IAM policies +to allow the Lambda function to make the API call. It does this based on the `service` +and `api` that is provided. In the above example the service is `SQS` and the api is +`receiveMessage` so it will create a policy with `Action: 'sqs:ReceiveMessage`. + +There are some cases where the permissions do not exactly match the service/api call, for +example the S3 `listObjectsV2` api. In these cases it is possible to add the correct policy +by accessing the `provider` object. + +```ts +declare const app: App; +declare const stack: Stack; +declare const integ: IntegTest; + +const apiCall = integ.assertions.awsApiCall('S3', 'listObjectsV2', { + Bucket: 'mybucket', +}); + +apiCall.provider.addToRolePolicy({ + Effect: 'Allow', + Action: ['s3:GetObject', 's3:ListBucket'], + Resource: ['*'], +}); +``` + +Note that addToRolePolicy() uses direct IAM JSON policy blobs, not a iam.PolicyStatement +object like you will see in the rest of the CDK. + ### EqualsAssertion This library currently provides the ability to assert that two values are equal diff --git a/packages/@aws-cdk/integ-tests/lib/assertions/providers/provider.ts b/packages/@aws-cdk/integ-tests/lib/assertions/providers/provider.ts index 1b4c64e963646..5a5e3378fa4fa 100644 --- a/packages/@aws-cdk/integ-tests/lib/assertions/providers/provider.ts +++ b/packages/@aws-cdk/integ-tests/lib/assertions/providers/provider.ts @@ -134,6 +134,24 @@ class SingletonFunction extends Construct { return new LambdaFunctionProvider(Stack.of(this), constructName); } + /** + * Add an IAM policy statement to the inline policy of the + * lambdas function's role + * + * **Please note**: this is a direct IAM JSON policy blob, *not* a `iam.PolicyStatement` + * object like you will see in the rest of the CDK. + * + * + * singleton.addToRolePolicy({ + * Effect: 'Allow', + * Action: 's3:GetObject', + * Resources: '*', + * }); + */ + public addToRolePolicy(statement: any): void { + this.policies.push(statement); + } + /** * Create a policy statement from a specific api call */ @@ -216,6 +234,26 @@ export class AssertionsProvider extends Construct { public addPolicyStatementFromSdkCall(service: string, api: string, resources?: string[]): void { this.handler.addPolicyStatementFromSdkCall(service, api, resources); } + + /** + * Add an IAM policy statement to the inline policy of the + * lambdas function's role + * + * **Please note**: this is a direct IAM JSON policy blob, *not* a `iam.PolicyStatement` + * object like you will see in the rest of the CDK. + * + * + * @example + * declare const provider: AssertionsProvider; + * provider.addToRolePolicy({ + * Effect: 'Allow', + * Action: 's3:GetObject', + * Resources: '*', + * }); + */ + public addToRolePolicy(statement: any): void { + this.handler.addToRolePolicy(statement); + } } function slugify(x: string): string { diff --git a/packages/@aws-cdk/integ-tests/lib/assertions/sdk.ts b/packages/@aws-cdk/integ-tests/lib/assertions/sdk.ts index a7322738fa8d9..97972e4c568ba 100644 --- a/packages/@aws-cdk/integ-tests/lib/assertions/sdk.ts +++ b/packages/@aws-cdk/integ-tests/lib/assertions/sdk.ts @@ -9,6 +9,20 @@ import { AssertionsProvider, SDK_RESOURCE_TYPE_PREFIX } from './providers'; * an API call using the AWS SDK */ export interface IAwsApiCall extends IConstruct { + /** + * access the AssertionsProvider. This can be used to add additional IAM policies + * the the provider role policy + * + * @example + * declare const apiCall: AwsApiCall; + * apiCall.provider.addToRolePolicy({ + * Effect: 'Allow', + * Action: ['s3:GetObject'], + * Resource: ['*'], + * }); + */ + readonly provider: AssertionsProvider; + /** * Returns the value of an attribute of the custom resource of an arbitrary * type. Attributes are returned from the custom resource provider through the @@ -110,7 +124,7 @@ export class AwsApiCall extends Construct implements IAwsApiCall { private flattenResponse: string = 'false'; private readonly name: string; - protected provider: AssertionsProvider; + public readonly provider: AssertionsProvider; constructor(scope: Construct, id: string, props: AwsApiCallProps) { super(scope, id); diff --git a/packages/@aws-cdk/integ-tests/rosetta/default.ts-fixture b/packages/@aws-cdk/integ-tests/rosetta/default.ts-fixture index 847ddd48128e2..7cf368abcf6db 100644 --- a/packages/@aws-cdk/integ-tests/rosetta/default.ts-fixture +++ b/packages/@aws-cdk/integ-tests/rosetta/default.ts-fixture @@ -11,6 +11,7 @@ import { AssertionType, LambdaInvokeFunction, Match, + AssertionsProvider, } from '@aws-cdk/integ-tests'; import { Construct } from 'constructs'; import { diff --git a/packages/@aws-cdk/integ-tests/test/assertions/sdk.test.ts b/packages/@aws-cdk/integ-tests/test/assertions/sdk.test.ts index d8d3d70ec1694..7be64290b1b01 100644 --- a/packages/@aws-cdk/integ-tests/test/assertions/sdk.test.ts +++ b/packages/@aws-cdk/integ-tests/test/assertions/sdk.test.ts @@ -44,6 +44,55 @@ describe('AwsApiCall', () => { param2: 2, }, }); + + }); + + test('add policy to provider', () => { + // GIVEN + const app = new App(); + const deplossert = new DeployAssert(app); + + // WHEN + const apiCall = deplossert.awsApiCall('MyService', 'MyApi', { + param1: 'val1', + param2: 2, + }); + apiCall.provider.addToRolePolicy({ + Effect: 'Allow', + Action: ['s3:GetObject'], + Resource: ['*'], + }); + + Template.fromStack(deplossert.scope).hasResourceProperties('AWS::IAM::Role', { + Policies: [ + { + PolicyName: 'Inline', + PolicyDocument: { + Version: '2012-10-17', + Statement: [ + { + Action: [ + 'myservice:MyApi', + ], + Effect: 'Allow', + Resource: [ + '*', + ], + }, + { + Action: [ + 's3:GetObject', + ], + Effect: 'Allow', + Resource: [ + '*', + ], + }, + ], + }, + }, + ], + }); }); describe('get attribute', () => { diff --git a/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt b/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt index 3f84df604a4a0..87616e7fb081b 100644 --- a/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt +++ b/packages/@aws-cdk/lambda-layer-awscli/layer/requirements.txt @@ -1 +1 @@ -awscli==1.25.22 +awscli==1.25.26 diff --git a/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline.ts b/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline.ts index a764d341243a7..3eaabf40c6641 100644 --- a/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline.ts +++ b/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline.ts @@ -4,7 +4,7 @@ import * as cp from '@aws-cdk/aws-codepipeline'; import * as cpa from '@aws-cdk/aws-codepipeline-actions'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; -import { Aws, CfnCapabilities, Duration, Fn, Lazy, PhysicalName, Stack } from '@aws-cdk/core'; +import { Aws, CfnCapabilities, Duration, PhysicalName, Stack } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import { Construct } from 'constructs'; import { AssetType, FileSet, IFileSetProducer, ManualApprovalStep, ShellStep, StackAsset, StackDeployment, Step } from '../blueprint'; @@ -12,6 +12,7 @@ import { DockerCredential, dockerCredentialsInstallCommands, DockerCredentialUsa import { GraphNodeCollection, isGraph, AGraphNode, PipelineGraph } from '../helpers-internal'; import { PipelineBase } from '../main'; import { AssetSingletonRole } from '../private/asset-singleton-role'; +import { CachedFnSub } from '../private/cached-fnsub'; import { preferredCliVersion } from '../private/cli-version'; import { appOf, assemblyBuilderOf, embeddedAsmPath, obtainScope } from '../private/construct-internals'; import { toPosixPath } from '../private/fs'; @@ -293,16 +294,12 @@ export class CodePipeline extends PipelineBase { private readonly selfMutation: boolean; private _myCxAsmRoot?: string; private readonly dockerCredentials: DockerCredential[]; + private readonly cachedFnSub = new CachedFnSub(); /** * Asset roles shared for publishing */ - private readonly assetCodeBuildRoles: Record = {}; - - /** - * Per asset type, the target role ARNs that need to be assumed - */ - private readonly assetPublishingRoles: Record> = {}; + private readonly assetCodeBuildRoles: Map = new Map(); /** * This is set to the very first artifact produced in the pipeline @@ -678,15 +675,13 @@ export class CodePipeline extends PipelineBase { throw new Error('All assets in a single publishing step must be of the same type'); } - const publishingRoles = this.assetPublishingRoles[assetType] = (this.assetPublishingRoles[assetType] ?? new Set()); - for (const asset of assets) { - if (asset.assetPublishingRoleArn) { - publishingRoles.add(asset.assetPublishingRoleArn); - } - } - const role = this.obtainAssetCodeBuildRole(assets[0].assetType); + for (const roleArn of assets.flatMap(a => a.assetPublishingRoleArn ? [a.assetPublishingRoleArn] : [])) { + // The ARNs include raw AWS pseudo parameters (e.g., ${AWS::Partition}), which need to be substituted. + role.addAssumeRole(this.cachedFnSub.fnSub(roleArn)); + }; + // The base commands that need to be run const script = new CodeBuildStep(node.id, { commands, @@ -824,9 +819,10 @@ export class CodePipeline extends PipelineBase { * Modeled after the CodePipeline role and 'CodePipelineActionRole' roles. * Generates one role per asset type to separate file and Docker/image-based permissions. */ - private obtainAssetCodeBuildRole(assetType: AssetType): iam.IRole { - if (this.assetCodeBuildRoles[assetType]) { - return this.assetCodeBuildRoles[assetType]; + private obtainAssetCodeBuildRole(assetType: AssetType): AssetSingletonRole { + const existing = this.assetCodeBuildRoles.get(assetType); + if (existing) { + return existing; } const stack = Stack.of(this); @@ -840,22 +836,15 @@ export class CodePipeline extends PipelineBase { ), }); - // Publishing role access - // The ARNs include raw AWS pseudo parameters (e.g., ${AWS::Partition}), which need to be substituted. - // Lazy-evaluated so all asset publishing roles are included. - assetRole.addToPolicy(new iam.PolicyStatement({ - actions: ['sts:AssumeRole'], - resources: Lazy.list({ produce: () => Array.from(this.assetPublishingRoles[assetType] ?? []).map(arn => Fn.sub(arn)) }), - })); - // Grant pull access for any ECR registries and secrets that exist if (assetType === AssetType.DOCKER_IMAGE) { this.dockerCredentials.forEach(reg => reg.grantRead(assetRole, DockerCredentialUsage.ASSET_PUBLISHING)); } - this.assetCodeBuildRoles[assetType] = assetRole; + this.assetCodeBuildRoles.set(assetType, assetRole); return assetRole; } + } function dockerUsageFromCodeBuild(cbt: CodeBuildProjectType): DockerCredentialUsage | undefined { diff --git a/packages/@aws-cdk/pipelines/lib/legacy/pipeline.ts b/packages/@aws-cdk/pipelines/lib/legacy/pipeline.ts index 974c8ce16ef1a..dd3ba4fadf7fb 100644 --- a/packages/@aws-cdk/pipelines/lib/legacy/pipeline.ts +++ b/packages/@aws-cdk/pipelines/lib/legacy/pipeline.ts @@ -3,12 +3,13 @@ import * as codebuild from '@aws-cdk/aws-codebuild'; import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; -import { Annotations, App, CfnOutput, Fn, Lazy, PhysicalName, Stack, Stage } from '@aws-cdk/core'; +import { Annotations, App, CfnOutput, PhysicalName, Stack, Stage } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { AssetType } from '../blueprint/asset-type'; import { dockerCredentialsInstallCommands, DockerCredential, DockerCredentialUsage } from '../docker-credentials'; import { ApplicationSecurityCheck } from '../private/application-security-check'; import { AssetSingletonRole } from '../private/asset-singleton-role'; +import { CachedFnSub } from '../private/cached-fnsub'; import { preferredCliVersion } from '../private/cli-version'; import { appOf, assemblyBuilderOf } from '../private/construct-internals'; import { DeployCdkStackAction, PublishAssetsAction, UpdatePipelineAction } from './actions'; @@ -488,10 +489,10 @@ class AssetPublishing extends Construct { private readonly MAX_PUBLISHERS_PER_STAGE = 50; private readonly publishers: Record = {}; - private readonly assetRoles: Record = {}; + private readonly assetRoles: Map = new Map(); private readonly assetAttachedPolicies: Record = {}; - private readonly assetPublishingRoles: Record> = {}; private readonly myCxAsmRoot: string; + private readonly cachedFnSub = new CachedFnSub(); private readonly lastStageBeforePublishing?: codepipeline.IStage; private readonly stages: codepipeline.IStage[] = []; @@ -533,11 +534,9 @@ class AssetPublishing extends Construct { } // Late-binding here (rather than in the constructor) to prevent creating the role in cases where no asset actions are created. - if (!this.assetRoles[command.assetType]) { - this.generateAssetRole(command.assetType); - } - this.assetPublishingRoles[command.assetType] = (this.assetPublishingRoles[command.assetType] ?? new Set()).add(command.assetPublishingRoleArn); - + const assetRole = this.generateAssetRole(command.assetType); + // The ARNs include raw AWS pseudo parameters (e.g., ${AWS::Partition}), which need to be substituted. + assetRole.addAssumeRole(this.cachedFnSub.fnSub(command.assetPublishingRoleArn)); const publisherKey = this.props.singlePublisherPerType ? command.assetType.toString() : command.assetId; let action = this.publishers[publisherKey]; @@ -579,7 +578,7 @@ class AssetPublishing extends Construct { cloudAssemblyInput: this.props.cloudAssemblyInput, cdkCliVersion: this.props.cdkCliVersion, assetType: command.assetType, - role: this.assetRoles[command.assetType], + role: this.assetRoles.get(command.assetType), dependable: this.assetAttachedPolicies[command.assetType], vpc: this.props.vpc, subnetSelection: this.props.subnetSelection, @@ -600,7 +599,10 @@ class AssetPublishing extends Construct { * Generates one role per asset type to separate file and Docker/image-based permissions. */ private generateAssetRole(assetType: AssetType) { - if (this.assetRoles[assetType]) { return this.assetRoles[assetType]; } + const existing = this.assetRoles.get(assetType); + if (existing) { + return existing; + } const rolePrefix = assetType === AssetType.DOCKER_IMAGE ? 'Docker' : 'File'; const assetRole = new AssetSingletonRole(this, `${rolePrefix}Role`, { @@ -608,21 +610,13 @@ class AssetPublishing extends Construct { assumedBy: new iam.CompositePrincipal(new iam.ServicePrincipal('codebuild.amazonaws.com'), new iam.AccountPrincipal(Stack.of(this).account)), }); - // Publishing role access - // The ARNs include raw AWS pseudo parameters (e.g., ${AWS::Partition}), which need to be substituted. - // Lazy-evaluated so all asset publishing roles are included. - assetRole.addToPolicy(new iam.PolicyStatement({ - actions: ['sts:AssumeRole'], - resources: Lazy.list({ produce: () => [...this.assetPublishingRoles[assetType]].map(arn => Fn.sub(arn)) }), - })); - // Grant pull access for any ECR registries and secrets that exist if (assetType === AssetType.DOCKER_IMAGE) { this.dockerCredentials.forEach(reg => reg.grantRead(assetRole, DockerCredentialUsage.ASSET_PUBLISHING)); } - this.assetRoles[assetType] = assetRole; - return this.assetRoles[assetType]; + this.assetRoles.set(assetType, assetRole); + return assetRole; } } diff --git a/packages/@aws-cdk/pipelines/lib/private/asset-singleton-role.ts b/packages/@aws-cdk/pipelines/lib/private/asset-singleton-role.ts index 3015387ab1a5f..d43dfba61613d 100644 --- a/packages/@aws-cdk/pipelines/lib/private/asset-singleton-role.ts +++ b/packages/@aws-cdk/pipelines/lib/private/asset-singleton-role.ts @@ -11,6 +11,7 @@ import { Construct, IDependable } from 'constructs'; */ export class AssetSingletonRole extends iam.Role { private _rejectDuplicates = false; + private _assumeRoleStatement: iam.PolicyStatement | undefined; constructor(scope: Construct, id: string, props: iam.RoleProps) { super(scope, id, props); @@ -82,4 +83,36 @@ export class AssetSingletonRole extends iam.Role { return super.addToPrincipalPolicy(statement); } + + /** + * Make sure the Role has sts:AssumeRole permissions to the given ARN + * + * Will add a new PolicyStatement to the Role if necessary, otherwise add resources to the existing + * PolicyStatement. + * + * Normally this would have been many `grantAssume()` calls (which would get deduplicated by the + * policy minimization logic), but we have to account for old pipelines that don't have policy + * minimization enabled. + */ + public addAssumeRole(roleArn: string) { + if (!this._assumeRoleStatement) { + this._assumeRoleStatement = new iam.PolicyStatement({ + actions: ['sts:AssumeRole'], + }); + + this.addToPrincipalPolicy(this._assumeRoleStatement); + } + + // Chunk into multiple statements to facilitate overflowing into overflow policies. + // Ideally we would do one ARN per statement and have policy minimization do its job, but that would make + // the situation A LOT worse if minimization is not enabled (which it isn't by default). So find a middle + // ground in pre-minimization chunking: reduce overhead while still allowing splitting. + const MAX_ARNS_PER_STATEMENT = 10; + + this._assumeRoleStatement.addResources(roleArn); + if (this._assumeRoleStatement.resources.length >= MAX_ARNS_PER_STATEMENT) { + // Next call to this function will create a new statement + this._assumeRoleStatement = undefined; + } + } } diff --git a/packages/@aws-cdk/pipelines/lib/private/cached-fnsub.ts b/packages/@aws-cdk/pipelines/lib/private/cached-fnsub.ts new file mode 100644 index 0000000000000..1a7e5595140b1 --- /dev/null +++ b/packages/@aws-cdk/pipelines/lib/private/cached-fnsub.ts @@ -0,0 +1,28 @@ +import { Fn } from '@aws-cdk/core'; + +/** + * Wrap a string in `Fn.sub`, but return the same `Fn.sub` value for the same string + * + * If we don't do this, every new `Fn.sub()` creates a new `IResolvable` instance + * which will stringify to a unique string value, and we can't dedupe the stringified + * values anymore. + * + * Potentially we could/should do deduplication in the token system itself, but + * we would have to be consistent about it and do it for all tokens, which has + * an unpredictable memory impact and I'm scared of making such a sweeping + * change. Hence, a local solution to a local problem. + */ +export class CachedFnSub { + private cache = new Map(); + + public fnSub(x: string) { + const existing = this.cache.get(x); + if (existing) { + return existing; + } + + const ret = Fn.sub(x); + this.cache.set(x, ret); + return ret; + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/test/compliance/assets.test.ts b/packages/@aws-cdk/pipelines/test/compliance/assets.test.ts index 2828d494c1c3b..20471b4c1828a 100644 --- a/packages/@aws-cdk/pipelines/test/compliance/assets.test.ts +++ b/packages/@aws-cdk/pipelines/test/compliance/assets.test.ts @@ -949,7 +949,7 @@ function expectedAssetRolePolicy(assumeRolePattern: string | string[], attachedR { Action: 'sts:AssumeRole', Effect: 'Allow', - Resource: assumeRolePattern.map(arn => { return { 'Fn::Sub': arn }; }), + Resource: unsingleton(assumeRolePattern.map(arn => { return { 'Fn::Sub': arn }; })), }, { Action: ['s3:GetObject*', 's3:GetBucket*', 's3:List*'], @@ -1063,4 +1063,11 @@ function synthesize(stack: Stack) { } return root.synth({ skipValidation: true }); +} + +function unsingleton(xs: A[]): A | A[] { + if (xs.length === 1) { + return xs[0]; + } + return xs; } \ No newline at end of file diff --git a/packages/@aws-cdk/triggers/lib/trigger.ts b/packages/@aws-cdk/triggers/lib/trigger.ts index 385d08f62377a..5bf25f87e61a8 100644 --- a/packages/@aws-cdk/triggers/lib/trigger.ts +++ b/packages/@aws-cdk/triggers/lib/trigger.ts @@ -86,7 +86,7 @@ export class Trigger extends Construct implements ITrigger { { Effect: 'Allow', Action: ['lambda:InvokeFunction'], - Resource: [handlerArn], + Resource: [`${props.handler.functionArn}:*`], }, ], }); diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.assets.json b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.assets.json index 5f51bd6977d89..1f101a7a08ced 100644 --- a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.assets.json +++ b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.assets.json @@ -1,20 +1,20 @@ { "version": "20.0.0", "files": { - "6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2": { + "f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a": { "source": { - "path": "asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2", + "path": "asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2.zip", + "objectKey": "f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "6bb39f8bdf6e500ea85c95a13e1f30987a51708e29cb763a3a5c88e37ce9b690": { + "7701977a8021a9eaa249c838112381b8da272518c33b9ff336e889c3ce55be79": { "source": { "path": "MyStack.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6bb39f8bdf6e500ea85c95a13e1f30987a51708e29cb763a3a5c88e37ce9b690.json", + "objectKey": "7701977a8021a9eaa249c838112381b8da272518c33b9ff336e889c3ce55be79.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.template.json b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.template.json index 2d02ece71874a..2f19b0d0d8267 100644 --- a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.template.json +++ b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/MyStack.template.json @@ -119,7 +119,18 @@ ], "Resource": [ { - "Ref": "MyFunctionCurrentVersion197490AF2cb2bc11080c1ef11d3b49c1f1603957" + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyFunction3BAA72D1", + "Arn" + ] + }, + ":*" + ] + ] } ] } @@ -134,7 +145,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2S3Bucket2EB34879" + "Ref": "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aS3Bucket93FB8681" }, "S3Key": { "Fn::Join": [ @@ -147,7 +158,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2S3VersionKey03A4DC8B" + "Ref": "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aS3VersionKey64A4A72E" } ] } @@ -160,7 +171,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2S3VersionKey03A4DC8B" + "Ref": "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aS3VersionKey64A4A72E" } ] } @@ -187,17 +198,17 @@ } }, "Parameters": { - "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2S3Bucket2EB34879": { + "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aS3Bucket93FB8681": { "Type": "String", - "Description": "S3 bucket for asset \"6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2\"" + "Description": "S3 bucket for asset \"f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a\"" }, - "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2S3VersionKey03A4DC8B": { + "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aS3VersionKey64A4A72E": { "Type": "String", - "Description": "S3 key for asset version \"6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2\"" + "Description": "S3 key for asset version \"f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a\"" }, - "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2ArtifactHash29DBC1FA": { + "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aArtifactHashE7245343": { "Type": "String", - "Description": "Artifact hash for asset \"6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2\"" + "Description": "Artifact hash for asset \"f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/__entrypoint__.js b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/__entrypoint__.js deleted file mode 100644 index 3475719002c73..0000000000000 --- a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/__entrypoint__.js +++ /dev/null @@ -1,119 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = exports.external = void 0; -const https = require("https"); -const url = require("url"); -// for unit tests -exports.external = { - sendHttpRequest: defaultSendHttpRequest, - log: defaultLog, - includeStackTraces: true, - userHandlerIndex: './index', -}; -const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; -const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; -async function handler(event, context) { - exports.external.log(JSON.stringify(event, undefined, 2)); - // ignore DELETE event when the physical resource ID is the marker that - // indicates that this DELETE is a subsequent DELETE to a failed CREATE - // operation. - if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { - exports.external.log('ignoring DELETE event caused by a failed CREATE event'); - await submitResponse('SUCCESS', event); - return; - } - try { - // invoke the user handler. this is intentionally inside the try-catch to - // ensure that if there is an error it's reported as a failure to - // cloudformation (otherwise cfn waits). - // eslint-disable-next-line @typescript-eslint/no-require-imports - const userHandler = require(exports.external.userHandlerIndex).handler; - const result = await userHandler(event, context); - // validate user response and create the combined event - const responseEvent = renderResponse(event, result); - // submit to cfn as success - await submitResponse('SUCCESS', responseEvent); - } - catch (e) { - const resp = { - ...event, - Reason: exports.external.includeStackTraces ? e.stack : e.message, - }; - if (!resp.PhysicalResourceId) { - // special case: if CREATE fails, which usually implies, we usually don't - // have a physical resource id. in this case, the subsequent DELETE - // operation does not have any meaning, and will likely fail as well. to - // address this, we use a marker so the provider framework can simply - // ignore the subsequent DELETE. - if (event.RequestType === 'Create') { - exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); - resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; - } - else { - // otherwise, if PhysicalResourceId is not specified, something is - // terribly wrong because all other events should have an ID. - exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); - } - } - // this is an actual error, fail the activity altogether and exist. - await submitResponse('FAILED', resp); - } -} -exports.handler = handler; -function renderResponse(cfnRequest, handlerResponse = {}) { - var _a, _b; - // if physical ID is not returned, we have some defaults for you based - // on the request type. - const physicalResourceId = (_b = (_a = handlerResponse.PhysicalResourceId) !== null && _a !== void 0 ? _a : cfnRequest.PhysicalResourceId) !== null && _b !== void 0 ? _b : cfnRequest.RequestId; - // if we are in DELETE and physical ID was changed, it's an error. - if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { - throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); - } - // merge request event and result event (result prevails). - return { - ...cfnRequest, - ...handlerResponse, - PhysicalResourceId: physicalResourceId, - }; -} -async function submitResponse(status, event) { - var _a; - const json = { - Status: status, - Reason: (_a = event.Reason) !== null && _a !== void 0 ? _a : status, - StackId: event.StackId, - RequestId: event.RequestId, - PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, - LogicalResourceId: event.LogicalResourceId, - NoEcho: event.NoEcho, - Data: event.Data, - }; - exports.external.log('submit response to cloudformation', json); - const responseBody = JSON.stringify(json); - const parsedUrl = url.parse(event.ResponseURL); - const req = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { 'content-type': '', 'content-length': responseBody.length }, - }; - await exports.external.sendHttpRequest(req, responseBody); -} -async function defaultSendHttpRequest(options, responseBody) { - return new Promise((resolve, reject) => { - try { - const request = https.request(options, _ => resolve()); - request.on('error', reject); - request.write(responseBody); - request.end(); - } - catch (e) { - reject(e); - } - }); -} -function defaultLog(fmt, ...params) { - // eslint-disable-next-line no-console - console.log(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gY2F0Y2ggKGUpIHtcbiAgICAgIHJlamVjdChlKTtcbiAgICB9XG4gIH0pO1xufVxuXG5mdW5jdGlvbiBkZWZhdWx0TG9nKGZtdDogc3RyaW5nLCAuLi5wYXJhbXM6IGFueVtdKSB7XG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1jb25zb2xlXG4gIGNvbnNvbGUubG9nKGZtdCwgLi4ucGFyYW1zKTtcbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/__entrypoint__.js b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/__entrypoint__.js new file mode 100644 index 0000000000000..9df94382cc74e --- /dev/null +++ b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/__entrypoint__.js @@ -0,0 +1,118 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = exports.external = void 0; +const https = require("https"); +const url = require("url"); +// for unit tests +exports.external = { + sendHttpRequest: defaultSendHttpRequest, + log: defaultLog, + includeStackTraces: true, + userHandlerIndex: './index', +}; +const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; +const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; +async function handler(event, context) { + const sanitizedEvent = { ...event, ResponseURL: '...' }; + exports.external.log(JSON.stringify(sanitizedEvent, undefined, 2)); + // ignore DELETE event when the physical resource ID is the marker that + // indicates that this DELETE is a subsequent DELETE to a failed CREATE + // operation. + if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { + exports.external.log('ignoring DELETE event caused by a failed CREATE event'); + await submitResponse('SUCCESS', event); + return; + } + try { + // invoke the user handler. this is intentionally inside the try-catch to + // ensure that if there is an error it's reported as a failure to + // cloudformation (otherwise cfn waits). + // eslint-disable-next-line @typescript-eslint/no-require-imports + const userHandler = require(exports.external.userHandlerIndex).handler; + const result = await userHandler(sanitizedEvent, context); + // validate user response and create the combined event + const responseEvent = renderResponse(event, result); + // submit to cfn as success + await submitResponse('SUCCESS', responseEvent); + } + catch (e) { + const resp = { + ...event, + Reason: exports.external.includeStackTraces ? e.stack : e.message, + }; + if (!resp.PhysicalResourceId) { + // special case: if CREATE fails, which usually implies, we usually don't + // have a physical resource id. in this case, the subsequent DELETE + // operation does not have any meaning, and will likely fail as well. to + // address this, we use a marker so the provider framework can simply + // ignore the subsequent DELETE. + if (event.RequestType === 'Create') { + exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); + resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; + } + else { + // otherwise, if PhysicalResourceId is not specified, something is + // terribly wrong because all other events should have an ID. + exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); + } + } + // this is an actual error, fail the activity altogether and exist. + await submitResponse('FAILED', resp); + } +} +exports.handler = handler; +function renderResponse(cfnRequest, handlerResponse = {}) { + // if physical ID is not returned, we have some defaults for you based + // on the request type. + const physicalResourceId = handlerResponse.PhysicalResourceId ?? cfnRequest.PhysicalResourceId ?? cfnRequest.RequestId; + // if we are in DELETE and physical ID was changed, it's an error. + if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); + } + // merge request event and result event (result prevails). + return { + ...cfnRequest, + ...handlerResponse, + PhysicalResourceId: physicalResourceId, + }; +} +async function submitResponse(status, event) { + const json = { + Status: status, + Reason: event.Reason ?? status, + StackId: event.StackId, + RequestId: event.RequestId, + PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, + LogicalResourceId: event.LogicalResourceId, + NoEcho: event.NoEcho, + Data: event.Data, + }; + exports.external.log('submit response to cloudformation', json); + const responseBody = JSON.stringify(json); + const parsedUrl = url.parse(event.ResponseURL); + const req = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { 'content-type': '', 'content-length': responseBody.length }, + }; + await exports.external.sendHttpRequest(req, responseBody); +} +async function defaultSendHttpRequest(options, responseBody) { + return new Promise((resolve, reject) => { + try { + const request = https.request(options, _ => resolve()); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); +} +function defaultLog(fmt, ...params) { + // eslint-disable-next-line no-console + console.log(fmt, ...params); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBRTNCLGlCQUFpQjtBQUNKLFFBQUEsUUFBUSxHQUFHO0lBQ3RCLGVBQWUsRUFBRSxzQkFBc0I7SUFDdkMsR0FBRyxFQUFFLFVBQVU7SUFDZixrQkFBa0IsRUFBRSxJQUFJO0lBQ3hCLGdCQUFnQixFQUFFLFNBQVM7Q0FDNUIsQ0FBQztBQUVGLE1BQU0sZ0NBQWdDLEdBQUcsd0RBQXdELENBQUM7QUFDbEcsTUFBTSwwQkFBMEIsR0FBRyw4REFBOEQsQ0FBQztBQVczRixLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtELEVBQUUsT0FBMEI7SUFDMUcsTUFBTSxjQUFjLEdBQUcsRUFBRSxHQUFHLEtBQUssRUFBRSxXQUFXLEVBQUUsS0FBSyxF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QnLFxuICAgIGhlYWRlcnM6IHsgJ2NvbnRlbnQtdHlwZSc6ICcnLCAnY29udGVudC1sZW5ndGgnOiByZXNwb25zZUJvZHkubGVuZ3RoIH0sXG4gIH07XG5cbiAgYXdhaXQgZXh0ZXJuYWwuc2VuZEh0dHBSZXF1ZXN0KHJlcSwgcmVzcG9uc2VCb2R5KTtcbn1cblxuYXN5bmMgZnVuY3Rpb24gZGVmYXVsdFNlbmRIdHRwUmVxdWVzdChvcHRpb25zOiBodHRwcy5SZXF1ZXN0T3B0aW9ucywgcmVzcG9uc2VCb2R5OiBzdHJpbmcpOiBQcm9taXNlPHZvaWQ+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICB0cnkge1xuICAgICAgY29uc3QgcmVxdWVzdCA9IGh0dHBzLnJlcXVlc3Qob3B0aW9ucywgXyA9PiByZXNvbHZlKCkpO1xuICAgICAgcmVxdWVzdC5vbignZXJyb3InLCByZWplY3QpO1xuICAgICAgcmVxdWVzdC53cml0ZShyZXNwb25zZUJvZHkpO1xuICAgICAgcmVxdWVzdC5lbmQoKTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZWplY3QoZSk7XG4gICAgfVxuICB9KTtcbn1cblxuZnVuY3Rpb24gZGVmYXVsdExvZyhmbXQ6IHN0cmluZywgLi4ucGFyYW1zOiBhbnlbXSkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tY29uc29sZVxuICBjb25zb2xlLmxvZyhmbXQsIC4uLnBhcmFtcyk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/index.d.ts b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/index.d.ts similarity index 100% rename from packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/index.d.ts rename to packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/index.d.ts diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/index.js b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/index.js similarity index 61% rename from packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/index.js rename to packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/index.js index 6ddf10aef5a24..6f60bacbe494e 100644 --- a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/index.js +++ b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/index.js @@ -13,7 +13,7 @@ exports.invoke = async (functionName) => { return invokeResponse; }; async function handler(event) { - console.log({ event }); + console.log({ ...event, ResponseURL: '...' }); if (event.RequestType === 'Delete') { console.log('not calling trigger on DELETE'); return; @@ -51,4 +51,4 @@ function parseError(payload) { return payload; } } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsK0JBQStCOzs7QUFFL0IsNkRBQTZEO0FBQzdELCtCQUErQjtB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9yKGludm9rZVJlc3BvbnNlLlBheWxvYWQ/LnRvU3RyaW5nKCkpKTtcbiAgfVxufTtcblxuLyoqXG4gKiBQYXJzZSB0aGUgZXJyb3IgbWVzc2FnZSBmcm9tIHRoZSBsYW1iZGEgZnVuY3Rpb24uXG4gKi9cbmZ1bmN0aW9uIHBhcnNlRXJyb3IocGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkKTogc3RyaW5nIHtcbiAgY29uc29sZS5sb2coYEVycm9yIHBheWxvYWQ6ICR7cGF5bG9hZH1gKTtcbiAgaWYgKCFwYXlsb2FkKSB7IHJldHVybiAndW5rbm93biBoYW5kbGVyIGVycm9yJzsgfVxuICB0cnkge1xuICAgIGNvbnN0IGVycm9yID0gSlNPTi5wYXJzZShwYXlsb2FkKTtcbiAgICBjb25zdCBjb25jYXQgPSBbZXJyb3IuZXJyb3JNZXNzYWdlLCBlcnJvci50cmFjZV0uZmlsdGVyKHggPT4geCkuam9pbignXFxuJyk7XG4gICAgcmV0dXJuIGNvbmNhdC5sZW5ndGggPiAwID8gY29uY2F0IDogcGF5bG9hZDtcbiAgfSBjYXRjaCAoZSkge1xuICAgIC8vIGZhbGwgYmFjayB0byBqdXN0IHJldHVybmluZyB0aGUgcGF5bG9hZFxuICAgIHJldHVybiBwYXlsb2FkO1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/index.ts b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/index.ts similarity index 97% rename from packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/index.ts rename to packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/index.ts index 7975ac5b56bc0..633b33ada2ad5 100644 --- a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/index.ts +++ b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/index.ts @@ -15,7 +15,7 @@ export const invoke: InvokeFunction = async functionName => { }; export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent) { - console.log({ event }); + console.log({ ...event, ResponseURL: '...' }); if (event.RequestType === 'Delete') { console.log('not calling trigger on DELETE'); diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/manifest.json b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/manifest.json index c94fa039a1f46..3b0c78ddac94e 100644 --- a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/manifest.json @@ -19,13 +19,13 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2", - "id": "6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2", + "path": "asset.f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a", + "id": "f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a", "packaging": "zip", - "sourceHash": "6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2", - "s3BucketParameter": "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2S3Bucket2EB34879", - "s3KeyParameter": "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2S3VersionKey03A4DC8B", - "artifactHashParameter": "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2ArtifactHash29DBC1FA" + "sourceHash": "f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a", + "s3BucketParameter": "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aS3Bucket93FB8681", + "s3KeyParameter": "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aS3VersionKey64A4A72E", + "artifactHashParameter": "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aArtifactHashE7245343" } } ], @@ -77,31 +77,22 @@ "data": "AWSCDKTriggerCustomResourceProviderCustomResourceProviderHandler97BECD91" } ], - "/MyStack/AssetParameters/6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/S3Bucket": [ + "/MyStack/AssetParameters/f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2S3Bucket2EB34879" + "data": "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aS3Bucket93FB8681" } ], - "/MyStack/AssetParameters/6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/S3VersionKey": [ + "/MyStack/AssetParameters/f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2S3VersionKey03A4DC8B" + "data": "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aS3VersionKey64A4A72E" } ], - "/MyStack/AssetParameters/6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/ArtifactHash": [ + "/MyStack/AssetParameters/f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2ArtifactHash29DBC1FA" - } - ], - "MyFunctionCurrentVersion197490AFd41a8aa4109c7b22dd39d6bef408da46": [ - { - "type": "aws:cdk:logicalId", - "data": "MyFunctionCurrentVersion197490AFd41a8aa4109c7b22dd39d6bef408da46", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "AssetParametersf942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68aArtifactHashE7245343" } ] }, diff --git a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/tree.json b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/tree.json index 8b99c6f72ae90..3b3e12a86841b 100644 --- a/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/tree.json +++ b/packages/@aws-cdk/triggers/test/triggers.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "MyStack": { @@ -235,13 +235,13 @@ "id": "AssetParameters", "path": "MyStack/AssetParameters", "children": { - "6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2": { - "id": "6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2", - "path": "MyStack/AssetParameters/6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2", + "f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a": { + "id": "f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a", + "path": "MyStack/AssetParameters/f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "MyStack/AssetParameters/6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/S3Bucket", + "path": "MyStack/AssetParameters/f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/S3Bucket", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -249,7 +249,7 @@ }, "S3VersionKey": { "id": "S3VersionKey", - "path": "MyStack/AssetParameters/6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/S3VersionKey", + "path": "MyStack/AssetParameters/f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/S3VersionKey", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -257,7 +257,7 @@ }, "ArtifactHash": { "id": "ArtifactHash", - "path": "MyStack/AssetParameters/6b78a08a66c707ed36509dde1cebf8e7d5244a3b039122c2c00a5137efb845e2/ArtifactHash", + "path": "MyStack/AssetParameters/f942cf8dea09e8b74bc8da73a643a8b2639fe7f93c6eb60e338c56224decd68a/ArtifactHash", "constructInfo": { "fqn": "@aws-cdk/core.CfnParameter", "version": "0.0.0" @@ -266,13 +266,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } } }, diff --git a/packages/aws-cdk-lib/README.md b/packages/aws-cdk-lib/README.md index a620a2aecc4ad..a8e26848a6112 100644 --- a/packages/aws-cdk-lib/README.md +++ b/packages/aws-cdk-lib/README.md @@ -1026,6 +1026,16 @@ const stack = new Stack(app, 'StackName', { By default, termination protection is disabled. +### Description + +You can add a description of the stack in the same way as `StackProps`. + +```ts +const stack = new Stack(app, 'StackName', { + description: 'This is a description.', +}); +``` + ### CfnJson `CfnJson` allows you to postpone the resolution of a JSON blob from diff --git a/packages/aws-cdk/README.md b/packages/aws-cdk/README.md index 1a43ed4073371..4fe06d1878abf 100644 --- a/packages/aws-cdk/README.md +++ b/packages/aws-cdk/README.md @@ -455,8 +455,9 @@ locally to your terminal. To disable this feature you can pass the `--no-logs` o $ cdk watch --no-logs ``` -**Note**: This command is considered experimental, -and might have breaking changes in the future. +**Note**: This command is considered experimental, and might have breaking changes in the future. +The same limitations apply to to `watch` deployments as do to `--hotswap` deployments. See the +*Hotswap deployments for faster development* section for more information. ### `cdk import` @@ -517,10 +518,10 @@ $ cdk destroy --app='node bin/main.js' MyStackName ### `cdk bootstrap` -Deploys a `CDKToolkit` CloudFormation stack into the specified environment(s), that provides an S3 bucket -and ECR reposity that `cdk deploy` will use to store synthesized templates and the related assets, before -triggering a CloudFormation stack update. The name of the deployed stack can be configured using the -`--toolkit-stack-name` argument. The S3 Bucket Public Access Block Configuration can be configured using +Deploys a `CDKToolkit` CloudFormation stack into the specified environment(s), that provides an S3 bucket +and ECR reposity that `cdk deploy` will use to store synthesized templates and the related assets, before +triggering a CloudFormation stack update. The name of the deployed stack can be configured using the +`--toolkit-stack-name` argument. The S3 Bucket Public Access Block Configuration can be configured using the `--public-access-block-configuration` argument. ECR uses immutable tags for images. ```console diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts index 4533125708409..c037a24ba9d33 100644 --- a/packages/aws-cdk/lib/cli.ts +++ b/packages/aws-cdk/lib/cli.ts @@ -227,7 +227,7 @@ async function parseCommandLineArguments() { .option('template', { type: 'string', desc: 'The path to the CloudFormation template to compare with', requiresArg: true }) .option('strict', { type: 'boolean', desc: 'Do not filter out AWS::CDK::Metadata resources', default: false }) .option('security-only', { type: 'boolean', desc: 'Only diff for broadened security changes', default: false }) - .option('fail', { type: 'boolean', desc: 'Fail with exit code 1 in case of diff', default: false })) + .option('fail', { type: 'boolean', desc: 'Fail with exit code 1 in case of diff' })) .command('metadata [STACK]', 'Returns all metadata associated with this stack') .command(['acknowledge [ID]', 'ack [ID]'], 'Acknowledge a notice so that it does not show up anymore') .command('notices', 'Returns a list of relevant notices') @@ -416,7 +416,7 @@ async function initCommandLine() { strict: args.strict, contextLines: args.contextLines, securityOnly: args.securityOnly, - fail: args.fail || !enableDiffNoFail, + fail: args.fail != null ? args.fail : !enableDiffNoFail, stream: args.ci ? process.stdout : undefined, }); diff --git a/packages/aws-cdk/lib/init-templates/v1/app/csharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/app/csharp/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/csharp/.template.gitignore rename to packages/aws-cdk/lib/init-templates/app/csharp/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/app/csharp/README.md b/packages/aws-cdk/lib/init-templates/app/csharp/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/csharp/README.md rename to packages/aws-cdk/lib/init-templates/app/csharp/README.md diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/app/csharp/add-project.hook.ts similarity index 95% rename from packages/aws-cdk/lib/init-templates/v2/app/csharp/add-project.hook.ts rename to packages/aws-cdk/lib/init-templates/app/csharp/add-project.hook.ts index 37b1fe6ad3e5f..c839c1e01db08 100644 --- a/packages/aws-cdk/lib/init-templates/v2/app/csharp/add-project.hook.ts +++ b/packages/aws-cdk/lib/init-templates/app/csharp/add-project.hook.ts @@ -1,6 +1,6 @@ import * as child_process from 'child_process'; import * as path from 'path'; -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (targetDirectory: string) => { const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); diff --git a/packages/aws-cdk/lib/init-templates/v1/app/csharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/app/csharp/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/csharp/cdk.template.json rename to packages/aws-cdk/lib/init-templates/app/csharp/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%.template.sln similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%.template.sln rename to packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%.template.sln diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj b/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj rename to packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs rename to packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs diff --git a/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs b/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs rename to packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/Program.template.cs rename to packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs diff --git a/packages/aws-cdk/lib/init-templates/v1/app/fsharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/app/fsharp/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/fsharp/.template.gitignore rename to packages/aws-cdk/lib/init-templates/app/fsharp/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/app/fsharp/README.md b/packages/aws-cdk/lib/init-templates/app/fsharp/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/fsharp/README.md rename to packages/aws-cdk/lib/init-templates/app/fsharp/README.md diff --git a/packages/aws-cdk/lib/init-templates/v1/app/fsharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/app/fsharp/add-project.hook.ts similarity index 95% rename from packages/aws-cdk/lib/init-templates/v1/app/fsharp/add-project.hook.ts rename to packages/aws-cdk/lib/init-templates/app/fsharp/add-project.hook.ts index b9b091fa35ff1..efeed98d57ee2 100644 --- a/packages/aws-cdk/lib/init-templates/v1/app/fsharp/add-project.hook.ts +++ b/packages/aws-cdk/lib/init-templates/app/fsharp/add-project.hook.ts @@ -1,6 +1,6 @@ import * as child_process from 'child_process'; import * as path from 'path'; -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (targetDirectory: string) => { const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); diff --git a/packages/aws-cdk/lib/init-templates/v1/app/fsharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/app/fsharp/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/fsharp/cdk.template.json rename to packages/aws-cdk/lib/init-templates/app/fsharp/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%.template.sln similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%.template.sln rename to packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%.template.sln diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj b/packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj rename to packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj diff --git a/packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs b/packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs rename to packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs diff --git a/packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/Program.template.fs b/packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/Program.template.fs similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/Program.template.fs rename to packages/aws-cdk/lib/init-templates/app/fsharp/src/%name.PascalCased%/Program.template.fs diff --git a/packages/aws-cdk/lib/init-templates/v2/app/go/%name%.template.go b/packages/aws-cdk/lib/init-templates/app/go/%name%.template.go similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/go/%name%.template.go rename to packages/aws-cdk/lib/init-templates/app/go/%name%.template.go diff --git a/packages/aws-cdk/lib/init-templates/v2/app/go/%name%_test.template.go b/packages/aws-cdk/lib/init-templates/app/go/%name%_test.template.go similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/go/%name%_test.template.go rename to packages/aws-cdk/lib/init-templates/app/go/%name%_test.template.go diff --git a/packages/aws-cdk/lib/init-templates/v1/app/go/.template.gitignore b/packages/aws-cdk/lib/init-templates/app/go/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/go/.template.gitignore rename to packages/aws-cdk/lib/init-templates/app/go/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/app/go/README.md b/packages/aws-cdk/lib/init-templates/app/go/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/go/README.md rename to packages/aws-cdk/lib/init-templates/app/go/README.md diff --git a/packages/aws-cdk/lib/init-templates/v1/app/go/cdk.template.json b/packages/aws-cdk/lib/init-templates/app/go/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/go/cdk.template.json rename to packages/aws-cdk/lib/init-templates/app/go/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v2/app/go/go.template.mod b/packages/aws-cdk/lib/init-templates/app/go/go.template.mod similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/go/go.template.mod rename to packages/aws-cdk/lib/init-templates/app/go/go.template.mod diff --git a/packages/aws-cdk/lib/init-templates/v1/app/info.json b/packages/aws-cdk/lib/init-templates/app/info.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/info.json rename to packages/aws-cdk/lib/init-templates/app/info.json diff --git a/packages/aws-cdk/lib/init-templates/v1/app/java/.template.gitignore b/packages/aws-cdk/lib/init-templates/app/java/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/java/.template.gitignore rename to packages/aws-cdk/lib/init-templates/app/java/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/app/java/README.md b/packages/aws-cdk/lib/init-templates/app/java/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/java/README.md rename to packages/aws-cdk/lib/init-templates/app/java/README.md diff --git a/packages/aws-cdk/lib/init-templates/v1/app/java/cdk.json b/packages/aws-cdk/lib/init-templates/app/java/cdk.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/java/cdk.json rename to packages/aws-cdk/lib/init-templates/app/java/cdk.json diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/pom.xml b/packages/aws-cdk/lib/init-templates/app/java/pom.xml similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/java/pom.xml rename to packages/aws-cdk/lib/init-templates/app/java/pom.xml diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java b/packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java rename to packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java b/packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java rename to packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java b/packages/aws-cdk/lib/init-templates/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java rename to packages/aws-cdk/lib/init-templates/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/app/java/sub-placeholders.hook.ts similarity index 82% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/java/sub-placeholders.hook.ts rename to packages/aws-cdk/lib/init-templates/app/java/sub-placeholders.hook.ts index 98c27ef042b9c..a33a366d99eff 100644 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/sub-placeholders.hook.ts +++ b/packages/aws-cdk/lib/init-templates/app/java/sub-placeholders.hook.ts @@ -1,4 +1,4 @@ -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (_, context) => { // File cannot be named like regular template because it needs to be diff --git a/packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/app/javascript/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.gitignore rename to packages/aws-cdk/lib/init-templates/app/javascript/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.npmignore b/packages/aws-cdk/lib/init-templates/app/javascript/.template.npmignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/javascript/.template.npmignore rename to packages/aws-cdk/lib/init-templates/app/javascript/.template.npmignore diff --git a/packages/aws-cdk/lib/init-templates/v1/app/javascript/README.md b/packages/aws-cdk/lib/init-templates/app/javascript/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/javascript/README.md rename to packages/aws-cdk/lib/init-templates/app/javascript/README.md diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/bin/%name%.template.js b/packages/aws-cdk/lib/init-templates/app/javascript/bin/%name%.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/javascript/bin/%name%.template.js rename to packages/aws-cdk/lib/init-templates/app/javascript/bin/%name%.template.js diff --git a/packages/aws-cdk/lib/init-templates/v1/app/javascript/cdk.template.json b/packages/aws-cdk/lib/init-templates/app/javascript/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/javascript/cdk.template.json rename to packages/aws-cdk/lib/init-templates/app/javascript/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/jest.config.js b/packages/aws-cdk/lib/init-templates/app/javascript/jest.config.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/jest.config.js rename to packages/aws-cdk/lib/init-templates/app/javascript/jest.config.js diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/lib/%name%-stack.template.js b/packages/aws-cdk/lib/init-templates/app/javascript/lib/%name%-stack.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/javascript/lib/%name%-stack.template.js rename to packages/aws-cdk/lib/init-templates/app/javascript/lib/%name%-stack.template.js diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/package.json b/packages/aws-cdk/lib/init-templates/app/javascript/package.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/javascript/package.json rename to packages/aws-cdk/lib/init-templates/app/javascript/package.json diff --git a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/app/javascript/sub-placeholders.hook.ts similarity index 83% rename from packages/aws-cdk/lib/init-templates/v1/lib/typescript/sub-placeholders.hook.ts rename to packages/aws-cdk/lib/init-templates/app/javascript/sub-placeholders.hook.ts index 039bb00d6f43f..a23cf905e5564 100644 --- a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/sub-placeholders.hook.ts +++ b/packages/aws-cdk/lib/init-templates/app/javascript/sub-placeholders.hook.ts @@ -1,4 +1,4 @@ -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (_, context) => { // File cannot be named like regular template because it needs to be diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/test/%name%.test.template.js b/packages/aws-cdk/lib/init-templates/app/javascript/test/%name%.test.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/javascript/test/%name%.test.template.js rename to packages/aws-cdk/lib/init-templates/app/javascript/test/%name%.test.template.js diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py rename to packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/%name.PythonModule%/__init__.py b/packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/__init__.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/python/%name.PythonModule%/__init__.py rename to packages/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/__init__.py diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/.template.gitignore b/packages/aws-cdk/lib/init-templates/app/python/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/python/.template.gitignore rename to packages/aws-cdk/lib/init-templates/app/python/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/README.template.md b/packages/aws-cdk/lib/init-templates/app/python/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/python/README.template.md rename to packages/aws-cdk/lib/init-templates/app/python/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/app.template.py b/packages/aws-cdk/lib/init-templates/app/python/app.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/python/app.template.py rename to packages/aws-cdk/lib/init-templates/app/python/app.template.py diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/cdk.template.json b/packages/aws-cdk/lib/init-templates/app/python/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/python/cdk.template.json rename to packages/aws-cdk/lib/init-templates/app/python/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/requirements-dev.txt b/packages/aws-cdk/lib/init-templates/app/python/requirements-dev.txt similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/python/requirements-dev.txt rename to packages/aws-cdk/lib/init-templates/app/python/requirements-dev.txt diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/requirements.txt b/packages/aws-cdk/lib/init-templates/app/python/requirements.txt similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/python/requirements.txt rename to packages/aws-cdk/lib/init-templates/app/python/requirements.txt diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/source.bat b/packages/aws-cdk/lib/init-templates/app/python/source.bat similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/python/source.bat rename to packages/aws-cdk/lib/init-templates/app/python/source.bat diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/app/python/sub-placeholders.hook.ts similarity index 83% rename from packages/aws-cdk/lib/init-templates/v1/app/python/sub-placeholders.hook.ts rename to packages/aws-cdk/lib/init-templates/app/python/sub-placeholders.hook.ts index 67bf2a9c6e8f4..da4718522f3b9 100644 --- a/packages/aws-cdk/lib/init-templates/v1/app/python/sub-placeholders.hook.ts +++ b/packages/aws-cdk/lib/init-templates/app/python/sub-placeholders.hook.ts @@ -1,4 +1,4 @@ -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (_, context) => { // File cannot be named like regular template because it needs to be diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/tests/__init__.py b/packages/aws-cdk/lib/init-templates/app/python/tests/__init__.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/python/tests/__init__.py rename to packages/aws-cdk/lib/init-templates/app/python/tests/__init__.py diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/tests/unit/__init__.py b/packages/aws-cdk/lib/init-templates/app/python/tests/unit/__init__.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/python/tests/unit/__init__.py rename to packages/aws-cdk/lib/init-templates/app/python/tests/unit/__init__.py diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/tests/unit/test_%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/app/python/tests/unit/test_%name.PythonModule%_stack.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/python/tests/unit/test_%name.PythonModule%_stack.template.py rename to packages/aws-cdk/lib/init-templates/app/python/tests/unit/test_%name.PythonModule%_stack.template.py diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/app/typescript/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.gitignore rename to packages/aws-cdk/lib/init-templates/app/typescript/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/app/typescript/.template.npmignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/typescript/.template.npmignore rename to packages/aws-cdk/lib/init-templates/app/typescript/.template.npmignore diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/README.md b/packages/aws-cdk/lib/init-templates/app/typescript/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/typescript/README.md rename to packages/aws-cdk/lib/init-templates/app/typescript/README.md diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/bin/%name%.template.ts b/packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/typescript/bin/%name%.template.ts rename to packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/cdk.template.json b/packages/aws-cdk/lib/init-templates/app/typescript/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/typescript/cdk.template.json rename to packages/aws-cdk/lib/init-templates/app/typescript/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/app/typescript/jest.config.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/typescript/jest.config.js rename to packages/aws-cdk/lib/init-templates/app/typescript/jest.config.js diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/lib/%name%-stack.template.ts b/packages/aws-cdk/lib/init-templates/app/typescript/lib/%name%-stack.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/typescript/lib/%name%-stack.template.ts rename to packages/aws-cdk/lib/init-templates/app/typescript/lib/%name%-stack.template.ts diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/package.json b/packages/aws-cdk/lib/init-templates/app/typescript/package.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/typescript/package.json rename to packages/aws-cdk/lib/init-templates/app/typescript/package.json diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/app/typescript/sub-placeholders.hook.ts similarity index 83% rename from packages/aws-cdk/lib/init-templates/v1/app/typescript/sub-placeholders.hook.ts rename to packages/aws-cdk/lib/init-templates/app/typescript/sub-placeholders.hook.ts index 039bb00d6f43f..a23cf905e5564 100644 --- a/packages/aws-cdk/lib/init-templates/v1/app/typescript/sub-placeholders.hook.ts +++ b/packages/aws-cdk/lib/init-templates/app/typescript/sub-placeholders.hook.ts @@ -1,4 +1,4 @@ -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (_, context) => { // File cannot be named like regular template because it needs to be diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/app/typescript/test/%name%.test.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/typescript/test/%name%.test.template.ts rename to packages/aws-cdk/lib/init-templates/app/typescript/test/%name%.test.template.ts diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/app/typescript/tsconfig.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/app/typescript/tsconfig.json rename to packages/aws-cdk/lib/init-templates/app/typescript/tsconfig.json diff --git a/packages/aws-cdk/lib/init-templates/v1/lib/info.json b/packages/aws-cdk/lib/init-templates/lib/info.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/lib/info.json rename to packages/aws-cdk/lib/init-templates/lib/info.json diff --git a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/lib/typescript/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.gitignore rename to packages/aws-cdk/lib/init-templates/lib/typescript/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/lib/typescript/.template.npmignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/lib/typescript/.template.npmignore rename to packages/aws-cdk/lib/init-templates/lib/typescript/.template.npmignore diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/README.template.md b/packages/aws-cdk/lib/init-templates/lib/typescript/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/lib/typescript/README.template.md rename to packages/aws-cdk/lib/init-templates/lib/typescript/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/lib/typescript/jest.config.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/lib/typescript/jest.config.js rename to packages/aws-cdk/lib/init-templates/lib/typescript/jest.config.js diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/lib/index.template.ts b/packages/aws-cdk/lib/init-templates/lib/typescript/lib/index.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/lib/typescript/lib/index.template.ts rename to packages/aws-cdk/lib/init-templates/lib/typescript/lib/index.template.ts diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/package.json b/packages/aws-cdk/lib/init-templates/lib/typescript/package.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/lib/typescript/package.json rename to packages/aws-cdk/lib/init-templates/lib/typescript/package.json diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/lib/typescript/sub-placeholders.hook.ts similarity index 83% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/sub-placeholders.hook.ts rename to packages/aws-cdk/lib/init-templates/lib/typescript/sub-placeholders.hook.ts index 039bb00d6f43f..a23cf905e5564 100644 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/sub-placeholders.hook.ts +++ b/packages/aws-cdk/lib/init-templates/lib/typescript/sub-placeholders.hook.ts @@ -1,4 +1,4 @@ -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (_, context) => { // File cannot be named like regular template because it needs to be diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/lib/typescript/test/%name%.test.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/lib/typescript/test/%name%.test.template.ts rename to packages/aws-cdk/lib/init-templates/lib/typescript/test/%name%.test.template.ts diff --git a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/lib/typescript/tsconfig.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/lib/typescript/tsconfig.json rename to packages/aws-cdk/lib/init-templates/lib/typescript/tsconfig.json diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/sample-app/csharp/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/.template.gitignore rename to packages/aws-cdk/lib/init-templates/sample-app/csharp/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/README.template.md b/packages/aws-cdk/lib/init-templates/sample-app/csharp/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/README.template.md rename to packages/aws-cdk/lib/init-templates/sample-app/csharp/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/v1/app/csharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/sample-app/csharp/add-project.hook.ts similarity index 95% rename from packages/aws-cdk/lib/init-templates/v1/app/csharp/add-project.hook.ts rename to packages/aws-cdk/lib/init-templates/sample-app/csharp/add-project.hook.ts index 37b1fe6ad3e5f..c839c1e01db08 100644 --- a/packages/aws-cdk/lib/init-templates/v1/app/csharp/add-project.hook.ts +++ b/packages/aws-cdk/lib/init-templates/sample-app/csharp/add-project.hook.ts @@ -1,6 +1,6 @@ import * as child_process from 'child_process'; import * as path from 'path'; -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (targetDirectory: string) => { const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/sample-app/csharp/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/cdk.template.json rename to packages/aws-cdk/lib/init-templates/sample-app/csharp/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%.template.sln similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%.template.sln rename to packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%.template.sln diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj b/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj rename to packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs rename to packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs b/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs rename to packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/Program.template.cs rename to packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/sample-app/fsharp/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/.template.gitignore rename to packages/aws-cdk/lib/init-templates/sample-app/fsharp/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/README.template.md b/packages/aws-cdk/lib/init-templates/sample-app/fsharp/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/README.template.md rename to packages/aws-cdk/lib/init-templates/sample-app/fsharp/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/sample-app/fsharp/add-project.hook.ts similarity index 95% rename from packages/aws-cdk/lib/init-templates/v2/app/fsharp/add-project.hook.ts rename to packages/aws-cdk/lib/init-templates/sample-app/fsharp/add-project.hook.ts index b9b091fa35ff1..efeed98d57ee2 100644 --- a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/add-project.hook.ts +++ b/packages/aws-cdk/lib/init-templates/sample-app/fsharp/add-project.hook.ts @@ -1,6 +1,6 @@ import * as child_process from 'child_process'; import * as path from 'path'; -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (targetDirectory: string) => { const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/sample-app/fsharp/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/cdk.template.json rename to packages/aws-cdk/lib/init-templates/sample-app/fsharp/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%.template.sln similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%.template.sln rename to packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%.template.sln diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj b/packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj rename to packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs b/packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs similarity index 86% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs rename to packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs index 1582e37f4faaf..9ad4fac32567c 100644 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs +++ b/packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs @@ -11,4 +11,4 @@ type %name.PascalCased%Stack(scope, id, props) as this = let queue = Queue(this, "%name.PascalCased%Queue", QueueProps(VisibilityTimeout = Duration.Seconds(300.))) let topic = Topic(this, "%name.PascalCased%Topic") - do topic.AddSubscription(SqsSubscription(queue)) + do topic.AddSubscription(SqsSubscription(queue)) |> ignore diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs b/packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs rename to packages/aws-cdk/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/go/%name%.template.go b/packages/aws-cdk/lib/init-templates/sample-app/go/%name%.template.go similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/go/%name%.template.go rename to packages/aws-cdk/lib/init-templates/sample-app/go/%name%.template.go diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/go/%name%_test.template.go b/packages/aws-cdk/lib/init-templates/sample-app/go/%name%_test.template.go similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/go/%name%_test.template.go rename to packages/aws-cdk/lib/init-templates/sample-app/go/%name%_test.template.go diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/go/.template.gitignore b/packages/aws-cdk/lib/init-templates/sample-app/go/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/go/.template.gitignore rename to packages/aws-cdk/lib/init-templates/sample-app/go/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/go/README.md b/packages/aws-cdk/lib/init-templates/sample-app/go/README.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/go/README.md rename to packages/aws-cdk/lib/init-templates/sample-app/go/README.md diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/go/cdk.template.json b/packages/aws-cdk/lib/init-templates/sample-app/go/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/go/cdk.template.json rename to packages/aws-cdk/lib/init-templates/sample-app/go/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/go/go.template.mod b/packages/aws-cdk/lib/init-templates/sample-app/go/go.template.mod similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/go/go.template.mod rename to packages/aws-cdk/lib/init-templates/sample-app/go/go.template.mod diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/info.json b/packages/aws-cdk/lib/init-templates/sample-app/info.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/info.json rename to packages/aws-cdk/lib/init-templates/sample-app/info.json diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/.template.gitignore b/packages/aws-cdk/lib/init-templates/sample-app/java/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/java/.template.gitignore rename to packages/aws-cdk/lib/init-templates/sample-app/java/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/README.template.md b/packages/aws-cdk/lib/init-templates/sample-app/java/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/java/README.template.md rename to packages/aws-cdk/lib/init-templates/sample-app/java/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/cdk.json b/packages/aws-cdk/lib/init-templates/sample-app/java/cdk.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/java/cdk.json rename to packages/aws-cdk/lib/init-templates/sample-app/java/cdk.json diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/pom.xml b/packages/aws-cdk/lib/init-templates/sample-app/java/pom.xml similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/java/pom.xml rename to packages/aws-cdk/lib/init-templates/sample-app/java/pom.xml diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java b/packages/aws-cdk/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java rename to packages/aws-cdk/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java b/packages/aws-cdk/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java rename to packages/aws-cdk/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java b/packages/aws-cdk/lib/init-templates/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java rename to packages/aws-cdk/lib/init-templates/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/sample-app/java/sub-placeholders.hook.ts similarity index 82% rename from packages/aws-cdk/lib/init-templates/v2/app/java/sub-placeholders.hook.ts rename to packages/aws-cdk/lib/init-templates/sample-app/java/sub-placeholders.hook.ts index 98c27ef042b9c..a33a366d99eff 100644 --- a/packages/aws-cdk/lib/init-templates/v2/app/java/sub-placeholders.hook.ts +++ b/packages/aws-cdk/lib/init-templates/sample-app/java/sub-placeholders.hook.ts @@ -1,4 +1,4 @@ -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (_, context) => { // File cannot be named like regular template because it needs to be diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/sample-app/javascript/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.gitignore rename to packages/aws-cdk/lib/init-templates/sample-app/javascript/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.npmignore b/packages/aws-cdk/lib/init-templates/sample-app/javascript/.template.npmignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/.template.npmignore rename to packages/aws-cdk/lib/init-templates/sample-app/javascript/.template.npmignore diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/README.template.md b/packages/aws-cdk/lib/init-templates/sample-app/javascript/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/README.template.md rename to packages/aws-cdk/lib/init-templates/sample-app/javascript/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/bin/%name%.template.js b/packages/aws-cdk/lib/init-templates/sample-app/javascript/bin/%name%.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/bin/%name%.template.js rename to packages/aws-cdk/lib/init-templates/sample-app/javascript/bin/%name%.template.js diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/cdk.template.json b/packages/aws-cdk/lib/init-templates/sample-app/javascript/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/cdk.template.json rename to packages/aws-cdk/lib/init-templates/sample-app/javascript/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/jest.config.js b/packages/aws-cdk/lib/init-templates/sample-app/javascript/jest.config.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/app/javascript/jest.config.js rename to packages/aws-cdk/lib/init-templates/sample-app/javascript/jest.config.js diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/lib/%name%-stack.template.js b/packages/aws-cdk/lib/init-templates/sample-app/javascript/lib/%name%-stack.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/lib/%name%-stack.template.js rename to packages/aws-cdk/lib/init-templates/sample-app/javascript/lib/%name%-stack.template.js diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/package.json b/packages/aws-cdk/lib/init-templates/sample-app/javascript/package.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/package.json rename to packages/aws-cdk/lib/init-templates/sample-app/javascript/package.json diff --git a/packages/aws-cdk/lib/init-templates/v1/app/javascript/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/sample-app/javascript/sub-placeholders.hook.ts similarity index 83% rename from packages/aws-cdk/lib/init-templates/v1/app/javascript/sub-placeholders.hook.ts rename to packages/aws-cdk/lib/init-templates/sample-app/javascript/sub-placeholders.hook.ts index 039bb00d6f43f..a23cf905e5564 100644 --- a/packages/aws-cdk/lib/init-templates/v1/app/javascript/sub-placeholders.hook.ts +++ b/packages/aws-cdk/lib/init-templates/sample-app/javascript/sub-placeholders.hook.ts @@ -1,4 +1,4 @@ -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (_, context) => { // File cannot be named like regular template because it needs to be diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/test/%name%.test.template.js b/packages/aws-cdk/lib/init-templates/sample-app/javascript/test/%name%.test.template.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/test/%name%.test.template.js rename to packages/aws-cdk/lib/init-templates/sample-app/javascript/test/%name%.test.template.js diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/tsconfig.json b/packages/aws-cdk/lib/init-templates/sample-app/javascript/tsconfig.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/tsconfig.json rename to packages/aws-cdk/lib/init-templates/sample-app/javascript/tsconfig.json diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py rename to packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/%name.PythonModule%/__init__.py b/packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/__init__.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/python/%name.PythonModule%/__init__.py rename to packages/aws-cdk/lib/init-templates/sample-app/python/%name.PythonModule%/__init__.py diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/.template.gitignore b/packages/aws-cdk/lib/init-templates/sample-app/python/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/python/.template.gitignore rename to packages/aws-cdk/lib/init-templates/sample-app/python/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/README.template.md b/packages/aws-cdk/lib/init-templates/sample-app/python/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/python/README.template.md rename to packages/aws-cdk/lib/init-templates/sample-app/python/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/app.template.py b/packages/aws-cdk/lib/init-templates/sample-app/python/app.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/python/app.template.py rename to packages/aws-cdk/lib/init-templates/sample-app/python/app.template.py diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/cdk.template.json b/packages/aws-cdk/lib/init-templates/sample-app/python/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/python/cdk.template.json rename to packages/aws-cdk/lib/init-templates/sample-app/python/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/requirements-dev.txt b/packages/aws-cdk/lib/init-templates/sample-app/python/requirements-dev.txt similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/python/requirements-dev.txt rename to packages/aws-cdk/lib/init-templates/sample-app/python/requirements-dev.txt diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/requirements.txt b/packages/aws-cdk/lib/init-templates/sample-app/python/requirements.txt similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/python/requirements.txt rename to packages/aws-cdk/lib/init-templates/sample-app/python/requirements.txt diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/source.bat b/packages/aws-cdk/lib/init-templates/sample-app/python/source.bat similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/python/source.bat rename to packages/aws-cdk/lib/init-templates/sample-app/python/source.bat diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/sample-app/python/sub-placeholders.hook.ts similarity index 83% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/python/sub-placeholders.hook.ts rename to packages/aws-cdk/lib/init-templates/sample-app/python/sub-placeholders.hook.ts index 67bf2a9c6e8f4..da4718522f3b9 100644 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/sub-placeholders.hook.ts +++ b/packages/aws-cdk/lib/init-templates/sample-app/python/sub-placeholders.hook.ts @@ -1,4 +1,4 @@ -import { InvokeHook } from '../../../../init'; +import { InvokeHook } from '../../../init'; export const invoke: InvokeHook = async (_, context) => { // File cannot be named like regular template because it needs to be diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/__init__.py b/packages/aws-cdk/lib/init-templates/sample-app/python/tests/__init__.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/__init__.py rename to packages/aws-cdk/lib/init-templates/sample-app/python/tests/__init__.py diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/unit/__init__.py b/packages/aws-cdk/lib/init-templates/sample-app/python/tests/unit/__init__.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/unit/__init__.py rename to packages/aws-cdk/lib/init-templates/sample-app/python/tests/unit/__init__.py diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py rename to packages/aws-cdk/lib/init-templates/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/sample-app/typescript/.template.gitignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.gitignore rename to packages/aws-cdk/lib/init-templates/sample-app/typescript/.template.gitignore diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/sample-app/typescript/.template.npmignore similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/.template.npmignore rename to packages/aws-cdk/lib/init-templates/sample-app/typescript/.template.npmignore diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/README.template.md b/packages/aws-cdk/lib/init-templates/sample-app/typescript/README.template.md similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/README.template.md rename to packages/aws-cdk/lib/init-templates/sample-app/typescript/README.template.md diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/bin/%name%.template.ts b/packages/aws-cdk/lib/init-templates/sample-app/typescript/bin/%name%.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/bin/%name%.template.ts rename to packages/aws-cdk/lib/init-templates/sample-app/typescript/bin/%name%.template.ts diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/cdk.template.json b/packages/aws-cdk/lib/init-templates/sample-app/typescript/cdk.template.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/cdk.template.json rename to packages/aws-cdk/lib/init-templates/sample-app/typescript/cdk.template.json diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/sample-app/typescript/jest.config.js similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/jest.config.js rename to packages/aws-cdk/lib/init-templates/sample-app/typescript/jest.config.js diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/lib/%name%-stack.template.ts b/packages/aws-cdk/lib/init-templates/sample-app/typescript/lib/%name%-stack.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/lib/%name%-stack.template.ts rename to packages/aws-cdk/lib/init-templates/sample-app/typescript/lib/%name%-stack.template.ts diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/package.json b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/package.json rename to packages/aws-cdk/lib/init-templates/sample-app/typescript/package.json diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/sample-app/typescript/sub-placeholders.hook.ts new file mode 100644 index 0000000000000..a23cf905e5564 --- /dev/null +++ b/packages/aws-cdk/lib/init-templates/sample-app/typescript/sub-placeholders.hook.ts @@ -0,0 +1,7 @@ +import { InvokeHook } from '../../../init'; + +export const invoke: InvokeHook = async (_, context) => { + // File cannot be named like regular template because it needs to be + // processed by dependency updaters. + await context.substitutePlaceholdersIn('package.json'); +}; diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/sample-app/typescript/test/%name%.test.template.ts similarity index 100% rename from packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/test/%name%.test.template.ts rename to packages/aws-cdk/lib/init-templates/sample-app/typescript/test/%name%.test.template.ts diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/sample-app/typescript/tsconfig.json similarity index 100% rename from packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/tsconfig.json rename to packages/aws-cdk/lib/init-templates/sample-app/typescript/tsconfig.json diff --git a/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj b/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj deleted file mode 100644 index 4572e92eafed1..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - Exe - netcoreapp3.1 - - Major - - - - - - - - - - diff --git a/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs deleted file mode 100644 index 6aadf6a3a0e05..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Amazon.CDK; - -namespace %name.PascalCased% -{ - public class %name.PascalCased%Stack : Stack - { - internal %name.PascalCased%Stack(Construct scope, string id, IStackProps props = null) : base(scope, id, props) - { - // The code that defines your stack goes here - } - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/Program.template.cs deleted file mode 100644 index ec6a50b8bdc00..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/csharp/src/%name.PascalCased%/Program.template.cs +++ /dev/null @@ -1,45 +0,0 @@ -using Amazon.CDK; -using System; -using System.Collections.Generic; -using System.Linq; - -namespace %name.PascalCased% -{ - sealed class Program - { - public static void Main(string[] args) - { - var app = new App(); - new %name.PascalCased%Stack(app, "%name.PascalCased%Stack", new StackProps - { - // If you don't specify 'env', this stack will be environment-agnostic. - // Account/Region-dependent features and context lookups will not work, - // but a single synthesized template can be deployed anywhere. - - // Uncomment the next block to specialize this stack for the AWS Account - // and Region that are implied by the current CLI configuration. - /* - Env = new Amazon.CDK.Environment - { - Account = System.Environment.GetEnvironmentVariable("CDK_DEFAULT_ACCOUNT"), - Region = System.Environment.GetEnvironmentVariable("CDK_DEFAULT_REGION"), - } - */ - - // Uncomment the next block if you know exactly what Account and Region you - // want to deploy the stack to. - /* - Env = new Amazon.CDK.Environment - { - Account = "123456789012", - Region = "us-east-1", - } - */ - - // For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html - }); - - app.Synth(); - } - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj b/packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj deleted file mode 100644 index 1ecb568dddb47..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - Exe - netcoreapp3.1 - - Major - - - - - - - - - - - - - - - diff --git a/packages/aws-cdk/lib/init-templates/v1/app/go/%name%.template.go b/packages/aws-cdk/lib/init-templates/v1/app/go/%name%.template.go deleted file mode 100644 index 742ed4c64ce7b..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/go/%name%.template.go +++ /dev/null @@ -1,68 +0,0 @@ -package main - -import ( - "github.com/aws/aws-cdk-go/awscdk" - // "github.com/aws/aws-cdk-go/awscdk/awssqs" - "github.com/aws/constructs-go/constructs/v3" - // "github.com/aws/jsii-runtime-go" -) - -type %name.PascalCased%StackProps struct { - awscdk.StackProps -} - -func New%name.PascalCased%Stack(scope constructs.Construct, id string, props *%name.PascalCased%StackProps) awscdk.Stack { - var sprops awscdk.StackProps - if props != nil { - sprops = props.StackProps - } - stack := awscdk.NewStack(scope, &id, &sprops) - - // The code that defines your stack goes here - - // example resource - // queue := awssqs.NewQueue(stack, jsii.String("%name.PascalCased%Queue"), &awssqs.QueueProps{ - // VisibilityTimeout: awscdk.Duration_Seconds(jsii.Number(300)), - // }) - - return stack -} - -func main() { - app := awscdk.NewApp(nil) - - New%name.PascalCased%Stack(app, "%name.PascalCased%Stack", &%name.PascalCased%StackProps{ - awscdk.StackProps{ - Env: env(), - }, - }) - - app.Synth(nil) -} - -// env determines the AWS environment (account+region) in which our stack is to -// be deployed. For more information see: https://docs.aws.amazon.com/cdk/latest/guide/environments.html -func env() *awscdk.Environment { - // If unspecified, this stack will be "environment-agnostic". - // Account/Region-dependent features and context lookups will not work, but a - // single synthesized template can be deployed anywhere. - //--------------------------------------------------------------------------- - return nil - - // Uncomment if you know exactly what account and region you want to deploy - // the stack to. This is the recommendation for production stacks. - //--------------------------------------------------------------------------- - // return &awscdk.Environment{ - // Account: jsii.String("123456789012"), - // Region: jsii.String("us-east-1"), - // } - - // Uncomment to specialize this stack for the AWS Account and Region that are - // implied by the current CLI configuration. This is recommended for dev - // stacks. - //--------------------------------------------------------------------------- - // return &awscdk.Environment{ - // Account: jsii.String(os.Getenv("CDK_DEFAULT_ACCOUNT")), - // Region: jsii.String(os.Getenv("CDK_DEFAULT_REGION")), - // } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/app/go/%name%_test.template.go b/packages/aws-cdk/lib/init-templates/v1/app/go/%name%_test.template.go deleted file mode 100644 index 78742540bc2f7..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/go/%name%_test.template.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -// import ( -// "testing" - -// "github.com/aws/aws-cdk-go/awscdk" -// "github.com/aws/aws-cdk-go/awscdk/assertions" -// "github.com/aws/jsii-runtime-go" -// ) - -// example tests. To run these tests, uncomment this file along with the -// example resource in %name%_test.go -// func Test%name.PascalCased%Stack(t *testing.T) { -// // GIVEN -// app := awscdk.NewApp(nil) - -// // WHEN -// stack := New%name.PascalCased%Stack(app, "MyStack", nil) - -// // THEN -// template := assertions.Template_FromStack(stack) - -// template.HasResourceProperties(jsii.String("AWS::SQS::Queue"), map[string]interface{}{ -// "VisibilityTimeout": 300, -// }) -// } diff --git a/packages/aws-cdk/lib/init-templates/v1/app/go/go.template.mod b/packages/aws-cdk/lib/init-templates/v1/app/go/go.template.mod deleted file mode 100644 index 5dbef39984826..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/go/go.template.mod +++ /dev/null @@ -1,9 +0,0 @@ -module %name% - -go 1.16 - -require ( - github.com/aws/aws-cdk-go/awscdk v%cdk-version%-devpreview - github.com/aws/constructs-go/constructs/v3 v3.3.71 - github.com/aws/jsii-runtime-go v1.26.0 -) diff --git a/packages/aws-cdk/lib/init-templates/v1/app/java/pom.xml b/packages/aws-cdk/lib/init-templates/v1/app/java/pom.xml deleted file mode 100644 index b8b00e798209c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/java/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - 4.0.0 - - com.myorg - %name% - 0.1 - - - UTF-8 - %cdk-version% - 5.7.1 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - 1.8 - 1.8 - - - - - org.codehaus.mojo - exec-maven-plugin - 3.0.0 - - com.myorg.%name.PascalCased%App - - - - - - - - - software.amazon.awscdk - core - ${cdk.version} - - - software.amazon.awscdk - assertions - ${cdk.version} - test - - - - org.junit.jupiter - junit-jupiter - ${junit.version} - test - - - diff --git a/packages/aws-cdk/lib/init-templates/v1/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java b/packages/aws-cdk/lib/init-templates/v1/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java deleted file mode 100644 index f3eb72f9dfe0c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.myorg; - -import software.amazon.awscdk.core.App; -import software.amazon.awscdk.core.Environment; -import software.amazon.awscdk.core.StackProps; - -import java.util.Arrays; - -public class %name.PascalCased%App { - public static void main(final String[] args) { - App app = new App(); - - new %name.PascalCased%Stack(app, "%name.PascalCased%Stack", StackProps.builder() - // If you don't specify 'env', this stack will be environment-agnostic. - // Account/Region-dependent features and context lookups will not work, - // but a single synthesized template can be deployed anywhere. - - // Uncomment the next block to specialize this stack for the AWS Account - // and Region that are implied by the current CLI configuration. - /* - .env(Environment.builder() - .account(System.getenv("CDK_DEFAULT_ACCOUNT")) - .region(System.getenv("CDK_DEFAULT_REGION")) - .build()) - */ - - // Uncomment the next block if you know exactly what Account and Region you - // want to deploy the stack to. - /* - .env(Environment.builder() - .account("123456789012") - .region("us-east-1") - .build()) - */ - - // For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html - .build()); - - app.synth(); - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java b/packages/aws-cdk/lib/init-templates/v1/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java deleted file mode 100644 index a4dbab1dbd8b9..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.myorg; - -import software.amazon.awscdk.core.Construct; -import software.amazon.awscdk.core.Stack; -import software.amazon.awscdk.core.StackProps; -// import software.amazon.awscdk.services.sqs.Queue; -// import software.amazon.awscdk.core.Duration; - -public class %name.PascalCased%Stack extends Stack { - public %name.PascalCased%Stack(final Construct scope, final String id) { - this(scope, id, null); - } - - public %name.PascalCased%Stack(final Construct scope, final String id, final StackProps props) { - super(scope, id, props); - - // The code that defines your stack goes here - - // example resource - // final Queue queue = Queue.Builder.create(this, "%name.PascalCased%Queue") - // .visibilityTimeout(Duration.seconds(300)) - // .build(); - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java b/packages/aws-cdk/lib/init-templates/v1/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java deleted file mode 100644 index e095565be7920..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java +++ /dev/null @@ -1,26 +0,0 @@ -// package com.myorg; - -// import software.amazon.awscdk.core.App; -// import software.amazon.awscdk.assertions.Template; -// import java.io.IOException; - -// import java.util.HashMap; - -// import org.junit.jupiter.api.Test; - -// example test. To run these tests, uncomment this file, along with the -// example resource in java/src/main/java/com/myorg/%name.PascalCased%Stack.java -// public class %name.PascalCased%Test { - -// @Test -// public void testStack() throws IOException { -// App app = new App(); -// %name.PascalCased%Stack stack = new %name.PascalCased%Stack(app, "test"); - -// Template template = Template.fromStack(stack); - -// template.hasResourceProperties("AWS::SQS::Queue", new HashMap() {{ -// put("VisibilityTimeout", 300); -// }}); -// } -// } diff --git a/packages/aws-cdk/lib/init-templates/v1/app/java/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/v1/app/java/sub-placeholders.hook.ts deleted file mode 100644 index 98c27ef042b9c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/java/sub-placeholders.hook.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (_, context) => { - // File cannot be named like regular template because it needs to be - // processed by dependency updaters. - await context.substitutePlaceholdersIn('pom.xml'); -}; diff --git a/packages/aws-cdk/lib/init-templates/v1/app/javascript/bin/%name%.template.js b/packages/aws-cdk/lib/init-templates/v1/app/javascript/bin/%name%.template.js deleted file mode 100644 index 1a99b7e2c55ec..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/javascript/bin/%name%.template.js +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env node - -const cdk = require('@aws-cdk/core'); -const { %name.PascalCased%Stack } = require('../lib/%name%-stack'); - -const app = new cdk.App(); -new %name.PascalCased%Stack(app, '%name.PascalCased%Stack', { - /* If you don't specify 'env', this stack will be environment-agnostic. - * Account/Region-dependent features and context lookups will not work, - * but a single synthesized template can be deployed anywhere. */ - - /* Uncomment the next line to specialize this stack for the AWS Account - * and Region that are implied by the current CLI configuration. */ - // env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, - - /* Uncomment the next line if you know exactly what Account and Region you - * want to deploy the stack to. */ - // env: { account: '123456789012', region: 'us-east-1' }, - - /* For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html */ -}); \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v1/app/javascript/jest.config.js b/packages/aws-cdk/lib/init-templates/v1/app/javascript/jest.config.js deleted file mode 100644 index 668e089fb02b3..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/javascript/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - testEnvironment: "node" -} diff --git a/packages/aws-cdk/lib/init-templates/v1/app/javascript/lib/%name%-stack.template.js b/packages/aws-cdk/lib/init-templates/v1/app/javascript/lib/%name%-stack.template.js deleted file mode 100644 index 8004c54a568aa..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/javascript/lib/%name%-stack.template.js +++ /dev/null @@ -1,23 +0,0 @@ -const cdk = require('@aws-cdk/core'); -// const sqs = require('@aws-cdk/aws-sqs'); - -class %name.PascalCased%Stack extends cdk.Stack { - /** - * - * @param {cdk.Construct} scope - * @param {string} id - * @param {cdk.StackProps=} props - */ - constructor(scope, id, props) { - super(scope, id, props); - - // The code that defines your stack goes here - - // example resource - // const queue = new sqs.Queue(this, '%name.PascalCased%Queue', { - // visibilityTimeout: cdk.Duration.seconds(300) - // }); - } -} - -module.exports = { %name.PascalCased%Stack } diff --git a/packages/aws-cdk/lib/init-templates/v1/app/javascript/package.json b/packages/aws-cdk/lib/init-templates/v1/app/javascript/package.json deleted file mode 100644 index 8643f0e069fe8..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/javascript/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "%name%", - "version": "0.1.0", - "bin": { - "%name%": "bin/%name%.js" - }, - "scripts": { - "build": "echo \"The build step is not required when using JavaScript!\" && exit 0", - "cdk": "cdk", - "test": "jest" - }, - "devDependencies": { - "@aws-cdk/assertions": "%cdk-version%", - "aws-cdk": "%cdk-version%", - "jest": "^27.5.1" - }, - "dependencies": { - "@aws-cdk/core": "%cdk-version%" - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/app/javascript/test/%name%.test.template.js b/packages/aws-cdk/lib/init-templates/v1/app/javascript/test/%name%.test.template.js deleted file mode 100644 index 514cd34e9faf1..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/javascript/test/%name%.test.template.js +++ /dev/null @@ -1,18 +0,0 @@ -// const { Template } = require('@aws-cdk/assertions'); -// const cdk = require('@aws-cdk/core'); -// const %name.PascalCased% = require('../lib/%name%-stack'); - -// example test. To run these tests, uncomment this file along with the -// example resource in lib/%name%-stack.js -test('SQS Queue Created', () => { -// const app = new cdk.App(); -// // WHEN -// const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); -// // THEN -// const template = Template.fromStack(stack); - -// template.hasResourceProperties('AWS::SQS::Queue', { -// VisibilityTimeout: 300 -// }); -}); - diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/v1/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py deleted file mode 100644 index 9c5de032e839d..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py +++ /dev/null @@ -1,24 +0,0 @@ -from aws_cdk import ( - core as cdk - # aws_sqs as sqs, -) - -# For consistency with other languages, `cdk` is the preferred import name for -# the CDK's core module. The following line also imports it as `core` for use -# with examples from the CDK Developer's Guide, which are in the process of -# being updated to use `cdk`. You may delete this import if you don't need it. -from aws_cdk import core - - -class %name.PascalCased%Stack(cdk.Stack): - - def __init__(self, scope: cdk.Construct, construct_id: str, **kwargs) -> None: - super().__init__(scope, construct_id, **kwargs) - - # The code that defines your stack goes here - - # example resource - # queue = sqs.Queue( - # self, "%name.PascalCased%Queue", - # visibility_timeout=cdk.Duration.seconds(300), - # ) diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/.template.gitignore b/packages/aws-cdk/lib/init-templates/v1/app/python/.template.gitignore deleted file mode 100644 index 58505a0211c74..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/python/.template.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -*.swp -package-lock.json -__pycache__ -.pytest_cache -.env -.venv -*.egg-info - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/app.template.py b/packages/aws-cdk/lib/init-templates/v1/app/python/app.template.py deleted file mode 100644 index a63ab8ac2e62e..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/python/app.template.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python3 -import os - -from aws_cdk import core as cdk - -# For consistency with TypeScript code, `cdk` is the preferred import name for -# the CDK's core module. The following line also imports it as `core` for use -# with examples from the CDK Developer's Guide, which are in the process of -# being updated to use `cdk`. You may delete this import if you don't need it. -from aws_cdk import core - -from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack - - -app = core.App() -%name.PascalCased%Stack(app, "%name.PascalCased%Stack", - # If you don't specify 'env', this stack will be environment-agnostic. - # Account/Region-dependent features and context lookups will not work, - # but a single synthesized template can be deployed anywhere. - - # Uncomment the next line to specialize this stack for the AWS Account - # and Region that are implied by the current CLI configuration. - - #env=core.Environment(account=os.getenv('CDK_DEFAULT_ACCOUNT'), region=os.getenv('CDK_DEFAULT_REGION')), - - # Uncomment the next line if you know exactly what Account and Region you - # want to deploy the stack to. */ - - #env=core.Environment(account='123456789012', region='us-east-1'), - - # For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html - ) - -app.synth() diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/requirements.txt b/packages/aws-cdk/lib/init-templates/v1/app/python/requirements.txt deleted file mode 100644 index 87cbb00cfac55..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/python/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -aws-cdk.core>=%cdk-version% -aws-cdk.assertions>=%cdk-version% diff --git a/packages/aws-cdk/lib/init-templates/v1/app/python/tests/unit/test_%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/v1/app/python/tests/unit/test_%name.PythonModule%_stack.template.py deleted file mode 100644 index 1b0e4b66e9aaa..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/python/tests/unit/test_%name.PythonModule%_stack.template.py +++ /dev/null @@ -1,19 +0,0 @@ -# from aws_cdk import ( -# core, -# assertions -# ) - -# from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack - - -# example tests. To run these tests, uncomment this file along with the example -# resource in %name.PythonModule%/%name.PythonModule%_stack.py -def test_sqs_queue_created(): -# app = core.App() -# stack = %name.PascalCased%Stack(app, "%name.StackName%") -# template = assertions.Template.from_stack(stack) - -# template.has_resource_properties("AWS::SQS::Queue", { -# "VisibilityTimeout": 300 -# }) - pass diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/bin/%name%.template.ts b/packages/aws-cdk/lib/init-templates/v1/app/typescript/bin/%name%.template.ts deleted file mode 100644 index 9479fc651f175..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/typescript/bin/%name%.template.ts +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env node -import 'source-map-support/register'; -import * as cdk from '@aws-cdk/core'; -import { %name.PascalCased%Stack } from '../lib/%name%-stack'; - -const app = new cdk.App(); -new %name.PascalCased%Stack(app, '%name.PascalCased%Stack', { - /* If you don't specify 'env', this stack will be environment-agnostic. - * Account/Region-dependent features and context lookups will not work, - * but a single synthesized template can be deployed anywhere. */ - - /* Uncomment the next line to specialize this stack for the AWS Account - * and Region that are implied by the current CLI configuration. */ - // env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, - - /* Uncomment the next line if you know exactly what Account and Region you - * want to deploy the stack to. */ - // env: { account: '123456789012', region: 'us-east-1' }, - - /* For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html */ -}); diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/lib/%name%-stack.template.ts b/packages/aws-cdk/lib/init-templates/v1/app/typescript/lib/%name%-stack.template.ts deleted file mode 100644 index 82fd9a48ac0dd..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/typescript/lib/%name%-stack.template.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as cdk from '@aws-cdk/core'; -// import * as sqs from '@aws-cdk/aws-sqs'; - -export class %name.PascalCased%Stack extends cdk.Stack { - constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { - super(scope, id, props); - - // The code that defines your stack goes here - - // example resource - // const queue = new sqs.Queue(this, '%name.PascalCased%Queue', { - // visibilityTimeout: cdk.Duration.seconds(300) - // }); - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/package.json b/packages/aws-cdk/lib/init-templates/v1/app/typescript/package.json deleted file mode 100644 index 19862aa845b6e..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/typescript/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "%name%", - "version": "0.1.0", - "bin": { - "%name%": "bin/%name%.js" - }, - "scripts": { - "build": "tsc", - "watch": "tsc -w", - "test": "jest", - "cdk": "cdk" - }, - "devDependencies": { - "@aws-cdk/assertions": "%cdk-version%", - "@types/prettier": "2.6.0", - "@types/jest": "^27.5.2", - "@types/node": "10.17.27", - "jest": "^27.5.1", - "ts-jest": "^27.1.4", - "aws-cdk": "%cdk-version%", - "ts-node": "^10.8.1", - "typescript": "~3.9.7" - }, - "dependencies": { - "@aws-cdk/core": "%cdk-version%", - "source-map-support": "^0.5.21" - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/app/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/v1/app/typescript/test/%name%.test.template.ts deleted file mode 100644 index d41f3aaf74d04..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/app/typescript/test/%name%.test.template.ts +++ /dev/null @@ -1,17 +0,0 @@ -// import { Template } from '@aws-cdk/assertions'; -// import * as cdk from '@aws-cdk/core'; -// import * as %name.PascalCased% from '../lib/%name%-stack'; - -// example test. To run these tests, uncomment this file along with the -// example resource in lib/%name%-stack.ts -test('SQS Queue Created', () => { -// const app = new cdk.App(); -// // WHEN -// const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); -// // THEN -// const template = Template.fromStack(stack); - -// template.hasResourceProperties('AWS::SQS::Queue', { -// VisibilityTimeout: 300 -// }); -}); diff --git a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/README.template.md b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/README.template.md deleted file mode 100644 index f867c7347abe8..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/README.template.md +++ /dev/null @@ -1,12 +0,0 @@ -# Welcome to your CDK TypeScript Construct Library project - -You should explore the contents of this project. It demonstrates a CDK Construct Library that includes a construct (`%name.PascalCased%`) -which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. - -The construct defines an interface (`%name.PascalCased%Props`) to configure the visibility timeout of the queue. - -## Useful commands - -* `npm run build` compile typescript to js -* `npm run watch` watch for changes and compile -* `npm run test` perform the jest unit tests \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/lib/index.template.ts b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/lib/index.template.ts deleted file mode 100644 index 49c002d8e8271..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/lib/index.template.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as cdk from '@aws-cdk/core'; -// import * as sqs from '@aws-cdk/aws-sqs'; - -export interface %name.PascalCased%Props { - // Define construct properties here -} - -export class %name.PascalCased% extends cdk.Construct { - - constructor(scope: cdk.Construct, id: string, props: %name.PascalCased%Props = {}) { - super(scope, id); - - // Define construct contents here - - // example resource - // const queue = new sqs.Queue(this, '%name.PascalCased%Queue', { - // visibilityTimeout: cdk.Duration.seconds(300) - // }); - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/package.json b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/package.json deleted file mode 100644 index 77bcfe180e8d0..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "%name%", - "version": "0.1.0", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "scripts": { - "build": "tsc", - "watch": "tsc -w", - "test": "jest" - }, - "devDependencies": { - "@aws-cdk/assertions": "%cdk-version%", - "@types/jest": "^27.5.2", - "@types/prettier": "2.6.0", - "@types/node": "10.17.27", - "jest": "^27.5.1", - "ts-jest": "^27.1.4", - "typescript": "~3.9.7" - }, - "peerDependencies": { - "@aws-cdk/core": "%cdk-version%" - }, - "dependencies": { - "@aws-cdk/core": "%cdk-version%" - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/v1/lib/typescript/test/%name%.test.template.ts deleted file mode 100644 index 641b974082aa7..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/lib/typescript/test/%name%.test.template.ts +++ /dev/null @@ -1,18 +0,0 @@ -// import { Template } from '@aws-cdk/assertions'; -// import * as cdk from '@aws-cdk/core'; -// import * as %name.PascalCased% from '../lib/index'; - -// example test. To run these tests, uncomment this file along with the -// example resource in lib/index.ts -test('SQS Queue Created', () => { -// const app = new cdk.App(); -// const stack = new cdk.Stack(app, 'TestStack'); -// // WHEN -// new %name.PascalCased%.%name.PascalCased%(stack, 'MyTestConstruct'); -// // THEN -// const template = Template.fromStack(stack); - -// template.hasResourceProperties('AWS::SQS::Queue', { -// VisibilityTimeout: 300 -// }); -}); diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/README.template.md b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/README.template.md deleted file mode 100644 index a9915823b7a48..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/README.template.md +++ /dev/null @@ -1,22 +0,0 @@ -# Welcome to your CDK C# project! - -You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) -which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. - -It uses the [.NET Core CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. - -## Tutorial -See [this useful workshop](https://cdkworkshop.com/40-dotnet.html) on working with the AWS CDK for C# projects. - -## Useful commands - -* `dotnet build src` compile this app -* `cdk ls` list all stacks in the app -* `cdk synth` emits the synthesized CloudFormation template -* `cdk deploy` deploy this stack to your default AWS account/region -* `cdk diff` compare deployed stack with current state -* `cdk docs` open CDK documentation - -Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/add-project.hook.ts deleted file mode 100644 index 37b1fe6ad3e5f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/add-project.hook.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as child_process from 'child_process'; -import * as path from 'path'; -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (targetDirectory: string) => { - const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); - const csprojPath = path.join(targetDirectory, 'src', '%name.PascalCased%', '%name.PascalCased%.csproj'); - - const child = child_process.spawn('dotnet', ['sln', slnPath, 'add', csprojPath], { - // Need this for Windows where we want .cmd and .bat to be found as well. - shell: true, - stdio: ['ignore', 'pipe', 'inherit'], - }); - - await new Promise((resolve, reject) => { - const stdout = new Array(); - - child.stdout.on('data', chunk => { - process.stdout.write(chunk); - stdout.push(chunk); - }); - - child.once('error', reject); - - child.once('exit', code => { - if (code === 0) { - resolve(Buffer.concat(stdout).toString('utf-8')); - } else { - reject(new Error(`Could not add project %name.PascalCased%.csproj to solution %name.PascalCased%.sln. Error code: ${code}`)); - } - }); - }); -}; diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj deleted file mode 100644 index 859978ce84abb..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - Exe - netcoreapp3.1 - - Major - - - - - - - - - - - - - - diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs deleted file mode 100644 index 365330ed65925..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Amazon.CDK; -using Amazon.CDK.AWS.SNS; -using Amazon.CDK.AWS.SNS.Subscriptions; -using Amazon.CDK.AWS.SQS; - -namespace %name.PascalCased% -{ - public class %name.PascalCased%Stack : Stack - { - internal %name.PascalCased%Stack(Construct scope, string id, IStackProps props = null) : base(scope, id, props) - { - // The CDK includes built-in constructs for most resource types, such as Queues and Topics. - var queue = new Queue(this, "%name.PascalCased%Queue", new QueueProps - { - VisibilityTimeout = Duration.Seconds(300) - }); - - var topic = new Topic(this, "%name.PascalCased%Topic"); - - topic.AddSubscription(new SqsSubscription(queue)); - } - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/add-project.hook.ts deleted file mode 100644 index b9b091fa35ff1..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/add-project.hook.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as child_process from 'child_process'; -import * as path from 'path'; -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (targetDirectory: string) => { - const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); - const fsprojPath = path.join(targetDirectory, 'src', '%name.PascalCased%', '%name.PascalCased%.fsproj'); - - const child = child_process.spawn('dotnet', ['sln', slnPath, 'add', fsprojPath], { - // Need this for Windows where we want .cmd and .bat to be found as well. - shell: true, - stdio: ['ignore', 'pipe', 'inherit'], - }); - - await new Promise((resolve, reject) => { - const stdout = new Array(); - - child.stdout.on('data', chunk => { - process.stdout.write(chunk); - stdout.push(chunk); - }); - - child.once('error', reject); - - child.once('exit', code => { - if (code === 0) { - resolve(Buffer.concat(stdout).toString('utf-8')); - } else { - reject(new Error(`Could not add project %name.PascalCased%.fsproj to solution %name.PascalCased%.sln. Error code: ${code}`)); - } - }); - }); -}; diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj b/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj deleted file mode 100644 index 4edb9ddfe2e66..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - Exe - netcoreapp3.1 - - Major - - - - - - - - - - - - - - - - - - diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/go/%name%.template.go b/packages/aws-cdk/lib/init-templates/v1/sample-app/go/%name%.template.go deleted file mode 100644 index 5ac97c495740f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/go/%name%.template.go +++ /dev/null @@ -1,71 +0,0 @@ -package main - -import ( - "github.com/aws/aws-cdk-go/awscdk" - "github.com/aws/aws-cdk-go/awscdk/awssns" - "github.com/aws/aws-cdk-go/awscdk/awssnssubscriptions" - "github.com/aws/aws-cdk-go/awscdk/awssqs" - "github.com/aws/constructs-go/constructs/v3" - "github.com/aws/jsii-runtime-go" -) - -type %name.PascalCased%StackProps struct { - awscdk.StackProps -} - -func New%name.PascalCased%Stack(scope constructs.Construct, id string, props *%name.PascalCased%StackProps) awscdk.Stack { - var sprops awscdk.StackProps - if props != nil { - sprops = props.StackProps - } - stack := awscdk.NewStack(scope, &id, &sprops) - - - queue := awssqs.NewQueue(stack, jsii.String("%name.PascalCased%Queue"), &awssqs.QueueProps{ - VisibilityTimeout: awscdk.Duration_Seconds(jsii.Number(300)), - }) - - topic := awssns.NewTopic(stack, jsii.String("%name.PascalCased%Topic"), &awssns.TopicProps{}) - topic.AddSubscription(awssnssubscriptions.NewSqsSubscription(queue, &awssnssubscriptions.SqsSubscriptionProps{})) - - return stack -} - -func main() { - app := awscdk.NewApp(nil) - - New%name.PascalCased%Stack(app, "%name.PascalCased%Stack", &%name.PascalCased%StackProps{ - awscdk.StackProps{ - Env: env(), - }, - }) - - app.Synth(nil) -} - -// env determines the AWS environment (account+region) in which our stack is to -// be deployed. For more information see: https://docs.aws.amazon.com/cdk/latest/guide/environments.html -func env() *awscdk.Environment { - // If unspecified, this stack will be "environment-agnostic". - // Account/Region-dependent features and context lookups will not work, but a - // single synthesized template can be deployed anywhere. - //--------------------------------------------------------------------------- - return nil - - // Uncomment if you know exactly what account and region you want to deploy - // the stack to. This is the recommendation for production stacks. - //--------------------------------------------------------------------------- - // return &awscdk.Environment{ - // Account: jsii.String("123456789012"), - // Region: jsii.String("us-east-1"), - // } - - // Uncomment to specialize this stack for the AWS Account and Region that are - // implied by the current CLI configuration. This is recommended for dev - // stacks. - //--------------------------------------------------------------------------- - // return &awscdk.Environment{ - // Account: jsii.String(os.Getenv("CDK_DEFAULT_ACCOUNT")), - // Region: jsii.String(os.Getenv("CDK_DEFAULT_REGION")), - // } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/go/%name%_test.template.go b/packages/aws-cdk/lib/init-templates/v1/sample-app/go/%name%_test.template.go deleted file mode 100644 index 834f4830cf23e..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/go/%name%_test.template.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "testing" - - "github.com/aws/aws-cdk-go/awscdk" - "github.com/aws/aws-cdk-go/awscdk/assertions" - "github.com/aws/jsii-runtime-go" -) - -func Test%name.PascalCased%Stack(t *testing.T) { - // GIVEN - app := awscdk.NewApp(nil) - - // WHEN - stack := New%name.PascalCased%Stack(app, "MyStack", nil) - - // THEN - template := assertions.Template_FromStack(stack) - - template.HasResourceProperties(jsii.String("AWS::SQS::Queue"), map[string]interface{}{ - "VisibilityTimeout": 300, - }) - template.ResourceCountIs(jsii.String("AWS::SNS::Topic"), jsii.Number(1)) -} diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/go/go.template.mod b/packages/aws-cdk/lib/init-templates/v1/sample-app/go/go.template.mod deleted file mode 100644 index 5dbef39984826..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/go/go.template.mod +++ /dev/null @@ -1,9 +0,0 @@ -module %name% - -go 1.16 - -require ( - github.com/aws/aws-cdk-go/awscdk v%cdk-version%-devpreview - github.com/aws/constructs-go/constructs/v3 v3.3.71 - github.com/aws/jsii-runtime-go v1.26.0 -) diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/README.template.md b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/README.template.md deleted file mode 100644 index d73d043e81c0e..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/README.template.md +++ /dev/null @@ -1,23 +0,0 @@ -# Welcome to your CDK Java project! - -You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) -which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. - -It is a [Maven](https://maven.apache.org/) based project, so you can open this project with any Maven compatible Java IDE to build and run tests. - -## Tutorial -See [this useful workshop](https://cdkworkshop.com/50-java.html) on working with the AWS CDK for Java projects. - - -## Useful commands - - * `mvn package` compile and run tests - * `cdk ls` list all stacks in the app - * `cdk synth` emits the synthesized CloudFormation template - * `cdk deploy` deploy this stack to your default AWS account/region - * `cdk diff` compare deployed stack with current state - * `cdk docs` open CDK documentation - -Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/pom.xml b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/pom.xml deleted file mode 100644 index e25c5e7c23a9b..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - 4.0.0 - com.myorg - %name% - 0.1 - - UTF-8 - %cdk-version% - 5.7.1 - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - 1.8 - 1.8 - - - - org.codehaus.mojo - exec-maven-plugin - 3.0.0 - - com.myorg.%name.PascalCased%App - - - - - - - - software.amazon.awscdk - core - ${cdk.version} - - - - - software.amazon.awscdk - sns - ${cdk.version} - - - software.amazon.awscdk - sns-subscriptions - ${cdk.version} - - - software.amazon.awscdk - sqs - ${cdk.version} - - - software.amazon.awscdk - assertions - ${cdk.version} - test - - - - org.junit.jupiter - junit-jupiter - ${junit.version} - test - - - diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java deleted file mode 100644 index 9d8276ef625e4..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.myorg; - -import software.amazon.awscdk.core.App; - -public final class %name.PascalCased%App { - public static void main(final String[] args) { - App app = new App(); - - new %name.PascalCased%Stack(app, "%name.PascalCased%Stack"); - - app.synth(); - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java deleted file mode 100644 index 9f1e6e5ee6268..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.myorg; - -import software.amazon.awscdk.core.Construct; -import software.amazon.awscdk.core.Duration; -import software.amazon.awscdk.core.Stack; -import software.amazon.awscdk.core.StackProps; -import software.amazon.awscdk.services.sns.Topic; -import software.amazon.awscdk.services.sns.subscriptions.SqsSubscription; -import software.amazon.awscdk.services.sqs.Queue; - -public class %name.PascalCased%Stack extends Stack { - public %name.PascalCased%Stack(final Construct parent, final String id) { - this(parent, id, null); - } - - public %name.PascalCased%Stack(final Construct parent, final String id, final StackProps props) { - super(parent, id, props); - - final Queue queue = Queue.Builder.create(this, "%name.PascalCased%Queue") - .visibilityTimeout(Duration.seconds(300)) - .build(); - - final Topic topic = Topic.Builder.create(this, "%name.PascalCased%Topic") - .displayName("My First Topic Yeah") - .build(); - - topic.addSubscription(new SqsSubscription(queue)); - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java b/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java deleted file mode 100644 index 5cbbe8a127e4f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.myorg; - -import software.amazon.awscdk.core.App; -import software.amazon.awscdk.assertions.Template; -import software.amazon.awscdk.assertions.Match; -import java.io.IOException; - -import java.util.HashMap; - -import org.junit.jupiter.api.Test; - -public class %name.PascalCased%StackTest { - - @Test - public void testStack() throws IOException { - App app = new App(); - %name.PascalCased%Stack stack = new %name.PascalCased%Stack(app, "test"); - - Template template = Template.fromStack(stack); - - template.hasResourceProperties("AWS::SQS::Queue", new HashMap() {{ - put("VisibilityTimeout", 300); - }}); - template.resourceCountIs("AWS::SNS::Topic", 1); - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/README.template.md b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/README.template.md deleted file mode 100644 index a0b32e5815589..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/README.template.md +++ /dev/null @@ -1,17 +0,0 @@ -# Welcome to your CDK JavaScript project - -You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) -which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. The build step is not required when using JavaScript. - -## Tutorial - -See [this useful workshop](https://cdkworkshop.com/20-typescript.html) on working with the AWS CDK for Typescript projects. - -## Useful commands - -* `npm run test` perform the jest unit tests -* `cdk deploy` deploy this stack to your default AWS account/region -* `cdk diff` compare deployed stack with current state -* `cdk synth` emits the synthesized CloudFormation template diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/bin/%name%.template.js b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/bin/%name%.template.js deleted file mode 100644 index 7b10196e54f23..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/bin/%name%.template.js +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env node -const cdk = require('@aws-cdk/core'); -const { %name.PascalCased%Stack } = require('../lib/%name%-stack'); - -const app = new cdk.App(); -new %name.PascalCased%Stack(app, '%name.PascalCased%Stack'); diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/lib/%name%-stack.template.js b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/lib/%name%-stack.template.js deleted file mode 100644 index ef14c40799701..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/lib/%name%-stack.template.js +++ /dev/null @@ -1,25 +0,0 @@ -const sns = require('@aws-cdk/aws-sns'); -const subs = require('@aws-cdk/aws-sns-subscriptions'); -const sqs = require('@aws-cdk/aws-sqs'); -const cdk = require('@aws-cdk/core'); - -class %name.PascalCased%Stack extends cdk.Stack { - /** - * @param {cdk.App} scope - * @param {string} id - * @param {cdk.StackProps=} props - */ - constructor(scope, id, props) { - super(scope, id, props); - - const queue = new sqs.Queue(this, '%name.PascalCased%Queue', { - visibilityTimeout: cdk.Duration.seconds(300) - }); - - const topic = new sns.Topic(this, '%name.PascalCased%Topic'); - - topic.addSubscription(new subs.SqsSubscription(queue)); - } -} - -module.exports = { %name.PascalCased%Stack } diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/package.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/package.json deleted file mode 100644 index c90acf364b381..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "%name%", - "version": "0.1.0", - "bin": { - "%name%": "bin/%name%.js" - }, - "scripts": { - "build": "echo \"The build step is not required when using JavaScript!\" && exit 0", - "cdk": "cdk", - "test": "jest" - }, - "devDependencies": { - "@aws-cdk/assertions": "%cdk-version%", - "aws-cdk": "%cdk-version%", - "jest": "^27.5.1" - }, - "dependencies": { - "@aws-cdk/aws-sns": "%cdk-version%", - "@aws-cdk/aws-sns-subscriptions": "%cdk-version%", - "@aws-cdk/aws-sqs": "%cdk-version%", - "@aws-cdk/core": "%cdk-version%" - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/test/%name%.test.template.js b/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/test/%name%.test.template.js deleted file mode 100644 index 4e53341387c69..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/javascript/test/%name%.test.template.js +++ /dev/null @@ -1,25 +0,0 @@ -const { Template, Match } = require('@aws-cdk/assertions'); -const cdk = require('@aws-cdk/core'); -const %name.PascalCased% = require('../lib/%name%-stack'); - -test('SQS Queue Created', () => { - const app = new cdk.App(); - // WHEN - const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); - // THEN - const template = Template.fromStack(stack); - - template.hasResourceProperties('AWS::SQS::Queue', { - VisibilityTimeout: 300 - }); -}); - -test('SNS Topic Created', () => { - const app = new cdk.App(); - // WHEN - const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); - // THEN - const template = Template.fromStack(stack); - - template.resourceCountIs('AWS::SNS::Topic', 1); -}); diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py deleted file mode 100644 index ace9c193df291..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py +++ /dev/null @@ -1,24 +0,0 @@ -from aws_cdk import ( - aws_iam as iam, - aws_sqs as sqs, - aws_sns as sns, - aws_sns_subscriptions as subs, - core -) - - -class %name.PascalCased%Stack(core.Stack): - - def __init__(self, scope: core.Construct, construct_id: str, **kwargs) -> None: - super().__init__(scope, construct_id, **kwargs) - - queue = sqs.Queue( - self, "%name.PascalCased%Queue", - visibility_timeout=core.Duration.seconds(300), - ) - - topic = sns.Topic( - self, "%name.PascalCased%Topic" - ) - - topic.add_subscription(subs.SqsSubscription(queue)) diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/README.template.md b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/README.template.md deleted file mode 100644 index 0b737ad6a5651..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/README.template.md +++ /dev/null @@ -1,68 +0,0 @@ - -# Welcome to your CDK Python project! - -You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PythonModule%_stack`) -which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. - -This project is set up like a standard Python project. The initialization process also creates -a virtualenv within this project, stored under the .venv directory. To create the virtualenv -it assumes that there is a `python3` executable in your path with access to the `venv` package. -If for any reason the automatic creation of the virtualenv fails, you can create the virtualenv -manually once the init process completes. - -To manually create a virtualenv on MacOS and Linux: - -``` -$ %python-executable% -m venv .venv -``` - -After the init process completes and the virtualenv is created, you can use the following -step to activate your virtualenv. - -``` -$ source .venv/bin/activate -``` - -If you are a Windows platform, you would activate the virtualenv like this: - -``` -% .venv\Scripts\activate.bat -``` - -Once the virtualenv is activated, you can install the required dependencies. - -``` -$ pip install -r requirements.txt -``` - -At this point you can now synthesize the CloudFormation template for this code. - -``` -$ cdk synth -``` - -You can now begin exploring the source code, contained in the hello directory. -There is also a very trivial test included that can be run like this: - -``` -$ pytest -``` - -To add additional dependencies, for example other CDK libraries, just add to -your requirements.txt file and rerun the `pip install -r requirements.txt` -command. - -## Tutorial -See [this useful workshop](https://cdkworkshop.com/30-python.html) on working with the AWS CDK for Python projects. - -## Useful commands - - * `cdk ls` list all stacks in the app - * `cdk synth` emits the synthesized CloudFormation template - * `cdk deploy` deploy this stack to your default AWS account/region - * `cdk diff` compare deployed stack with current state - * `cdk docs` open CDK documentation - -Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/app.template.py b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/app.template.py deleted file mode 100644 index 808bc22af32e4..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/app.template.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python3 - -from aws_cdk import core - -from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack - - -app = core.App() -%name.PascalCased%Stack(app, "%name.StackName%") - -app.synth() diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/requirements.txt b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/requirements.txt deleted file mode 100644 index 6c20aced0687a..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -aws-cdk.core==%cdk-version% -aws-cdk.aws_iam==%cdk-version% -aws-cdk.aws_sqs==%cdk-version% -aws-cdk.aws_sns==%cdk-version% -aws-cdk.aws_sns_subscriptions==%cdk-version% -aws-cdk.aws_s3==%cdk-version% -aws-cdk.assertions==%cdk-version% diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py b/packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py deleted file mode 100644 index 99a6a26b4a15e..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py +++ /dev/null @@ -1,24 +0,0 @@ -from aws_cdk import ( - core, - assertions - ) - -from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack - - -def test_sqs_queue_created(): - app = core.App() - stack = %name.PascalCased%Stack(app, "%name.StackName%") - template = assertions.Template.from_stack(stack) - - template.has_resource_properties("AWS::SQS::Queue", { - "VisibilityTimeout": 300 - }) - - -def test_sns_topic_created(): - app = core.App() - stack = %name.PascalCased%Stack(app, "%name.StackName%") - template = assertions.Template.from_stack(stack) - - template.resource_count_is("AWS::SNS::Topic", 1) diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/README.template.md b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/README.template.md deleted file mode 100644 index e4b88733875af..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/README.template.md +++ /dev/null @@ -1,19 +0,0 @@ -# Welcome to your CDK TypeScript project - -You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) -which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. - -## Tutorial - -See [this useful workshop](https://cdkworkshop.com/20-typescript.html) on working with the AWS CDK for Typescript projects. - -## Useful commands - -* `npm run build` compile typescript to js -* `npm run watch` watch for changes and compile -* `npm run test` perform the jest unit tests -* `cdk deploy` deploy this stack to your default AWS account/region -* `cdk diff` compare deployed stack with current state -* `cdk synth` emits the synthesized CloudFormation template diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/bin/%name%.template.ts b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/bin/%name%.template.ts deleted file mode 100644 index e5a8898954256..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/bin/%name%.template.ts +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env node -import * as cdk from '@aws-cdk/core'; -import { %name.PascalCased%Stack } from '../lib/%name%-stack'; - -const app = new cdk.App(); -new %name.PascalCased%Stack(app, '%name.PascalCased%Stack'); diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/lib/%name%-stack.template.ts b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/lib/%name%-stack.template.ts deleted file mode 100644 index c6971d5499e24..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/lib/%name%-stack.template.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as sns from '@aws-cdk/aws-sns'; -import * as subs from '@aws-cdk/aws-sns-subscriptions'; -import * as sqs from '@aws-cdk/aws-sqs'; -import * as cdk from '@aws-cdk/core'; - -export class %name.PascalCased%Stack extends cdk.Stack { - constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { - super(scope, id, props); - - const queue = new sqs.Queue(this, '%name.PascalCased%Queue', { - visibilityTimeout: cdk.Duration.seconds(300) - }); - - const topic = new sns.Topic(this, '%name.PascalCased%Topic'); - - topic.addSubscription(new subs.SqsSubscription(queue)); - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/package.json b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/package.json deleted file mode 100644 index 4b59361dd3346..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "%name%", - "version": "0.1.0", - "bin": { - "%name%": "bin/%name%.js" - }, - "scripts": { - "build": "tsc", - "watch": "tsc -w", - "test": "jest", - "cdk": "cdk" - }, - "devDependencies": { - "aws-cdk": "%cdk-version%", - "@aws-cdk/assertions": "%cdk-version%", - "@types/jest": "^27.5.2", - "@types/node": "10.17.27", - "@types/prettier": "2.6.0", - "jest": "^27.5.1", - "ts-jest": "^27.1.4", - "ts-node": "^10.8.1", - "typescript": "~3.9.7" - }, - "dependencies": { - "@aws-cdk/aws-sns": "%cdk-version%", - "@aws-cdk/aws-sns-subscriptions": "%cdk-version%", - "@aws-cdk/aws-sqs": "%cdk-version%", - "@aws-cdk/core": "%cdk-version%" - } -} diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/sub-placeholders.hook.ts deleted file mode 100644 index 039bb00d6f43f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/sub-placeholders.hook.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (_, context) => { - // File cannot be named like regular template because it needs to be - // processed by dependency updaters. - await context.substitutePlaceholdersIn('package.json'); -}; diff --git a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/test/%name%.test.template.ts b/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/test/%name%.test.template.ts deleted file mode 100644 index 45cd6cca71ba4..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v1/sample-app/typescript/test/%name%.test.template.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Template, Match } from '@aws-cdk/assertions'; -import * as cdk from '@aws-cdk/core'; -import * as %name.PascalCased% from '../lib/%name%-stack'; - -test('SQS Queue Created', () => { - const app = new cdk.App(); - // WHEN - const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); - // THEN - const template = Template.fromStack(stack); - - template.hasResourceProperties('AWS::SQS::Queue', { - VisibilityTimeout: 300 - }); -}); - -test('SNS Topic Created', () => { - const app = new cdk.App(); - // WHEN - const stack = new %name.PascalCased%.%name.PascalCased%Stack(app, 'MyTestStack'); - // THEN - const template = Template.fromStack(stack); - - template.resourceCountIs('AWS::SNS::Topic', 1); -}); diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/csharp/.template.gitignore deleted file mode 100644 index a4609e7587f3c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/csharp/.template.gitignore +++ /dev/null @@ -1,342 +0,0 @@ -# CDK asset staging directory -.cdk.staging -cdk.out - -# Created by https://www.gitignore.io/api/csharp - -### Csharp ### -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - - -# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/README.md b/packages/aws-cdk/lib/init-templates/v2/app/csharp/README.md deleted file mode 100644 index d2eb4e9e33144..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/csharp/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Welcome to your CDK C# project! - -This is a blank project for CDK development with C#. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. - -It uses the [.NET Core CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. - -## Useful commands - -* `dotnet build src` compile this app -* `cdk deploy` deploy this stack to your default AWS account/region -* `cdk diff` compare deployed stack with current state -* `cdk synth` emits the synthesized CloudFormation template \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/app/csharp/cdk.template.json deleted file mode 100644 index 054ecec595e7c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/csharp/cdk.template.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "app": "dotnet run --project src/%name.PascalCased%/%name.PascalCased%.csproj", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "src/*/obj", - "src/*/bin", - "src/*.sln", - "src/*/GlobalSuppressions.cs", - "src/*/*.csproj" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%.template.sln deleted file mode 100644 index 2f92ebd9bda92..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%.template.sln +++ /dev/null @@ -1,18 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs b/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs deleted file mode 100644 index 26233fcb54b5c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs +++ /dev/null @@ -1 +0,0 @@ -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0026:Possible unassigned object created by 'new'", Justification = "Constructs add themselves to the scope in which they are created")] diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/.template.gitignore deleted file mode 100644 index a4609e7587f3c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/.template.gitignore +++ /dev/null @@ -1,342 +0,0 @@ -# CDK asset staging directory -.cdk.staging -cdk.out - -# Created by https://www.gitignore.io/api/csharp - -### Csharp ### -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - - -# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/README.md b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/README.md deleted file mode 100644 index 7054ece6a0f7a..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## Welcome to your CDK F# project! - -This is a blank project for CDK development with F#. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. - -It uses the [.NET Core CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. - -## Useful commands - -* `dotnet build src` compile this app -* `cdk ls` list all stacks in the app -* `cdk synth` emits the synthesized CloudFormation template -* `cdk deploy` deploy this stack to your default AWS account/region -* `cdk diff` compare deployed stack with current state -* `cdk docs` open CDK documentation - -Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/cdk.template.json deleted file mode 100644 index b7b6120fd4bca..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/cdk.template.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "app": "dotnet run --project src/%name.PascalCased%/%name.PascalCased%.fsproj", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "src/*/obj", - "src/*/bin", - "src/*.sln", - "src/*/*.fsproj" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%.template.sln deleted file mode 100644 index d73885e1eacb9..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%.template.sln +++ /dev/null @@ -1,18 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs deleted file mode 100644 index 5e4d9ef94e748..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs +++ /dev/null @@ -1,8 +0,0 @@ -namespace %name.PascalCased% - -open Amazon.CDK - -type %name.PascalCased%Stack(scope, id, props) as this = - inherit Stack(scope, id, props) - - // The code that defines your stack goes here diff --git a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/Program.template.fs b/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/Program.template.fs deleted file mode 100644 index dc618af3fbbf1..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/fsharp/src/%name.PascalCased%/Program.template.fs +++ /dev/null @@ -1,11 +0,0 @@ -open Amazon.CDK -open %name.PascalCased% - -[] -let main _ = - let app = App(null) - - %name.PascalCased%Stack(app, "%name.PascalCased%Stack", StackProps()) |> ignore - - app.Synth() |> ignore - 0 diff --git a/packages/aws-cdk/lib/init-templates/v2/app/go/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/go/.template.gitignore deleted file mode 100644 index 92fe1ec34b4b6..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/go/.template.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# go.sum should be committed -!go.sum - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/app/go/README.md b/packages/aws-cdk/lib/init-templates/v2/app/go/README.md deleted file mode 100644 index 5487d820bcc15..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/go/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Welcome to your CDK Go project! - -This is a blank project for CDK development with Go. - -**NOTICE**: Go support is still in Developer Preview. This implies that APIs may -change while we address early feedback from the community. We would love to hear -about your experience through GitHub issues. - -## Useful commands - - * `cdk deploy` deploy this stack to your default AWS account/region - * `cdk diff` compare deployed stack with current state - * `cdk synth` emits the synthesized CloudFormation template - * `go test` run unit tests diff --git a/packages/aws-cdk/lib/init-templates/v2/app/go/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/app/go/cdk.template.json deleted file mode 100644 index a25485ed0951b..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/go/cdk.template.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "app": "go mod download && go run %name%.go", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "go.mod", - "go.sum", - "**/*test.go" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/info.json b/packages/aws-cdk/lib/init-templates/v2/app/info.json deleted file mode 100644 index 1a96dac2b1103..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/info.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Template for a CDK Application", - "aliases": ["application", "default"] -} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/java/.template.gitignore deleted file mode 100644 index 1db21f162937f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/java/.template.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -.classpath.txt -target -.classpath -.project -.idea -.settings -.vscode -*.iml - -# CDK asset staging directory -.cdk.staging -cdk.out - diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/README.md b/packages/aws-cdk/lib/init-templates/v2/app/java/README.md deleted file mode 100644 index 516ef71a25f0b..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/java/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Welcome to your CDK Java project! - -This is a blank project for CDK development with Java. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. - -It is a [Maven](https://maven.apache.org/) based project, so you can open this project with any Maven compatible Java IDE to build and run tests. - -## Useful commands - - * `mvn package` compile and run tests - * `cdk ls` list all stacks in the app - * `cdk synth` emits the synthesized CloudFormation template - * `cdk deploy` deploy this stack to your default AWS account/region - * `cdk diff` compare deployed stack with current state - * `cdk docs` open CDK documentation - -Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v2/app/java/cdk.json b/packages/aws-cdk/lib/init-templates/v2/app/java/cdk.json deleted file mode 100644 index b21c3e47a9552..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/java/cdk.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "app": "mvn -e -q compile exec:java", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "target", - "pom.xml", - "src/test" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.gitignore deleted file mode 100644 index 21dc76264a308..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.npmignore deleted file mode 100644 index 5de422a0b42a0..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/javascript/.template.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/README.md b/packages/aws-cdk/lib/init-templates/v2/app/javascript/README.md deleted file mode 100644 index e275326a4243e..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/javascript/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Welcome to your CDK JavaScript project - -This is a blank project for CDK development with JavaScript. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. The build step is not required when using JavaScript. - -## Useful commands - -* `npm run test` perform the jest unit tests -* `cdk deploy` deploy this stack to your default AWS account/region -* `cdk diff` compare deployed stack with current state -* `cdk synth` emits the synthesized CloudFormation template diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/app/javascript/cdk.template.json deleted file mode 100644 index 6056727247dff..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/javascript/cdk.template.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "app": "node bin/%name%.js", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "jest.config.js", - "package*.json", - "yarn.lock", - "node_modules", - "test" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/javascript/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/v2/app/javascript/sub-placeholders.hook.ts deleted file mode 100644 index 039bb00d6f43f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/javascript/sub-placeholders.hook.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (_, context) => { - // File cannot be named like regular template because it needs to be - // processed by dependency updaters. - await context.substitutePlaceholdersIn('package.json'); -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/%name.PythonModule%/__init__.py b/packages/aws-cdk/lib/init-templates/v2/app/python/%name.PythonModule%/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/README.template.md b/packages/aws-cdk/lib/init-templates/v2/app/python/README.template.md deleted file mode 100644 index 778d1bcd2f424..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/python/README.template.md +++ /dev/null @@ -1,58 +0,0 @@ - -# Welcome to your CDK Python project! - -This is a blank project for CDK development with Python. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. - -This project is set up like a standard Python project. The initialization -process also creates a virtualenv within this project, stored under the `.venv` -directory. To create the virtualenv it assumes that there is a `python3` -(or `python` for Windows) executable in your path with access to the `venv` -package. If for any reason the automatic creation of the virtualenv fails, -you can create the virtualenv manually. - -To manually create a virtualenv on MacOS and Linux: - -``` -$ %python-executable% -m venv .venv -``` - -After the init process completes and the virtualenv is created, you can use the following -step to activate your virtualenv. - -``` -$ source .venv/bin/activate -``` - -If you are a Windows platform, you would activate the virtualenv like this: - -``` -% .venv\Scripts\activate.bat -``` - -Once the virtualenv is activated, you can install the required dependencies. - -``` -$ pip install -r requirements.txt -``` - -At this point you can now synthesize the CloudFormation template for this code. - -``` -$ cdk synth -``` - -To add additional dependencies, for example other CDK libraries, just add -them to your `setup.py` file and rerun the `pip install -r requirements.txt` -command. - -## Useful commands - - * `cdk ls` list all stacks in the app - * `cdk synth` emits the synthesized CloudFormation template - * `cdk deploy` deploy this stack to your default AWS account/region - * `cdk diff` compare deployed stack with current state - * `cdk docs` open CDK documentation - -Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/app/python/cdk.template.json deleted file mode 100644 index 1c467275741e1..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/python/cdk.template.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "app": "%python-executable% app.py", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "requirements*.txt", - "source.bat", - "**/__init__.py", - "python/__pycache__", - "tests" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/requirements-dev.txt b/packages/aws-cdk/lib/init-templates/v2/app/python/requirements-dev.txt deleted file mode 100644 index 927094516e657..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/python/requirements-dev.txt +++ /dev/null @@ -1 +0,0 @@ -pytest==6.2.5 diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/source.bat b/packages/aws-cdk/lib/init-templates/v2/app/python/source.bat deleted file mode 100644 index 9e1a83442abd7..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/python/source.bat +++ /dev/null @@ -1,13 +0,0 @@ -@echo off - -rem The sole purpose of this script is to make the command -rem -rem source .venv/bin/activate -rem -rem (which activates a Python virtualenv on Linux or Mac OS X) work on Windows. -rem On Windows, this command just runs this batch file (the argument is ignored). -rem -rem Now we don't need to document a Windows command for activating a virtualenv. - -echo Executing .venv\Scripts\activate.bat for you -.venv\Scripts\activate.bat diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/v2/app/python/sub-placeholders.hook.ts deleted file mode 100644 index 67bf2a9c6e8f4..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/python/sub-placeholders.hook.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (_, context) => { - // File cannot be named like regular template because it needs to be - // processed by dependency updaters. - await context.substitutePlaceholdersIn('requirements.txt'); -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/tests/__init__.py b/packages/aws-cdk/lib/init-templates/v2/app/python/tests/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/packages/aws-cdk/lib/init-templates/v2/app/python/tests/unit/__init__.py b/packages/aws-cdk/lib/init-templates/v2/app/python/tests/unit/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.gitignore deleted file mode 100644 index f60797b6a9168..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.js -!jest.config.js -*.d.ts -node_modules - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.npmignore deleted file mode 100644 index c1d6d45dcf388..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/typescript/.template.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -*.ts -!*.d.ts - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/README.md b/packages/aws-cdk/lib/init-templates/v2/app/typescript/README.md deleted file mode 100644 index 320efc02a9275..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/typescript/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Welcome to your CDK TypeScript project - -This is a blank project for CDK development with TypeScript. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. - -## Useful commands - -* `npm run build` compile typescript to js -* `npm run watch` watch for changes and compile -* `npm run test` perform the jest unit tests -* `cdk deploy` deploy this stack to your default AWS account/region -* `cdk diff` compare deployed stack with current state -* `cdk synth` emits the synthesized CloudFormation template diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/app/typescript/cdk.template.json deleted file mode 100644 index e9b5bea306944..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/typescript/cdk.template.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "app": "npx ts-node --prefer-ts-exts bin/%name%.ts", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "**/*.d.ts", - "**/*.js", - "tsconfig.json", - "package*.json", - "yarn.lock", - "node_modules", - "test" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/v2/app/typescript/jest.config.js deleted file mode 100644 index 08263b8954a42..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/typescript/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - testEnvironment: 'node', - roots: ['/test'], - testMatch: ['**/*.test.ts'], - transform: { - '^.+\\.tsx?$': 'ts-jest' - } -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/v2/app/typescript/sub-placeholders.hook.ts deleted file mode 100644 index 039bb00d6f43f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/typescript/sub-placeholders.hook.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (_, context) => { - // File cannot be named like regular template because it needs to be - // processed by dependency updaters. - await context.substitutePlaceholdersIn('package.json'); -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/app/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v2/app/typescript/tsconfig.json deleted file mode 100644 index 9f8e8beabd233..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/app/typescript/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "lib": [ - "es2018" - ], - "declaration": true, - "strict": true, - "noImplicitAny": true, - "strictNullChecks": true, - "noImplicitThis": true, - "alwaysStrict": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": false, - "inlineSourceMap": true, - "inlineSources": true, - "experimentalDecorators": true, - "strictPropertyInitialization": false, - "typeRoots": [ - "./node_modules/@types" - ] - }, - "exclude": [ - "node_modules", - "cdk.out" - ] -} diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/info.json b/packages/aws-cdk/lib/init-templates/v2/lib/info.json deleted file mode 100644 index ccc35fd2fe3fe..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/lib/info.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Template for a CDK Construct Library", - "aliases": "library" -} diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.gitignore deleted file mode 100644 index f60797b6a9168..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.js -!jest.config.js -*.d.ts -node_modules - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.npmignore deleted file mode 100644 index c1d6d45dcf388..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/.template.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -*.ts -!*.d.ts - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/jest.config.js deleted file mode 100644 index 08263b8954a42..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - testEnvironment: 'node', - roots: ['/test'], - testMatch: ['**/*.test.ts'], - transform: { - '^.+\\.tsx?$': 'ts-jest' - } -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/sub-placeholders.hook.ts deleted file mode 100644 index 039bb00d6f43f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/sub-placeholders.hook.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (_, context) => { - // File cannot be named like regular template because it needs to be - // processed by dependency updaters. - await context.substitutePlaceholdersIn('package.json'); -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v2/lib/typescript/tsconfig.json deleted file mode 100644 index 9f8e8beabd233..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/lib/typescript/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "lib": [ - "es2018" - ], - "declaration": true, - "strict": true, - "noImplicitAny": true, - "strictNullChecks": true, - "noImplicitThis": true, - "alwaysStrict": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": false, - "inlineSourceMap": true, - "inlineSources": true, - "experimentalDecorators": true, - "strictPropertyInitialization": false, - "typeRoots": [ - "./node_modules/@types" - ] - }, - "exclude": [ - "node_modules", - "cdk.out" - ] -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/.template.gitignore deleted file mode 100644 index a4609e7587f3c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/.template.gitignore +++ /dev/null @@ -1,342 +0,0 @@ -# CDK asset staging directory -.cdk.staging -cdk.out - -# Created by https://www.gitignore.io/api/csharp - -### Csharp ### -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - - -# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/add-project.hook.ts deleted file mode 100644 index 37b1fe6ad3e5f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/add-project.hook.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as child_process from 'child_process'; -import * as path from 'path'; -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (targetDirectory: string) => { - const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); - const csprojPath = path.join(targetDirectory, 'src', '%name.PascalCased%', '%name.PascalCased%.csproj'); - - const child = child_process.spawn('dotnet', ['sln', slnPath, 'add', csprojPath], { - // Need this for Windows where we want .cmd and .bat to be found as well. - shell: true, - stdio: ['ignore', 'pipe', 'inherit'], - }); - - await new Promise((resolve, reject) => { - const stdout = new Array(); - - child.stdout.on('data', chunk => { - process.stdout.write(chunk); - stdout.push(chunk); - }); - - child.once('error', reject); - - child.once('exit', code => { - if (code === 0) { - resolve(Buffer.concat(stdout).toString('utf-8')); - } else { - reject(new Error(`Could not add project %name.PascalCased%.csproj to solution %name.PascalCased%.sln. Error code: ${code}`)); - } - }); - }); -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/cdk.template.json deleted file mode 100644 index 054ecec595e7c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/cdk.template.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "app": "dotnet run --project src/%name.PascalCased%/%name.PascalCased%.csproj", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "src/*/obj", - "src/*/bin", - "src/*.sln", - "src/*/GlobalSuppressions.cs", - "src/*/*.csproj" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%.template.sln deleted file mode 100644 index 2f92ebd9bda92..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%.template.sln +++ /dev/null @@ -1,18 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs deleted file mode 100644 index 26233fcb54b5c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs +++ /dev/null @@ -1 +0,0 @@ -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0026:Possible unassigned object created by 'new'", Justification = "Constructs add themselves to the scope in which they are created")] diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/Program.template.cs deleted file mode 100644 index 20d5337f09888..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/csharp/src/%name.PascalCased%/Program.template.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Amazon.CDK; - -namespace %name.PascalCased% -{ - sealed class Program - { - public static void Main(string[] args) - { - var app = new App(); - new %name.PascalCased%Stack(app, "%name.PascalCased%Stack"); - - app.Synth(); - } - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/.template.gitignore deleted file mode 100644 index a4609e7587f3c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/.template.gitignore +++ /dev/null @@ -1,342 +0,0 @@ -# CDK asset staging directory -.cdk.staging -cdk.out - -# Created by https://www.gitignore.io/api/csharp - -### Csharp ### -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# JetBrains Rider -.idea/ -*.sln.iml - -# CodeRush -.cr/ - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - - -# End of https://www.gitignore.io/api/csharp \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/README.template.md b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/README.template.md deleted file mode 100644 index d1bfcf9a90ccf..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/README.template.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Welcome to your CDK F# project! - -You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`%name.PascalCased%Stack`) -which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. - -The `cdk.json` file tells the CDK Toolkit how to execute your app. - -It uses the [.NET Core CLI](https://docs.microsoft.com/dotnet/articles/core/) to compile and execute your project. - -## Useful commands - -* `dotnet build src` compile this app -* `cdk ls` list all stacks in the app -* `cdk synth` emits the synthesized CloudFormation template -* `cdk deploy` deploy this stack to your default AWS account/region -* `cdk diff` compare deployed stack with current state -* `cdk docs` open CDK documentation - -Enjoy! diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/add-project.hook.ts b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/add-project.hook.ts deleted file mode 100644 index b9b091fa35ff1..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/add-project.hook.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as child_process from 'child_process'; -import * as path from 'path'; -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (targetDirectory: string) => { - const slnPath = path.join(targetDirectory, 'src', '%name.PascalCased%.sln'); - const fsprojPath = path.join(targetDirectory, 'src', '%name.PascalCased%', '%name.PascalCased%.fsproj'); - - const child = child_process.spawn('dotnet', ['sln', slnPath, 'add', fsprojPath], { - // Need this for Windows where we want .cmd and .bat to be found as well. - shell: true, - stdio: ['ignore', 'pipe', 'inherit'], - }); - - await new Promise((resolve, reject) => { - const stdout = new Array(); - - child.stdout.on('data', chunk => { - process.stdout.write(chunk); - stdout.push(chunk); - }); - - child.once('error', reject); - - child.once('exit', code => { - if (code === 0) { - resolve(Buffer.concat(stdout).toString('utf-8')); - } else { - reject(new Error(`Could not add project %name.PascalCased%.fsproj to solution %name.PascalCased%.sln. Error code: ${code}`)); - } - }); - }); -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/cdk.template.json deleted file mode 100644 index b7b6120fd4bca..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/cdk.template.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "app": "dotnet run --project src/%name.PascalCased%/%name.PascalCased%.fsproj", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "src/*/obj", - "src/*/bin", - "src/*.sln", - "src/*/*.fsproj" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%.template.sln b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%.template.sln deleted file mode 100644 index d73885e1eacb9..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%.template.sln +++ /dev/null @@ -1,18 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs deleted file mode 100644 index 1582e37f4faaf..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs +++ /dev/null @@ -1,14 +0,0 @@ -namespace %name.PascalCased% - -open Amazon.CDK -open Amazon.CDK.AWS.SNS -open Amazon.CDK.AWS.SNS.Subscriptions -open Amazon.CDK.AWS.SQS - -type %name.PascalCased%Stack(scope, id, props) as this = - inherit Stack(scope, id, props) - - let queue = Queue(this, "%name.PascalCased%Queue", QueueProps(VisibilityTimeout = Duration.Seconds(300.))) - - let topic = Topic(this, "%name.PascalCased%Topic") - do topic.AddSubscription(SqsSubscription(queue)) diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs b/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs deleted file mode 100644 index dc618af3fbbf1..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs +++ /dev/null @@ -1,11 +0,0 @@ -open Amazon.CDK -open %name.PascalCased% - -[] -let main _ = - let app = App(null) - - %name.PascalCased%Stack(app, "%name.PascalCased%Stack", StackProps()) |> ignore - - app.Synth() |> ignore - 0 diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/go/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/go/.template.gitignore deleted file mode 100644 index 92fe1ec34b4b6..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/go/.template.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# go.sum should be committed -!go.sum - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/go/README.md b/packages/aws-cdk/lib/init-templates/v2/sample-app/go/README.md deleted file mode 100644 index 9b8d4b29f26e3..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/go/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Welcome to your CDK Go project! - -This is a blank project for Go development with CDK. - -**NOTICE**: Go support is still in Developer Preview. This implies that APIs may -change while we address early feedback from the community. We would love to hear -about your experience through GitHub issues. - -## Useful commands - - * `cdk deploy` deploy this stack to your default AWS account/region - * `cdk diff` compare deployed stack with current state - * `cdk synth` emits the synthesized CloudFormation template - * `go test` run unit tests diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/go/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/go/cdk.template.json deleted file mode 100644 index a25485ed0951b..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/go/cdk.template.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "app": "go mod download && go run %name%.go", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "go.mod", - "go.sum", - "**/*test.go" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/info.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/info.json deleted file mode 100644 index 1451c2576eb63..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/info.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Example CDK Application with some constructs", - "aliases": ["sample", "example"] -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/.template.gitignore deleted file mode 100644 index 1db21f162937f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/.template.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -.classpath.txt -target -.classpath -.project -.idea -.settings -.vscode -*.iml - -# CDK asset staging directory -.cdk.staging -cdk.out - diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/cdk.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/cdk.json deleted file mode 100644 index b21c3e47a9552..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/cdk.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "app": "mvn -e -q compile exec:java", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "target", - "pom.xml", - "src/test" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/v2/sample-app/java/sub-placeholders.hook.ts deleted file mode 100644 index 98c27ef042b9c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/java/sub-placeholders.hook.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (_, context) => { - // File cannot be named like regular template because it needs to be - // processed by dependency updaters. - await context.substitutePlaceholdersIn('pom.xml'); -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.gitignore deleted file mode 100644 index 21dc76264a308..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.npmignore deleted file mode 100644 index 5de422a0b42a0..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/.template.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/cdk.template.json deleted file mode 100644 index 6056727247dff..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/cdk.template.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "app": "node bin/%name%.js", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "jest.config.js", - "package*.json", - "yarn.lock", - "node_modules", - "test" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/jest.config.js b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/jest.config.js deleted file mode 100644 index 95495de92eb8c..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - testEnvironment: 'node' -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/sub-placeholders.hook.ts deleted file mode 100644 index 039bb00d6f43f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/sub-placeholders.hook.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (_, context) => { - // File cannot be named like regular template because it needs to be - // processed by dependency updaters. - await context.substitutePlaceholdersIn('package.json'); -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/tsconfig.json deleted file mode 100644 index 47ad92078bbef..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/javascript/tsconfig.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "lib": [ - "es2016", - "es2017.object", - "es2017.string" - ], - "declaration": true, - "strict": true, - "noImplicitAny": true, - "strictNullChecks": true, - "noImplicitThis": true, - "alwaysStrict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": false, - "inlineSourceMap": true, - "inlineSources": true, - "experimentalDecorators": true, - "strictPropertyInitialization": false, - "allowJs": true, - "checkJs": true, - "noEmit": true, - "typeRoots": [ - "./node_modules/@types" - ] - }, - "exclude": [ - "node_modules", - "cdk.out" - ] -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/%name.PythonModule%/__init__.py b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/%name.PythonModule%/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/.template.gitignore deleted file mode 100644 index 95f954427c747..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/.template.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -*.swp -package-lock.json -.pytest_cache -*.egg-info - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# CDK Context & Staging files -.cdk.staging/ -cdk.out/ \ No newline at end of file diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/cdk.template.json deleted file mode 100644 index 1c467275741e1..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/cdk.template.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "app": "%python-executable% app.py", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "requirements*.txt", - "source.bat", - "**/__init__.py", - "python/__pycache__", - "tests" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/requirements-dev.txt b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/requirements-dev.txt deleted file mode 100644 index 927094516e657..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/requirements-dev.txt +++ /dev/null @@ -1 +0,0 @@ -pytest==6.2.5 diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/source.bat b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/source.bat deleted file mode 100644 index 9e1a83442abd7..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/source.bat +++ /dev/null @@ -1,13 +0,0 @@ -@echo off - -rem The sole purpose of this script is to make the command -rem -rem source .venv/bin/activate -rem -rem (which activates a Python virtualenv on Linux or Mac OS X) work on Windows. -rem On Windows, this command just runs this batch file (the argument is ignored). -rem -rem Now we don't need to document a Windows command for activating a virtualenv. - -echo Executing .venv\Scripts\activate.bat for you -.venv\Scripts\activate.bat diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/sub-placeholders.hook.ts deleted file mode 100644 index 67bf2a9c6e8f4..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/sub-placeholders.hook.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (_, context) => { - // File cannot be named like regular template because it needs to be - // processed by dependency updaters. - await context.substitutePlaceholdersIn('requirements.txt'); -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/__init__.py b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/unit/__init__.py b/packages/aws-cdk/lib/init-templates/v2/sample-app/python/tests/unit/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.gitignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.gitignore deleted file mode 100644 index f60797b6a9168..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.js -!jest.config.js -*.d.ts -node_modules - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.npmignore b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.npmignore deleted file mode 100644 index c1d6d45dcf388..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/.template.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -*.ts -!*.d.ts - -# CDK asset staging directory -.cdk.staging -cdk.out diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/cdk.template.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/cdk.template.json deleted file mode 100644 index e9b5bea306944..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/cdk.template.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "app": "npx ts-node --prefer-ts-exts bin/%name%.ts", - "watch": { - "include": ["**"], - "exclude": [ - "README.md", - "cdk*.json", - "**/*.d.ts", - "**/*.js", - "tsconfig.json", - "package*.json", - "yarn.lock", - "node_modules", - "test" - ] - } -} diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/jest.config.js b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/jest.config.js deleted file mode 100644 index 08263b8954a42..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - testEnvironment: 'node', - roots: ['/test'], - testMatch: ['**/*.test.ts'], - transform: { - '^.+\\.tsx?$': 'ts-jest' - } -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/sub-placeholders.hook.ts b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/sub-placeholders.hook.ts deleted file mode 100644 index 039bb00d6f43f..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/sub-placeholders.hook.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InvokeHook } from '../../../../init'; - -export const invoke: InvokeHook = async (_, context) => { - // File cannot be named like regular template because it needs to be - // processed by dependency updaters. - await context.substitutePlaceholdersIn('package.json'); -}; diff --git a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/tsconfig.json b/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/tsconfig.json deleted file mode 100644 index 9f8e8beabd233..0000000000000 --- a/packages/aws-cdk/lib/init-templates/v2/sample-app/typescript/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "lib": [ - "es2018" - ], - "declaration": true, - "strict": true, - "noImplicitAny": true, - "strictNullChecks": true, - "noImplicitThis": true, - "alwaysStrict": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": false, - "inlineSourceMap": true, - "inlineSources": true, - "experimentalDecorators": true, - "strictPropertyInitialization": false, - "typeRoots": [ - "./node_modules/@types" - ] - }, - "exclude": [ - "node_modules", - "cdk.out" - ] -} diff --git a/packages/aws-cdk/lib/init.ts b/packages/aws-cdk/lib/init.ts index 98c7e2d9cf80a..0a6d1dc0cf458 100644 --- a/packages/aws-cdk/lib/init.ts +++ b/packages/aws-cdk/lib/init.ts @@ -3,11 +3,9 @@ import * as path from 'path'; import * as cxapi from '@aws-cdk/cx-api'; import * as chalk from 'chalk'; import * as fs from 'fs-extra'; -import * as semver from 'semver'; import { error, print, warning } from './logging'; import { cdkHomeDir, rootDir } from './util/directories'; import { rangeFromSemver } from './util/version-range'; -import { versionNumber } from './version'; export type SubstitutePlaceholders = (...fileNames: string[]) => Promise; @@ -242,22 +240,9 @@ interface ProjectInfo { readonly name: string; } -function versionedTemplatesDir(): Promise { - return new Promise(async resolve => { - let currentVersion = versionNumber(); - // If the CLI is invoked from source (i.e., developement), rather than from a packaged distribution, - // the version number will be '0.0.0'. We will (currently) default to the v1 templates in this case. - if (currentVersion === '0.0.0') { - currentVersion = '1.0.0'; - } - const majorVersion = semver.major(currentVersion); - resolve(path.join(rootDir(), 'lib', 'init-templates', `v${majorVersion}`)); - }); -} - export async function availableInitTemplates(): Promise { return new Promise(async resolve => { - const templatesDir = await versionedTemplatesDir(); + const templatesDir = path.join(rootDir(), 'lib', 'init-templates'); const templateNames = await listDirectory(templatesDir); const templates = new Array(); for (const templateName of templateNames) { @@ -286,6 +271,7 @@ export async function availableInitLanguages(): Promise { async function listDirectory(dirPath: string) { return (await fs.readdir(dirPath)) .filter(p => !p.startsWith('.')) + .filter(p => !(p === 'LICENSE')) .sort(); } diff --git a/packages/aws-cdk/lib/util/directories.ts b/packages/aws-cdk/lib/util/directories.ts index 1ca2377092c24..a2327f5d292bc 100644 --- a/packages/aws-cdk/lib/util/directories.ts +++ b/packages/aws-cdk/lib/util/directories.ts @@ -2,10 +2,26 @@ import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; +/** + * Return a location that will be used as the CDK home directory. + * Currently the only thing that is placed here is the cache. + * + * First try to use the users home directory (i.e. /home/someuser/), + * but if that directory does not exist for some reason create a tmp directory. + * + * Typically it wouldn't make sense to create a one time use tmp directory for + * the purpose of creating a cache, but since this only applies to users that do + * not have a home directory (some CI systems?) this should be fine. + */ export function cdkHomeDir() { + const tmpDir = fs.realpathSync(os.tmpdir()); + let home; + try { + home = path.join((os.userInfo().homedir ?? os.homedir()).trim(), '.cdk'); + } catch {} return process.env.CDK_HOME ? path.resolve(process.env.CDK_HOME) - : path.join((os.userInfo().homedir ?? os.homedir()).trim() || '/', '.cdk'); + : home || fs.mkdtempSync(path.join(tmpDir, '.cdk')).trim(); } export function cdkCacheDir() { @@ -26,4 +42,4 @@ export function rootDir() { } return _rootDir(__dirname); -} \ No newline at end of file +} diff --git a/packages/aws-cdk/test/api/deploy-stack.test.ts b/packages/aws-cdk/test/api/deploy-stack.test.ts index 77f6c80755ac2..a8642e3d598a4 100644 --- a/packages/aws-cdk/test/api/deploy-stack.test.ts +++ b/packages/aws-cdk/test/api/deploy-stack.test.ts @@ -1,8 +1,8 @@ import { deployStack, DeployStackOptions, ToolkitInfo } from '../../lib/api'; import { tryHotswapDeployment } from '../../lib/api/hotswap-deployments'; +import { setCI } from '../../lib/logging'; import { DEFAULT_FAKE_TEMPLATE, testStack } from '../util'; import { MockedObject, mockResolvedEnvironment, MockSdk, MockSdkProvider, SyncHandlerSubsetOf } from '../util/mock-sdk'; -import { setCI } from '../../lib/logging'; jest.mock('../../lib/api/hotswap-deployments'); diff --git a/packages/aws-cdk/test/init.test.ts b/packages/aws-cdk/test/init.test.ts index 6341d708259b0..fc4750beef69f 100644 --- a/packages/aws-cdk/test/init.test.ts +++ b/packages/aws-cdk/test/init.test.ts @@ -1,25 +1,10 @@ -/** - * The init templates rely on parsing the current major version to find the correct template directory. - * During tests, the current package version is '0.0.0', rather than a specific version. - * The below mocks the versionNumber to return the major version (and so init template version) specified. - */ -let mockMajorVersion = '1.0.0'; -jest.mock('../lib/version', () => ({ - versionNumber: () => mockMajorVersion, -})); - import * as os from 'os'; import * as path from 'path'; import * as cxapi from '@aws-cdk/cx-api'; import * as fs from 'fs-extra'; import { availableInitTemplates, cliInit } from '../lib/init'; -describe.each(['1', '2'])('v%s tests', (majorVersion) => { - beforeEach(() => { - mockMajorVersion = `${majorVersion}.0.0`; - jest.resetAllMocks(); - }); - +describe('constructs version', () => { cliTest('create a TypeScript library project', async (workDir) => { await cliInit('lib', 'typescript', false, undefined /* canUseNetwork */, workDir); @@ -45,6 +30,68 @@ describe.each(['1', '2'])('v%s tests', (majorVersion) => { expect(await fs.pathExists(path.join(workDir, '.git'))).toBeTruthy(); }); + cliTest('create a Java app project', async (workDir) => { + await cliInit('app', 'java', false, true, workDir); + + expect(await fs.pathExists(path.join(workDir, 'pom.xml'))).toBeTruthy(); + + const pom = (await fs.readFile(path.join(workDir, 'pom.xml'), 'utf8')).split(/\r?\n/); + const matches = pom.map(line => line.match(/\(.*)\<\/constructs\.version\>/)) + .filter(l => l); + + expect(matches.length).toEqual(1); + matches.forEach(m => { + const version = m && m[1]; + expect(version).toMatch(/\[10\.[\d]+\.[\d]+,11\.0\.0\)/); + }); + }); + + cliTest('create a .NET app project in csharp', async (workDir) => { + await cliInit('app', 'csharp', false, true, workDir); + + const csprojFile = (await recursiveListFiles(workDir)).filter(f => f.endsWith('.csproj'))[0]; + const slnFile = (await recursiveListFiles(workDir)).filter(f => f.endsWith('.sln'))[0]; + expect(csprojFile).toBeDefined(); + expect(slnFile).toBeDefined(); + + const csproj = (await fs.readFile(csprojFile, 'utf8')).split(/\r?\n/); + const sln = (await fs.readFile(slnFile, 'utf8')).split(/\r?\n/); + + expect(csproj).toContainEqual(expect.stringMatching(/\ { + await cliInit('app', 'fsharp', false, true, workDir); + + const fsprojFile = (await recursiveListFiles(workDir)).filter(f => f.endsWith('.fsproj'))[0]; + const slnFile = (await recursiveListFiles(workDir)).filter(f => f.endsWith('.sln'))[0]; + expect(fsprojFile).toBeDefined(); + expect(slnFile).toBeDefined(); + + const fsproj = (await fs.readFile(fsprojFile, 'utf8')).split(/\r?\n/); + const sln = (await fs.readFile(slnFile, 'utf8')).split(/\r?\n/); + + expect(fsproj).toContainEqual(expect.stringMatching(/\ { + await cliInit('app', 'python', false, true, workDir); + + expect(await fs.pathExists(path.join(workDir, 'requirements.txt'))).toBeTruthy(); + const setupPy = (await fs.readFile(path.join(workDir, 'requirements.txt'), 'utf8')).split(/\r?\n/); + // return RegExpMatchArray (result of line.match()) for every lines that match re. + const matches = setupPy.map(line => line.match(/^constructs(.*)/)) + .filter(l => l); + + expect(matches.length).toEqual(1); + matches.forEach(m => { + const version = m && m[1]; + expect(version).toMatch(/>=10\.\d+\.\d,<11\.0\.0/); + }); + }); + cliTest('--generate-only should skip git init', async (workDir) => { await cliInit('app', 'javascript', false, true, workDir); @@ -99,59 +146,7 @@ describe.each(['1', '2'])('v%s tests', (majorVersion) => { 30_000); }); -describe('constructs version', () => { - beforeEach(() => { - mockMajorVersion = '2.0.0'; - jest.resetAllMocks(); - }); - - cliTest('java', async (workDir) => { - await cliInit('app', 'java', false, true, workDir); - - expect(await fs.pathExists(path.join(workDir, 'pom.xml'))).toBeTruthy(); - - const pom = (await fs.readFile(path.join(workDir, 'pom.xml'), 'utf8')).split(/\r?\n/); - const matches = pom.map(line => line.match(/\(.*)\<\/constructs\.version\>/)) - .filter(l => l); - - expect(matches.length).toEqual(1); - matches.forEach(m => { - const version = m && m[1]; - expect(version).toMatch(/\[10\.[\d]+\.[\d]+,11\.0\.0\)/); - }); - }); - - cliTest('.NET', async (workDir) => { - await cliInit('app', 'csharp', false, true, workDir); - - const csprojFile = (await recursiveListFiles(workDir)).filter(f => f.endsWith('.csproj'))[0]; - expect(csprojFile).toBeDefined(); - - const csproj = (await fs.readFile(csprojFile, 'utf8')).split(/\r?\n/); - - expect(csproj).toContainEqual(expect.stringMatching(/\ { - await cliInit('app', 'python', false, true, workDir); - - expect(await fs.pathExists(path.join(workDir, 'requirements.txt'))).toBeTruthy(); - const setupPy = (await fs.readFile(path.join(workDir, 'requirements.txt'), 'utf8')).split(/\r?\n/); - // return RegExpMatchArray (result of line.match()) for every lines that match re. - const matches = setupPy.map(line => line.match(/^constructs(.*)/)) - .filter(l => l); - - expect(matches.length).toEqual(1); - matches.forEach(m => { - const version = m && m[1]; - expect(version).toMatch(/>=10\.\d+\.\d,<11\.0\.0/); - }); - }); -}); - -test('when no version number is present (e.g., local development), the v1 templates are chosen by default', async () => { - mockMajorVersion = '0.0.0'; - jest.resetAllMocks(); +test('when no version number is present (e.g., local development), the v2 templates are chosen by default', async () => { expect((await availableInitTemplates()).length).toBeGreaterThan(0); }); diff --git a/packages/aws-cdk/test/integ/cli/cli.integtest.ts b/packages/aws-cdk/test/integ/cli/cli.integtest.ts index 4b9d276eb3496..c2799525a452c 100644 --- a/packages/aws-cdk/test/integ/cli/cli.integtest.ts +++ b/packages/aws-cdk/test/integ/cli/cli.integtest.ts @@ -518,6 +518,43 @@ integTest('cdk diff', withDefaultFixture(async (fixture) => { .rejects.toThrow('exited with error'); })); +integTest('enableDiffNoFail', withDefaultFixture(async (fixture) => { + await diffShouldSucceedWith({ fail: false, enableDiffNoFail: false }); + await diffShouldSucceedWith({ fail: false, enableDiffNoFail: true }); + await diffShouldFailWith({ fail: true, enableDiffNoFail: false }); + await diffShouldFailWith({ fail: true, enableDiffNoFail: true }); + await diffShouldFailWith({ fail: undefined, enableDiffNoFail: false }); + await diffShouldSucceedWith({ fail: undefined, enableDiffNoFail: true }); + + async function diffShouldSucceedWith(props: DiffParameters) { + await expect(diff(props)).resolves.not.toThrowError(); + } + + async function diffShouldFailWith(props: DiffParameters) { + await expect(diff(props)).rejects.toThrow('exited with error'); + } + + async function diff(props: DiffParameters): Promise { + await updateContext(props.enableDiffNoFail); + const flag = props.fail != null + ? (props.fail ? '--fail' : '--no-fail') + : ''; + + return fixture.cdk(['diff', flag, fixture.fullStackName('test-1')]); + } + + async function updateContext(enableDiffNoFail: boolean) { + const cdkJson = JSON.parse(await fs.readFile(path.join(fixture.integTestDir, 'cdk.json'), 'utf8')); + cdkJson.context = { + ...cdkJson.context, + 'aws-cdk:enableDiffNoFail': enableDiffNoFail, + }; + await fs.writeFile(path.join(fixture.integTestDir, 'cdk.json'), JSON.stringify(cdkJson)); + } + + type DiffParameters = { fail?: boolean, enableDiffNoFail: boolean }; +})); + integTest('cdk diff --fail on multiple stacks exits with error if any of the stacks contains a diff', withDefaultFixture(async (fixture) => { // GIVEN const diff1 = await fixture.cdk(['diff', fixture.fullStackName('test-1')]); diff --git a/version.v2.json b/version.v2.json index 5ed2492d87113..da020dcf6c61f 100644 --- a/version.v2.json +++ b/version.v2.json @@ -1,4 +1,4 @@ { - "version": "2.30.0", - "alphaVersion": "2.30.0-alpha.0" + "version": "2.31.1", + "alphaVersion": "2.31.1-alpha.0" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0112f3630e7e6..b946d9adf6fba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3044,17 +3044,18 @@ cdk-generate-synthetic-examples@^0.1.12: jsii-rosetta "^1.59.0" yargs "^17.5.1" -cdk8s-plus-21@^1.0.0-beta.186: - version "1.0.0-beta.186" - resolved "https://registry.npmjs.org/cdk8s-plus-21/-/cdk8s-plus-21-1.0.0-beta.186.tgz#c97555ea5cf8abd4d15b2c6459bc1fc2dce110d5" - integrity sha512-aSzl3YPcgyxHOwXTGUHcErm5Y585UVdxl91VoTGuGDmMq/PaS5DCRlQz7DHxA9PZKMtUEVHTXDkWyJHlQikPag== +cdk8s-plus-21@^2.0.0-beta.12: + version "2.0.0-beta.12" + resolved "https://registry.npmjs.org/cdk8s-plus-21/-/cdk8s-plus-21-2.0.0-beta.12.tgz#b209c2536e7907d37695498c644d862fa3f45ebf" + integrity sha512-PozWnkrD1A7p52XdpM3IOGHC9QqfHZVJ/jYtvek4Ffmx9evDe3F+BEwRppRE9CVy4K3EUrCB5C6dkdEl5h1E4Q== dependencies: minimatch "^3.1.2" + safe-stable-stringify "*" -cdk8s@^1.6.21: - version "1.6.21" - resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-1.6.21.tgz#8d6d3c8f5d5bc68f37aacf66afa4a4a2e6c4174e" - integrity sha512-VCXrTJaj7kd0c8TnEZf3MLcVMPyScCZDZvJKBR+evY8T3reCixxoBhsMMMkXE4Br7ByV2INkR04lMNiL+MbqGg== +cdk8s@^2.3.37: + version "2.3.37" + resolved "https://registry.npmjs.org/cdk8s/-/cdk8s-2.3.37.tgz#ff93d1c7a8c18ff2c3347454a58ea02ecb862122" + integrity sha512-JDX8yGCuu7GxKYDN84dkz1rgaEf0BcKPgJLbS2B7xYuLQThx4POUDxQdIh15CUqnunYnTa31V6avNj1q6juZvA== dependencies: fast-json-patch "^3.1.1" follow-redirects "^1.15.1" @@ -9691,7 +9692,7 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-stable-stringify@^2.2.0: +safe-stable-stringify@*, safe-stable-stringify@^2.2.0: version "2.3.1" resolved "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz#ab67cbe1fe7d40603ca641c5e765cb942d04fc73" integrity sha512-kYBSfT+troD9cDA85VDnHZ1rpHC50O0g1e6WlGHVCz/g+JS+9WKLj+XwFYyR8UbrZN8ll9HUpDAAddY58MGisg==