From ce52c7e1ac939dc2f9f08cb29fad0f2dc9714445 Mon Sep 17 00:00:00 2001 From: Michael Sambol Date: Fri, 8 Mar 2024 16:53:39 -0600 Subject: [PATCH 01/18] feat(opensearchservice): cold storage option (#29387) Closes #29366. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- ...efaultTestDeployAssert73848187.assets.json | 19 +++ ...aultTestDeployAssert73848187.template.json | 36 ++++ ...k-integ-opensearch-coldstorage.assets.json | 19 +++ ...integ-opensearch-coldstorage.template.json | 77 +++++++++ .../cdk.out | 1 + .../integ.json | 13 ++ .../manifest.json | 113 +++++++++++++ .../tree.json | 156 ++++++++++++++++++ .../test/integ.opensearch.coldstorage.ts | 30 ++++ .../aws-opensearchservice/README.md | 16 ++ .../aws-opensearchservice/lib/domain.ts | 16 ++ .../aws-opensearchservice/test/domain.test.ts | 73 ++++++++ 12 files changed, 569 insertions(+) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk-integ-opensearch-coldstorage.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk-integ-opensearch-coldstorage.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.assets.json new file mode 100644 index 0000000000000..62fc21e18c8b7 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk-integ-opensearch-coldstorage.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk-integ-opensearch-coldstorage.assets.json new file mode 100644 index 0000000000000..df1a2c07acf36 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk-integ-opensearch-coldstorage.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "7e6878d5f7b4ebd9d43019b5cc477889a4c2650e5094c35aca78e0131f9e7120": { + "source": { + "path": "cdk-integ-opensearch-coldstorage.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "7e6878d5f7b4ebd9d43019b5cc477889a4c2650e5094c35aca78e0131f9e7120.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk-integ-opensearch-coldstorage.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk-integ-opensearch-coldstorage.template.json new file mode 100644 index 0000000000000..1d9de13be4899 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk-integ-opensearch-coldstorage.template.json @@ -0,0 +1,77 @@ +{ + "Resources": { + "Domain66AC69E0": { + "Type": "AWS::OpenSearchService::Domain", + "Properties": { + "ClusterConfig": { + "ColdStorageOptions": { + "Enabled": true + }, + "DedicatedMasterCount": 2, + "DedicatedMasterEnabled": true, + "DedicatedMasterType": "r5.large.search", + "InstanceCount": 1, + "InstanceType": "r5.large.search", + "MultiAZWithStandbyEnabled": false, + "WarmCount": 2, + "WarmEnabled": true, + "WarmType": "ultrawarm1.medium.search", + "ZoneAwarenessEnabled": false + }, + "DomainEndpointOptions": { + "EnforceHTTPS": false, + "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" + }, + "EBSOptions": { + "EBSEnabled": true, + "VolumeSize": 10, + "VolumeType": "gp2" + }, + "EncryptionAtRestOptions": { + "Enabled": false + }, + "EngineVersion": "Elasticsearch_7.10", + "LogPublishingOptions": {}, + "NodeToNodeEncryptionOptions": { + "Enabled": false + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/integ.json new file mode 100644 index 0000000000000..a9af5e245b578 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/integ.json @@ -0,0 +1,13 @@ +{ + "version": "36.0.0", + "testCases": { + "OpenSearchColdStorageInteg/DefaultTest": { + "stacks": [ + "cdk-integ-opensearch-coldstorage" + ], + "diffAssets": true, + "assertionStack": "OpenSearchColdStorageInteg/DefaultTest/DeployAssert", + "assertionStackName": "OpenSearchColdStorageIntegDefaultTestDeployAssert73848187" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/manifest.json new file mode 100644 index 0000000000000..72a73308a1cd9 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/manifest.json @@ -0,0 +1,113 @@ +{ + "version": "36.0.0", + "artifacts": { + "cdk-integ-opensearch-coldstorage.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "cdk-integ-opensearch-coldstorage.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "cdk-integ-opensearch-coldstorage": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "cdk-integ-opensearch-coldstorage.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7e6878d5f7b4ebd9d43019b5cc477889a4c2650e5094c35aca78e0131f9e7120.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "cdk-integ-opensearch-coldstorage.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "cdk-integ-opensearch-coldstorage.assets" + ], + "metadata": { + "/cdk-integ-opensearch-coldstorage/Domain/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Domain66AC69E0" + } + ], + "/cdk-integ-opensearch-coldstorage/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/cdk-integ-opensearch-coldstorage/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "cdk-integ-opensearch-coldstorage" + }, + "OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "OpenSearchColdStorageIntegDefaultTestDeployAssert73848187": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "OpenSearchColdStorageIntegDefaultTestDeployAssert73848187.assets" + ], + "metadata": { + "/OpenSearchColdStorageInteg/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/OpenSearchColdStorageInteg/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "OpenSearchColdStorageInteg/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/tree.json new file mode 100644 index 0000000000000..79f397f06eb2f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.js.snapshot/tree.json @@ -0,0 +1,156 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "cdk-integ-opensearch-coldstorage": { + "id": "cdk-integ-opensearch-coldstorage", + "path": "cdk-integ-opensearch-coldstorage", + "children": { + "Domain": { + "id": "Domain", + "path": "cdk-integ-opensearch-coldstorage/Domain", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-integ-opensearch-coldstorage/Domain/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::OpenSearchService::Domain", + "aws:cdk:cloudformation:props": { + "clusterConfig": { + "coldStorageOptions": { + "enabled": true + }, + "dedicatedMasterEnabled": true, + "dedicatedMasterCount": 2, + "dedicatedMasterType": "r5.large.search", + "instanceCount": 1, + "instanceType": "r5.large.search", + "multiAzWithStandbyEnabled": false, + "warmEnabled": true, + "warmCount": 2, + "warmType": "ultrawarm1.medium.search", + "zoneAwarenessEnabled": false + }, + "domainEndpointOptions": { + "enforceHttps": false, + "tlsSecurityPolicy": "Policy-Min-TLS-1-0-2019-07" + }, + "ebsOptions": { + "ebsEnabled": true, + "volumeSize": 10, + "volumeType": "gp2" + }, + "encryptionAtRestOptions": { + "enabled": false + }, + "engineVersion": "Elasticsearch_7.10", + "logPublishingOptions": {}, + "nodeToNodeEncryptionOptions": { + "enabled": false + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "cdk-integ-opensearch-coldstorage/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "cdk-integ-opensearch-coldstorage/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "OpenSearchColdStorageInteg": { + "id": "OpenSearchColdStorageInteg", + "path": "OpenSearchColdStorageInteg", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "OpenSearchColdStorageInteg/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "OpenSearchColdStorageInteg/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "OpenSearchColdStorageInteg/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "OpenSearchColdStorageInteg/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "OpenSearchColdStorageInteg/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.ts new file mode 100644 index 0000000000000..ced1ac000523f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-opensearchservice/test/integ.opensearch.coldstorage.ts @@ -0,0 +1,30 @@ +import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import * as opensearch from 'aws-cdk-lib/aws-opensearchservice'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +class TestStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + new opensearch.Domain(this, 'Domain', { + removalPolicy: RemovalPolicy.DESTROY, + version: opensearch.EngineVersion.ELASTICSEARCH_7_10, + capacity: { + masterNodes: 2, + warmNodes: 2, + multiAzWithStandbyEnabled: false, + }, + coldStorageEnabled: true, + }); + } +} + +const app = new App(); +const stack = new TestStack(app, 'cdk-integ-opensearch-coldstorage'); + +new IntegTest(app, 'OpenSearchColdStorageInteg', { + testCases: [stack], + diffAssets: true, +}); +app.synth(); diff --git a/packages/aws-cdk-lib/aws-opensearchservice/README.md b/packages/aws-cdk-lib/aws-opensearchservice/README.md index f4450a3934987..e24f2df325e25 100644 --- a/packages/aws-cdk-lib/aws-opensearchservice/README.md +++ b/packages/aws-cdk-lib/aws-opensearchservice/README.md @@ -397,6 +397,22 @@ const domain = new Domain(this, 'Domain', { }); ``` +## Cold storage + +Cold storage can be enabled on the domain. You must enable UltraWarm storage to enable cold storage. + +```ts +const domain = new Domain(this, 'Domain', { + version: EngineVersion.OPENSEARCH_1_0, + capacity: { + masterNodes: 2, + warmNodes: 2, + warmInstanceType: 'ultrawarm1.medium.search', + }, + coldStorageEnabled: true, +}); +``` + ## Custom endpoint Custom endpoints can be configured to reach the domain under a custom domain name. diff --git a/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts b/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts index d9ae89e914459..be08ca406d525 100644 --- a/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts +++ b/packages/aws-cdk-lib/aws-opensearchservice/lib/domain.ts @@ -687,6 +687,15 @@ export interface DomainProps { * @default - false */ readonly suppressLogsResourcePolicy?: boolean; + + /** + * Whether to enable or disable cold storage on the domain. You must enable UltraWarm storage to enable cold storage. + * + * @see https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cold-storage.html + * + * @default - undefined + */ + readonly coldStorageEnabled?: boolean; } /** @@ -1700,6 +1709,10 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { throw new Error('Dedicated master node is required when UltraWarm storage is enabled.'); } + if (props.coldStorageEnabled && !warmEnabled) { + throw new Error('You must enable UltraWarm storage to enable cold storage.'); + } + let cfnVpcOptions: CfnDomain.VPCOptionsProperty | undefined; if (securityGroups && subnets) { @@ -1834,6 +1847,9 @@ export class Domain extends DomainBase implements IDomain, ec2.IConnectable { domainName: this.physicalName, engineVersion: props.version.version, clusterConfig: { + coldStorageOptions: props.coldStorageEnabled !== undefined ? { + enabled: props.coldStorageEnabled, + } : undefined, dedicatedMasterEnabled, dedicatedMasterCount: dedicatedMasterEnabled ? dedicatedMasterCount diff --git a/packages/aws-cdk-lib/aws-opensearchservice/test/domain.test.ts b/packages/aws-cdk-lib/aws-opensearchservice/test/domain.test.ts index 7c941c784a572..4c10e6868b70c 100644 --- a/packages/aws-cdk-lib/aws-opensearchservice/test/domain.test.ts +++ b/packages/aws-cdk-lib/aws-opensearchservice/test/domain.test.ts @@ -1995,6 +1995,79 @@ each(testedOpenSearchVersions).describe('custom error responses', (engineVersion })).toThrow(/UltraWarm requires Elasticsearch version 6\.8 or later or OpenSearch version 1.0 or later/); }); + test('enabling cold storage without ultrawarm throws an error', () => { + expect(() => new Domain(stack, 'Domain', { + version: engineVersion, + coldStorageEnabled: true, + })).toThrow(/You must enable UltraWarm storage to enable cold storage./); + }); + + test('can enable cold storage', () => { + new Domain(stack, 'Domain', { + version: engineVersion, + capacity: { + masterNodes: 2, + warmNodes: 2, + }, + coldStorageEnabled: true, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::OpenSearchService::Domain', { + ClusterConfig: { + DedicatedMasterEnabled: true, + WarmEnabled: true, + WarmCount: 2, + WarmType: 'ultrawarm1.medium.search', + ColdStorageOptions: { + Enabled: true, + }, + }, + }); + }); + + test('can disable cold storage', () => { + new Domain(stack, 'Domain', { + version: engineVersion, + capacity: { + masterNodes: 2, + warmNodes: 2, + }, + coldStorageEnabled: false, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::OpenSearchService::Domain', { + ClusterConfig: { + DedicatedMasterEnabled: true, + WarmEnabled: true, + WarmCount: 2, + WarmType: 'ultrawarm1.medium.search', + ColdStorageOptions: { + Enabled: false, + }, + }, + }); + }); + + test('cold storage default is undefined', () => { + new Domain(stack, 'Domain', { + version: engineVersion, + capacity: { + masterNodes: 2, + warmNodes: 2, + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::OpenSearchService::Domain', { + ClusterConfig: { + DedicatedMasterEnabled: true, + WarmEnabled: true, + WarmCount: 2, + WarmType: 'ultrawarm1.medium.search', + ColdStorageOptions: Match.absent(), + }, + }); + }); + test('error when t2 or t3 instance types are specified with UltramWarm enabled', () => { const error = /T2 and T3 instance types do not support UltraWarm storage/; expect(() => new Domain(stack, 'Domain1', { From baaa50c73ae3a88d606b62349736ef1180dcf1ad Mon Sep 17 00:00:00 2001 From: Dan Halperin Date: Fri, 8 Mar 2024 15:21:57 -0800 Subject: [PATCH 02/18] feat(ec2): add APPCONFIG and APPCONFIGDATA to InterfaceVpcEndpointAwsService (#29408) These are newly available as of [2023-12-11 (announcement)](https://aws.amazon.com/about-aws/whats-new/2023/12/aws-appconfig-supports-privatelink/) with endpoint names taken from the [AWS PrivateLink docs](https://docs.aws.amazon.com/vpc/latest/privatelink/aws-services-privatelink-support.html). Testing: tried them in our environment. This PR is modeled after https://github.com/aws/aws-cdk/pull/21401/files, but the package.json code seems to be gone, and I didn't duplicate the verbose no-op tests that the string is the string. ### Reason for this change New VPC Endpoints exist now. ### Description of changes Add the missing constants. ### Description of how you validated changes Tested `appconfigdata` in our account. ### Checklist - [X/N/A] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* Yes, and I am an AWS employee. --- packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts b/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts index f30a1a40b7b5e..3ba1f09f81dfa 100644 --- a/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts +++ b/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts @@ -268,6 +268,8 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ public static readonly APP_RUNNER = new InterfaceVpcEndpointAwsService('apprunner'); public static readonly APP_RUNNER_REQUESTS = new InterfaceVpcEndpointAwsService('apprunner.requests'); public static readonly APP_SYNC = new InterfaceVpcEndpointAwsService('appsync-api'); + public static readonly APPCONFIG = new InterfaceVpcEndpointAwsService('appconfig'); + public static readonly APPCONFIGDATA = new InterfaceVpcEndpointAwsService('appconfigdata'); public static readonly APPLICATION_AUTOSCALING = new InterfaceVpcEndpointAwsService('application-autoscaling'); public static readonly APPLICATION_MIGRATION_SERVICE = new InterfaceVpcEndpointAwsService('mgn'); public static readonly APPSTREAM_API = new InterfaceVpcEndpointAwsService('appstream.api'); From 919d16ff611ee01495ae2cb4c646c4e27378b3e3 Mon Sep 17 00:00:00 2001 From: Vandita Patidar Date: Fri, 8 Mar 2024 15:49:51 -0800 Subject: [PATCH 03/18] fix(lambda-nodejs): fixing esbuildArgs to take in account re-specified keys (#29167) ### Issue # (if applicable) Closes #25385 ### Reason for this change This PR fixes a bug in CDK where CDK does not take into account re-specified keys while doing bundling. The CLI supports flags in one of three forms: `--foo`, `--foo=bar`, or `--foo:bar`. However, the `--foo:bar` form was not initially supported. With `--foo:bar`, users can now specify flags that have multiple values and can be re-specified multiple times. ### Description of changes The code has a list of keys that can be re-specified multiple times. While assigning the flags it checks whether the key is among the list of re-specified keys, if yes, it specifies the flag with `:`. ### Description of how you validated changes The PR includes unit test and integration test both to validate the changes. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- ...efaultTestDeployAssertB1F5AACE.assets.json | 19 ++ ...aultTestDeployAssertB1F5AACE.template.json | 36 +++ .../index.js | 2 + .../index.js.map | 7 + ...nteg-lambda-nodejs-esbuildArgs.assets.json | 32 +++ ...eg-lambda-nodejs-esbuildArgs.template.json | 96 ++++++++ .../integ.esbuildArgs.js.snapshot/cdk.out | 1 + .../integ.esbuildArgs.js.snapshot/integ.json | 12 + .../manifest.json | 119 +++++++++ .../integ.esbuildArgs.js.snapshot/tree.json | 226 ++++++++++++++++++ .../test/integ.esbuildArgs.ts | 33 +++ .../aws-lambda-nodejs/lib/bundling.ts | 3 + .../aws-lambda-nodejs/test/bundling.test.ts | 3 +- 13 files changed, 588 insertions(+), 1 deletion(-) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/asset.5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a/index.js create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/asset.5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a/index.js.map create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk-integ-lambda-nodejs-esbuildArgs.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk-integ-lambda-nodejs-esbuildArgs.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.assets.json new file mode 100644 index 0000000000000..69106eb8cc21d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/asset.5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/asset.5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a/index.js new file mode 100644 index 0000000000000..1786193f55a08 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/asset.5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a/index.js @@ -0,0 +1,2 @@ +"use strict";var u=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(r,n)=>{for(var o in n)u(r,o,{get:n[o],enumerable:!0})},d=(r,n,o,m)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of i(n))!c.call(r,e)&&e!==o&&u(r,e,{get:()=>n[e],enumerable:!(m=b(n,e))||m.enumerable});return r};var f=r=>d(u({},"__esModule",{value:!0}),r);var a={};l(a,{handler:()=>p});module.exports=f(a);function t(r,n){return r*n}async function p(){console.log(t(3,4))}0&&(module.exports={handler}); +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vaW50ZWctaGFuZGxlcnMvdHMtaGFuZGxlci50cyIsICIuLi8uLi9pbnRlZy1oYW5kbGVycy91dGlsLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJpbXBvcnQgeyBtdWx0IH0gZnJvbSAnLi91dGlsJztcblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGhhbmRsZXIoKTogUHJvbWlzZTx2b2lkPiB7XG4gIGNvbnNvbGUubG9nKG11bHQoMywgNCkpOyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWNvbnNvbGVcbn1cbiIsICJleHBvcnQgZnVuY3Rpb24gYWRkKGE6IG51bWJlciwgYjogbnVtYmVyKTogbnVtYmVyIHtcbiAgcmV0dXJuIGEgKyBiO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbXVsdChhOiBudW1iZXIsIGI6IG51bWJlcik6IG51bWJlciB7XG4gIHJldHVybiBhICogYjtcbn1cbiJdLAogICJtYXBwaW5ncyI6ICJ5YUFBQSxJQUFBQSxFQUFBLEdBQUFDLEVBQUFELEVBQUEsYUFBQUUsSUFBQSxlQUFBQyxFQUFBSCxHQ0lPLFNBQVNJLEVBQUtDLEVBQVdDLEVBQW1CLENBQ2pELE9BQU9ELEVBQUlDLENBQ2IsQ0RKQSxlQUFzQkMsR0FBeUIsQ0FDN0MsUUFBUSxJQUFJQyxFQUFLLEVBQUcsQ0FBQyxDQUFDLENBQ3hCIiwKICAibmFtZXMiOiBbInRzX2hhbmRsZXJfZXhwb3J0cyIsICJfX2V4cG9ydCIsICJoYW5kbGVyIiwgIl9fdG9Db21tb25KUyIsICJtdWx0IiwgImEiLCAiYiIsICJoYW5kbGVyIiwgIm11bHQiXQp9Cg== diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/asset.5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a/index.js.map b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/asset.5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a/index.js.map new file mode 100644 index 0000000000000..554571d62acc3 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/asset.5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a/index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../integ-handlers/ts-handler.ts", "../../integ-handlers/util.ts"], + "sourcesContent": ["import { mult } from './util';\n\nexport async function handler(): Promise {\n console.log(mult(3, 4)); // eslint-disable-line no-console\n}\n", "export function add(a: number, b: number): number {\n return a + b;\n}\n\nexport function mult(a: number, b: number): number {\n return a * b;\n}\n"], + "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GCIO,SAASI,EAAKC,EAAWC,EAAmB,CACjD,OAAOD,EAAIC,CACb,CDJA,eAAsBC,GAAyB,CAC7C,QAAQ,IAAIC,EAAK,EAAG,CAAC,CAAC,CACxB", + "names": ["ts_handler_exports", "__export", "handler", "__toCommonJS", "mult", "a", "b", "handler", "mult"] +} diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk-integ-lambda-nodejs-esbuildArgs.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk-integ-lambda-nodejs-esbuildArgs.assets.json new file mode 100644 index 0000000000000..0abeec51f0770 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk-integ-lambda-nodejs-esbuildArgs.assets.json @@ -0,0 +1,32 @@ +{ + "version": "36.0.0", + "files": { + "5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a": { + "source": { + "path": "asset.5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "9320d4394a32bcea756c96f8d004743eeb0d3bfe844a15888b0ddf9ece9e9976": { + "source": { + "path": "cdk-integ-lambda-nodejs-esbuildArgs.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "9320d4394a32bcea756c96f8d004743eeb0d3bfe844a15888b0ddf9ece9e9976.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk-integ-lambda-nodejs-esbuildArgs.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk-integ-lambda-nodejs-esbuildArgs.template.json new file mode 100644 index 0000000000000..5039173b96b3a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk-integ-lambda-nodejs-esbuildArgs.template.json @@ -0,0 +1,96 @@ +{ + "Resources": { + "tshandlerServiceRole8876B8E7": { + "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" + ] + ] + } + ] + } + }, + "tshandler4E1C6929": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a.zip" + }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "tshandlerServiceRole8876B8E7", + "Arn" + ] + }, + "Runtime": "nodejs18.x" + }, + "DependsOn": [ + "tshandlerServiceRole8876B8E7" + ] + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/integ.json new file mode 100644 index 0000000000000..649607bf6993a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "LambdaNodeJsEsbuildArgsInteg/DefaultTest": { + "stacks": [ + "cdk-integ-lambda-nodejs-esbuildArgs" + ], + "assertionStack": "LambdaNodeJsEsbuildArgsInteg/DefaultTest/DeployAssert", + "assertionStackName": "LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/manifest.json new file mode 100644 index 0000000000000..38140bde2e23e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/manifest.json @@ -0,0 +1,119 @@ +{ + "version": "36.0.0", + "artifacts": { + "cdk-integ-lambda-nodejs-esbuildArgs.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "cdk-integ-lambda-nodejs-esbuildArgs.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "cdk-integ-lambda-nodejs-esbuildArgs": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "cdk-integ-lambda-nodejs-esbuildArgs.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9320d4394a32bcea756c96f8d004743eeb0d3bfe844a15888b0ddf9ece9e9976.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "cdk-integ-lambda-nodejs-esbuildArgs.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "cdk-integ-lambda-nodejs-esbuildArgs.assets" + ], + "metadata": { + "/cdk-integ-lambda-nodejs-esbuildArgs/ts-handler/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "tshandlerServiceRole8876B8E7" + } + ], + "/cdk-integ-lambda-nodejs-esbuildArgs/ts-handler/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "tshandler4E1C6929" + } + ], + "/cdk-integ-lambda-nodejs-esbuildArgs/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/cdk-integ-lambda-nodejs-esbuildArgs/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "cdk-integ-lambda-nodejs-esbuildArgs" + }, + "LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "LambdaNodeJsEsbuildArgsIntegDefaultTestDeployAssertB1F5AACE.assets" + ], + "metadata": { + "/LambdaNodeJsEsbuildArgsInteg/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/LambdaNodeJsEsbuildArgsInteg/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "LambdaNodeJsEsbuildArgsInteg/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/tree.json new file mode 100644 index 0000000000000..38f8a64e86a7d --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.js.snapshot/tree.json @@ -0,0 +1,226 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "cdk-integ-lambda-nodejs-esbuildArgs": { + "id": "cdk-integ-lambda-nodejs-esbuildArgs", + "path": "cdk-integ-lambda-nodejs-esbuildArgs", + "children": { + "ts-handler": { + "id": "ts-handler", + "path": "cdk-integ-lambda-nodejs-esbuildArgs/ts-handler", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "cdk-integ-lambda-nodejs-esbuildArgs/ts-handler/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "cdk-integ-lambda-nodejs-esbuildArgs/ts-handler/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "cdk-integ-lambda-nodejs-esbuildArgs/ts-handler/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "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" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Code": { + "id": "Code", + "path": "cdk-integ-lambda-nodejs-esbuildArgs/ts-handler/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "cdk-integ-lambda-nodejs-esbuildArgs/ts-handler/Code/Stage", + "constructInfo": { + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "cdk-integ-lambda-nodejs-esbuildArgs/ts-handler/Code/AssetBucket", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.BucketBase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3_assets.Asset", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "cdk-integ-lambda-nodejs-esbuildArgs/ts-handler/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Function", + "aws:cdk:cloudformation:props": { + "code": { + "s3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "s3Key": "5017e4b2e278e32bc634202d075b7ed8961b0d784f75450f7918a6a4f6f7df4a.zip" + }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, + "handler": "index.handler", + "role": { + "Fn::GetAtt": [ + "tshandlerServiceRole8876B8E7", + "Arn" + ] + }, + "runtime": "nodejs18.x" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda_nodejs.NodejsFunction", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "cdk-integ-lambda-nodejs-esbuildArgs/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "cdk-integ-lambda-nodejs-esbuildArgs/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "LambdaNodeJsEsbuildArgsInteg": { + "id": "LambdaNodeJsEsbuildArgsInteg", + "path": "LambdaNodeJsEsbuildArgsInteg", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "LambdaNodeJsEsbuildArgsInteg/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "LambdaNodeJsEsbuildArgsInteg/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "LambdaNodeJsEsbuildArgsInteg/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "LambdaNodeJsEsbuildArgsInteg/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "LambdaNodeJsEsbuildArgsInteg/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.ts new file mode 100644 index 0000000000000..9a2f913547692 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.esbuildArgs.ts @@ -0,0 +1,33 @@ +import * as path from 'path'; +import { App, Stack, StackProps } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import * as lambda from 'aws-cdk-lib/aws-lambda-nodejs'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import { STANDARD_NODEJS_RUNTIME } from '../../config'; + +class TestStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + new lambda.NodejsFunction(this, 'ts-handler', { + entry: path.join(__dirname, 'integ-handlers/ts-handler.ts'), + runtime: STANDARD_NODEJS_RUNTIME, + bundling: { + minify: true, + sourceMap: true, + sourceMapMode: lambda.SourceMapMode.BOTH, + esbuildArgs: { + '--log-limit': '0', + '--out-extension': '.js=.mjs', + }, + }, + }); + } +} + +const app = new App(); +const stack = new TestStack(app, 'cdk-integ-lambda-nodejs-esbuildArgs'); + +new IntegTest(app, 'LambdaNodeJsEsbuildArgsInteg', { + testCases: [stack], +}); diff --git a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/bundling.ts b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/bundling.ts index 8a6389ab08d37..b75b3285d9c68 100644 --- a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/bundling.ts +++ b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/bundling.ts @@ -420,10 +420,13 @@ function toTarget(runtime: Runtime): string { function toCliArgs(esbuildArgs: { [key: string]: string | boolean }): string { const args = new Array(); + const reSpecifiedKeys = ['--alias', '--drop', '--pure', '--log-override', '--out-extension']; for (const [key, value] of Object.entries(esbuildArgs)) { if (value === true || value === '') { args.push(key); + } else if (reSpecifiedKeys.includes(key)) { + args.push(`${key}:"${value}"`); } else if (value) { args.push(`${key}="${value}"`); } diff --git a/packages/aws-cdk-lib/aws-lambda-nodejs/test/bundling.test.ts b/packages/aws-cdk-lib/aws-lambda-nodejs/test/bundling.test.ts index c168335046ed2..a7cfacbeb78b2 100644 --- a/packages/aws-cdk-lib/aws-lambda-nodejs/test/bundling.test.ts +++ b/packages/aws-cdk-lib/aws-lambda-nodejs/test/bundling.test.ts @@ -245,6 +245,7 @@ test('esbuild bundling with esbuild options', () => { '--resolve-extensions': '.ts,.js', '--splitting': true, '--keep-names': '', + '--out-extension': '.js=.mjs', }, }); @@ -264,7 +265,7 @@ test('esbuild bundling with esbuild options', () => { '--log-level=silent --keep-names --tsconfig=/asset-input/lib/custom-tsconfig.ts', '--metafile=/asset-output/index.meta.json --banner:js="/* comments */" --footer:js="/* comments */"', '--main-fields=module,main --inject:./my-shim.js', - '--log-limit="0" --resolve-extensions=".ts,.js" --splitting --keep-names', + '--log-limit="0" --resolve-extensions=".ts,.js" --splitting --keep-names --out-extension:".js=.mjs"', ].join(' '), ], }), From a365217bf6a02d351e0aa32b15fceadac7917a24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:46:47 +0000 Subject: [PATCH 04/18] chore(deps): bump tj-actions/changed-files from 42.0.5 to 42.1.0 (#29433) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 42.0.5 to 42.1.0.
Release notes

Sourced from tj-actions/changed-files's releases.

v42.1.0

🚀 🚀 New Feature 🚀 🚀

  • Use changed-files output to run matrix jobs by simply setting the new matrix input to true.

This serves as an alias for setting the json input to true and the escape_json input to false

      - name: Get changed files
        id: changed-files
        uses: tj-actions/changed-files@v42
        with:
           matrix: true

[!NOTE]

  • Activating this setting will automatically set json to true and escape_json to false. It is recommended for scenarios requiring these specific configurations.

What's Changed

Full Changelog: https://github.com/tj-actions/changed-files/compare/v42...v42.1.0

v42.0.7

What's Changed

Full Changelog: https://github.com/tj-actions/changed-files/compare/v42...v42.0.7

v42.0.6

What's Changed

... (truncated)

Changelog

Sourced from tj-actions/changed-files's changelog.

Changelog

42.1.0 - (2024-03-09)

🚀 Features

  • Add matrix alias to simplify using outputs for matrix jobs (#1975) (008ba8c) - (Tonye Jack)

🔄 Update

  • Updated README.md (#1976)

Co-authored-by: repo-ranger[bot] (aa08304) - (tj-actions[bot])

⬆️ Upgrades

  • Upgraded to v42.0.7 (#1974)

Co-authored-by: jackton1 17484350+jackton1@users.noreply.github.com (fe6c3ea) - (tj-actions[bot])

42.0.7 - (2024-03-07)

➕ Add

  • Added missing changes and modified dist assets. (7fc073d) - (GitHub Action)
  • Added missing changes and modified dist assets. (ea042d8) - (GitHub Action)

🔄 Update

  • Update README.md (a65c2f2) - (Tonye Jack)

⚙️ Miscellaneous Tasks

  • deps: Lock file maintenance (7e4bfc2) - (renovate[bot])
  • Add test for detecting changed-files in a nested directory (#1972) (ef3a7f5) - (Tonye Jack)
  • deps: Update dependency typescript to v5.4.2 (8293f8c) - (renovate[bot])
  • deps: Update dependency @​types/node to v20.11.25 (0ff732e) - (renovate[bot])

⬆️ Upgrades

  • Upgraded to v42.0.6 (#1968)

Co-authored-by: jackton1 17484350+jackton1@users.noreply.github.com (8df6fc2) - (tj-actions[bot])

42.0.6 - (2024-03-06)

🐛 Bug Fixes

... (truncated)

Commits
  • aa08304 Updated README.md (#1976)
  • 008ba8c feat: add matrix alias to simplify using outputs for matrix jobs (#1975)
  • fe6c3ea Upgraded to v42.0.7 (#1974)
  • 7fc073d Added missing changes and modified dist assets.
  • 7e4bfc2 chore(deps): lock file maintenance
  • ef3a7f5 chore: add test for detecting changed-files in a nested directory (#1972)
  • a65c2f2 Update README.md
  • ea042d8 Added missing changes and modified dist assets.
  • 8293f8c chore(deps): update dependency typescript to v5.4.2
  • 0ff732e chore(deps): update dependency @​types/node to v20.11.25
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tj-actions/changed-files&package-manager=github_actions&previous-version=42.0.5&new-version=42.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/request-cli-integ-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/request-cli-integ-test.yml b/.github/workflows/request-cli-integ-test.yml index d4f9d73e965f1..270a36834e8c2 100644 --- a/.github/workflows/request-cli-integ-test.yml +++ b/.github/workflows/request-cli-integ-test.yml @@ -19,7 +19,7 @@ jobs: persist-credentials: false - name: Find changed cli files id: changed-cli-files - uses: tj-actions/changed-files@800a2825992141ddde1a8bca8ad394cec34d3188 + uses: tj-actions/changed-files@aa08304bd477b800d468db44fe10f6c61f7f7b11 with: base_sha: ${{ github.event.pull_request.base.sha }} files_yaml: | From 5b910f0d61d4adae38788f7f16ccdae6cb214057 Mon Sep 17 00:00:00 2001 From: AWS CDK Automation <43080478+aws-cdk-automation@users.noreply.github.com> Date: Mon, 11 Mar 2024 07:15:34 -0700 Subject: [PATCH 05/18] feat: update L1 CloudFormation resource definitions (#29438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates the L1 CloudFormation resource definitions with the latest changes from `@aws-cdk/aws-service-spec` **L1 CloudFormation resource definition changes:** ``` ├[~] service aws-amplify │ └ resources │ └[~] resource AWS::Amplify::App │ ├ properties │ │ └ EnvironmentVariables: (documentation changed) │ └ types │ ├[~] type AutoBranchCreationConfig │ │ └ properties │ │ └ EnvironmentVariables: (documentation changed) │ └[~] type EnvironmentVariable │ └ properties │ ├ Name: (documentation changed) │ └ Value: (documentation changed) ├[~] service aws-apigatewayv2 │ └ resources │ ├[~] resource AWS::ApiGatewayV2::ApiGatewayManagedOverrides │ │ └ types │ │ └[~] type IntegrationOverrides │ │ └ properties │ │ └ IntegrationMethod: (documentation changed) │ └[~] resource AWS::ApiGatewayV2::Integration │ └ properties │ └ IntegrationMethod: (documentation changed) ├[~] service aws-applicationautoscaling │ └ resources │ ├[~] resource AWS::ApplicationAutoScaling::ScalableTarget │ │ └ properties │ │ └ ResourceId: (documentation changed) │ └[~] resource AWS::ApplicationAutoScaling::ScalingPolicy │ └ properties │ └ ResourceId: (documentation changed) ├[~] service aws-autoscaling │ └ resources │ └[~] resource AWS::AutoScaling::AutoScalingGroup │ └ types │ └[~] type InstanceRequirements │ └ properties │ ├ MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: (documentation changed) │ └ SpotMaxPricePercentageOverLowestPrice: (documentation changed) ├[~] service aws-b2bi │ └ resources │ └[~] resource AWS::B2BI::Transformer │ ├ properties │ │ └[-] ModifiedAt: string │ └ attributes │ └ ModifiedAt: (documentation changed) ├[~] service aws-batch │ └ resources │ └[~] resource AWS::Batch::JobDefinition │ ├ properties │ │ └[+] EcsProperties: EcsProperties │ └ types │ ├[+] type EcsProperties │ │ ├ name: EcsProperties │ │ └ properties │ │ └TaskProperties: Array (required) │ ├[+] type EcsTaskProperties │ │ ├ name: EcsTaskProperties │ │ └ properties │ │ ├PlatformVersion: string │ │ ├ExecutionRoleArn: string │ │ ├RuntimePlatform: RuntimePlatform │ │ ├TaskRoleArn: string │ │ ├IpcMode: string │ │ ├Volumes: Array │ │ ├Containers: Array │ │ ├NetworkConfiguration: NetworkConfiguration │ │ ├PidMode: string │ │ └EphemeralStorage: EphemeralStorage │ ├[~] type NodeRangeProperty │ │ └ properties │ │ ├[+] EcsProperties: EcsProperties │ │ └[+] InstanceTypes: Array │ ├[~] type PodProperties │ │ └ properties │ │ ├[+] InitContainers: Array │ │ └[+] ShareProcessNamespace: boolean │ ├[+] type TaskContainerDependency │ │ ├ name: TaskContainerDependency │ │ └ properties │ │ ├Condition: string (required) │ │ └ContainerName: string (required) │ └[+] type TaskContainerProperties │ ├ name: TaskContainerProperties │ └ properties │ ├RepositoryCredentials: RepositoryCredentials │ ├User: string │ ├Secrets: Array │ ├Privileged: boolean │ ├LinuxParameters: LinuxParameters │ ├ReadonlyRootFilesystem: boolean │ ├Image: string (required) │ ├LogConfiguration: LogConfiguration │ ├Essential: boolean │ ├ResourceRequirements: Array │ ├Name: string │ ├MountPoints: Array │ ├DependsOn: Array │ ├Command: Array │ ├Environment: Array │ └Ulimits: Array ├[~] service aws-cloudfront │ └ resources │ └[~] resource AWS::CloudFront::Distribution │ └ types │ └[~] type DistributionConfig │ └ properties │ └ HttpVersion: (documentation changed) ├[~] service aws-cloudwatch │ └ resources │ └[~] resource AWS::CloudWatch::Alarm │ └ properties │ └ ComparisonOperator: (documentation changed) ├[~] service aws-codebuild │ └ resources │ └[~] resource AWS::CodeBuild::Project │ └ types │ └[~] type WebhookFilter │ └ properties │ └ Type: (documentation changed) ├[~] service aws-cognito │ └ resources │ └[~] resource AWS::Cognito::UserPool │ └ types │ ├[~] type NumberAttributeConstraints │ │ └ properties │ │ └ MaxValue: (documentation changed) │ └[~] type StringAttributeConstraints │ └ properties │ └ MaxLength: (documentation changed) ├[~] service aws-controltower │ └ resources │ └[~] resource AWS::ControlTower::LandingZone │ └ properties │ └ Manifest: (documentation changed) ├[~] service aws-ec2 │ └ resources │ ├[~] resource AWS::EC2::EC2Fleet │ │ └ types │ │ └[~] type InstanceRequirementsRequest │ │ └ properties │ │ ├ MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: (documentation changed) │ │ └ SpotMaxPricePercentageOverLowestPrice: (documentation changed) │ ├[~] resource AWS::EC2::LaunchTemplate │ │ └ types │ │ ├[~] type Ebs │ │ │ └ properties │ │ │ └ VolumeType: (documentation changed) │ │ └[~] type InstanceRequirements │ │ └ properties │ │ ├ MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: (documentation changed) │ │ └ SpotMaxPricePercentageOverLowestPrice: (documentation changed) │ ├[~] resource AWS::EC2::SecurityGroup │ │ ├ attributes │ │ │ └ Id: (documentation changed) │ │ └ types │ │ └[~] type Egress │ │ └ properties │ │ └[+] SourceSecurityGroupId: string │ ├[~] resource AWS::EC2::SnapshotBlockPublicAccess │ │ └ - documentation: Specifies the state of the *block public access for snapshots* setting for the Region. For more information, see [Block public access for snapshots](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-public-access-snapshots.html) . │ │ + documentation: Specifies the state of the *block public access for snapshots* setting for the Region. For more information, see [Block public access for snapshots](https://docs.aws.amazon.com/ebs/latest/userguide/block-public-access-snapshots.html) . │ ├[~] resource AWS::EC2::SpotFleet │ │ └ types │ │ ├[~] type EbsBlockDevice │ │ │ └ properties │ │ │ └ VolumeType: (documentation changed) │ │ ├[~] type InstanceRequirementsRequest │ │ │ └ properties │ │ │ ├ MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: (documentation changed) │ │ │ └ SpotMaxPricePercentageOverLowestPrice: (documentation changed) │ │ └[~] type LaunchTemplateOverrides │ │ └ properties │ │ └ WeightedCapacity: (documentation changed) │ ├[~] resource AWS::EC2::Volume │ │ ├ - documentation: Specifies an Amazon Elastic Block Store (Amazon EBS) volume. │ │ │ When you use AWS CloudFormation to update an Amazon EBS volume that modifies `Iops` , `Size` , or `VolumeType` , there is a cooldown period before another operation can occur. This can cause your stack to report being in `UPDATE_IN_PROGRESS` or `UPDATE_ROLLBACK_IN_PROGRESS` for long periods of time. │ │ │ Amazon EBS does not support sizing down an Amazon EBS volume. AWS CloudFormation does not attempt to modify an Amazon EBS volume to a smaller size on rollback. │ │ │ Some common scenarios when you might encounter a cooldown period for Amazon EBS include: │ │ │ - You successfully update an Amazon EBS volume and the update succeeds. When you attempt another update within the cooldown window, that update will be subject to a cooldown period. │ │ │ - You successfully update an Amazon EBS volume and the update succeeds but another change in your `update-stack` call fails. The rollback will be subject to a cooldown period. │ │ │ For more information on the cooldown period, see [Requirements when modifying volumes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/modify-volume-requirements.html) . │ │ │ *DeletionPolicy attribute* │ │ │ To control how AWS CloudFormation handles the volume when the stack is deleted, set a deletion policy for your volume. You can choose to retain the volume, to delete the volume, or to create a snapshot of the volume. For more information, see [DeletionPolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) . │ │ │ > If you set a deletion policy that creates a snapshot, all tags on the volume are included in the snapshot. │ │ │ + documentation: Specifies an Amazon Elastic Block Store (Amazon EBS) volume. │ │ │ When you use AWS CloudFormation to update an Amazon EBS volume that modifies `Iops` , `Size` , or `VolumeType` , there is a cooldown period before another operation can occur. This can cause your stack to report being in `UPDATE_IN_PROGRESS` or `UPDATE_ROLLBACK_IN_PROGRESS` for long periods of time. │ │ │ Amazon EBS does not support sizing down an Amazon EBS volume. AWS CloudFormation does not attempt to modify an Amazon EBS volume to a smaller size on rollback. │ │ │ Some common scenarios when you might encounter a cooldown period for Amazon EBS include: │ │ │ - You successfully update an Amazon EBS volume and the update succeeds. When you attempt another update within the cooldown window, that update will be subject to a cooldown period. │ │ │ - You successfully update an Amazon EBS volume and the update succeeds but another change in your `update-stack` call fails. The rollback will be subject to a cooldown period. │ │ │ For more information, see [Requirements for EBS volume modifications](https://docs.aws.amazon.com/ebs/latest/userguide/modify-volume-requirements.html) . │ │ │ *DeletionPolicy attribute* │ │ │ To control how AWS CloudFormation handles the volume when the stack is deleted, set a deletion policy for your volume. You can choose to retain the volume, to delete the volume, or to create a snapshot of the volume. For more information, see [DeletionPolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) . │ │ │ > If you set a deletion policy that creates a snapshot, all tags on the volume are included in the snapshot. │ │ └ properties │ │ ├ Encrypted: (documentation changed) │ │ └ VolumeType: (documentation changed) │ └[~] resource AWS::EC2::VPCCidrBlock │ └ attributes │ └ Id: (documentation changed) ├[~] service aws-ecs │ └ resources │ ├[~] resource AWS::ECS::ClusterCapacityProviderAssociations │ │ └ types │ │ └[~] type CapacityProviderStrategy │ │ └ properties │ │ └ Weight: (documentation changed) │ ├[~] resource AWS::ECS::Service │ │ └ types │ │ ├[~] type DeploymentConfiguration │ │ │ └ - documentation: The `DeploymentConfiguration` property specifies optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks. │ │ │ + documentation: Optional deployment parameters that control how many tasks run during a deployment and the ordering of stopping and starting tasks. │ │ ├[~] type NetworkConfiguration │ │ │ └ - documentation: The `NetworkConfiguration` property specifies an object representing the network configuration for a task or service. │ │ │ + documentation: The network configuration for a task or service. │ │ ├[~] type PlacementConstraint │ │ │ └ - documentation: The `PlacementConstraint` property specifies an object representing a constraint on task placement in the task definition. For more information, see [Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) in the *Amazon Elastic Container Service Developer Guide* . │ │ │ + documentation: An object representing a constraint on task placement. For more information, see [Task placement constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) in the *Amazon Elastic Container Service Developer Guide* . │ │ │ > If you're using the Fargate launch type, task placement constraints aren't supported. │ │ ├[~] type PlacementStrategy │ │ │ ├ - documentation: The `PlacementStrategy` property specifies the task placement strategy for a task or service. For more information, see [Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html) in the *Amazon Elastic Container Service Developer Guide* . │ │ │ │ + documentation: The task placement strategy for a task or service. For more information, see [Task placement strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html) in the *Amazon Elastic Container Service Developer Guide* . │ │ │ └ properties │ │ │ └ Field: (documentation changed) │ │ └[~] type ServiceRegistry │ │ └ - documentation: The `ServiceRegistry` property specifies details of the service registry. For more information, see [Service Discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) in the *Amazon Elastic Container Service Developer Guide* . │ │ + documentation: The details for the service registry. │ │ Each service may be associated with one service registry. Multiple service registries for each service are not supported. │ │ When you add, update, or remove the service registries configuration, Amazon ECS starts a new deployment. New tasks are registered and deregistered to the updated service registry configuration. │ └[~] resource AWS::ECS::TaskDefinition │ └ types │ └[~] type EnvironmentFile │ ├ - documentation: A list of files containing the environment variables to pass to a container. You can specify up to ten environment files. The file must have a `.env` file extension. Each line in an environment file should contain an environment variable in `VARIABLE=VALUE` format. Lines beginning with `#` are treated as comments and are ignored. │ │ If there are environment variables specified using the `environment` parameter in a container definition, they take precedence over the variables contained within an environment file. If multiple environment files are specified that contain the same variable, they're processed from the top down. We recommend that you use unique variable names. For more information, see [Specifying environment variables](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html) in the *Amazon Elastic Container Service Developer Guide* . │ │ You must use the following platforms for the Fargate launch type: │ │ - Linux platform version `1.4.0` or later. │ │ - Windows platform version `1.0.0` or later. │ │ Consider the following when using the Fargate launch type: │ │ - The file is handled like a native Docker env-file. │ │ - There is no support for shell escape handling. │ │ - The container entry point interperts the `VARIABLE` values. │ │ + documentation: A list of files containing the environment variables to pass to a container. You can specify up to ten environment files. The file must have a `.env` file extension. Each line in an environment file should contain an environment variable in `VARIABLE=VALUE` format. Lines beginning with `#` are treated as comments and are ignored. │ │ If there are environment variables specified using the `environment` parameter in a container definition, they take precedence over the variables contained within an environment file. If multiple environment files are specified that contain the same variable, they're processed from the top down. We recommend that you use unique variable names. For more information, see [Use a file to pass environment variables to a container](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/use-environment-file.html) in the *Amazon Elastic Container Service Developer Guide* . │ │ Environment variable files are objects in Amazon S3 and all Amazon S3 security considerations apply. │ │ You must use the following platforms for the Fargate launch type: │ │ - Linux platform version `1.4.0` or later. │ │ - Windows platform version `1.0.0` or later. │ │ Consider the following when using the Fargate launch type: │ │ - The file is handled like a native Docker env-file. │ │ - There is no support for shell escape handling. │ │ - The container entry point interperts the `VARIABLE` values. │ └ properties │ └ Type: (documentation changed) ├[~] service aws-elasticloadbalancing │ └ resources │ └[~] resource AWS::ElasticLoadBalancing::LoadBalancer │ ├ - documentation: Specifies a Classic Load Balancer. │ │ You can specify the `AvailabilityZones` or `Subnets` property, but not both. │ │ If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the [DependsOn attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html) to declare a dependency on the VPC-gateway attachment. │ │ + documentation: Specifies a Classic Load Balancer. │ │ If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the [DependsOn attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html) to declare a dependency on the VPC-gateway attachment. │ └ properties │ └ AvailabilityZones: (documentation changed) ├[~] service aws-elasticloadbalancingv2 │ └ resources │ └[~] resource AWS::ElasticLoadBalancingV2::Listener │ └ properties │ └ SslPolicy: (documentation changed) ├[~] service aws-emr │ └ resources │ └[~] resource AWS::EMR::Cluster │ ├ properties │ │ └ Name: (documentation changed) │ └ types │ └[~] type JobFlowInstancesConfig │ └ properties │ └ UnhealthyNodeReplacement: (documentation changed) ├[~] service aws-fsx │ └ resources │ └[~] resource AWS::FSx::FileSystem │ └ types │ ├[~] type DiskIopsConfiguration │ │ └ properties │ │ └ Mode: (documentation changed) │ └[~] type OntapConfiguration │ └ properties │ ├ HAPairs: (documentation changed) │ └ ThroughputCapacityPerHAPair: (documentation changed) ├[~] service aws-iotsitewise │ └ resources │ ├[~] resource AWS::IoTSiteWise::AccessPolicy │ │ ├ properties │ │ │ └ AccessPolicyPermission: (documentation changed) │ │ └ types │ │ ├[~] type AccessPolicyIdentity │ │ │ └ properties │ │ │ └ User: (documentation changed) │ │ ├[~] type AccessPolicyResource │ │ │ └ properties │ │ │ ├ Portal: (documentation changed) │ │ │ └ Project: (documentation changed) │ │ ├[~] type Portal │ │ │ └ - documentation: The `Portal` property type specifies the AWS IoT SiteWise Monitor portal for an [AWS::IoTSiteWise::AccessPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-accesspolicy.html) . │ │ │ + documentation: Identifies an AWS IoT SiteWise Monitor portal. │ │ ├[~] type Project │ │ │ └ - documentation: The `Project` property type specifies the AWS IoT SiteWise Monitor project for an [AWS::IoTSiteWise::AccessPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-accesspolicy.html) . │ │ │ + documentation: Identifies a specific AWS IoT SiteWise Monitor project. │ │ └[~] type User │ │ ├ - documentation: The `User` property type specifies the AWS IoT SiteWise Monitor user for an [AWS::IoTSiteWise::AccessPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotsitewise-accesspolicy.html) . │ │ │ + documentation: Contains information for a user identity in an access policy. │ │ └ properties │ │ └ id: (documentation changed) │ ├[~] resource AWS::IoTSiteWise::Asset │ │ ├ properties │ │ │ ├ AssetDescription: (documentation changed) │ │ │ ├ AssetHierarchies: (documentation changed) │ │ │ └ AssetName: (documentation changed) │ │ └ types │ │ ├[~] type AssetHierarchy │ │ │ ├ - documentation: Describes an asset hierarchy that contains a `childAssetId` and `hierarchyLogicalId` . │ │ │ │ + documentation: Describes an asset hierarchy that contains a hierarchy's name and ID. │ │ │ └ properties │ │ │ └ LogicalId: (documentation changed) │ │ └[~] type AssetProperty │ │ └ properties │ │ ├ Alias: (documentation changed) │ │ ├ LogicalId: (documentation changed) │ │ └ NotificationState: (documentation changed) │ ├[~] resource AWS::IoTSiteWise::AssetModel │ │ ├ - documentation: Creates an asset model from specified property and hierarchy definitions. You create assets from asset models. With asset models, you can easily create assets of the same type that have standardized definitions. Each asset created from a model inherits the asset model's property and hierarchy definitions. For more information, see [Defining asset models](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/define-models.html) in the *AWS IoT SiteWise User Guide* . │ │ │ + documentation: Creates an asset model from specified property and hierarchy definitions. You create assets from asset models. With asset models, you can easily create assets of the same type that have standardized definitions. Each asset created from a model inherits the asset model's property and hierarchy definitions. For more information, see [Defining asset models](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/define-models.html) in the *AWS IoT SiteWise User Guide* . │ │ │ You can create two types of asset models, `ASSET_MODEL` or `COMPONENT_MODEL` . │ │ │ - *ASSET_MODEL* – (default) An asset model that you can use to create assets. Can't be included as a component in another asset model. │ │ │ - *COMPONENT_MODEL* – A reusable component that you can include in the composite models of other asset models. You can't create assets directly from this type of asset model. │ │ ├ properties │ │ │ ├ AssetModelCompositeModels: (documentation changed) │ │ │ ├ AssetModelHierarchies: (documentation changed) │ │ │ ├ AssetModelName: (documentation changed) │ │ │ └ AssetModelProperties: (documentation changed) │ │ └ types │ │ ├[~] type AssetModelCompositeModel │ │ │ └ - documentation: Contains information about a composite model in an asset model. This object contains the asset property definitions that you define in the composite model. You can use composite asset models to define alarms on this asset model. │ │ │ If you use the `AssetModelCompositeModel` property to create an alarm, you must use the following information to define three asset model properties: │ │ │ - Use an asset model property to specify the alarm type. │ │ │ - The name must be `AWS/ALARM_TYPE` . │ │ │ - The data type must be `STRING` . │ │ │ - For the `Type` property, the type name must be `Attribute` and the default value must be `IOT_EVENTS` . │ │ │ - Use an asset model property to specify the alarm source. │ │ │ - The name must be `AWS/ALARM_SOURCE` . │ │ │ - The data type must be `STRING` . │ │ │ - For the `Type` property, the type name must be `Attribute` and the default value must be the ARN of the alarm model that you created in AWS IoT Events . │ │ │ > For the ARN of the alarm model, you can use the `Fn::Sub` intrinsic function to substitute the `AWS::Partition` , `AWS::Region` , and `AWS::AccountId` variables in an input string with values that you specify. │ │ │ > │ │ │ > For example, `Fn::Sub: "arn:${AWS::Partition}:iotevents:${AWS::Region}:${AWS::AccountId}:alarmModel/TestAlarmModel"` . │ │ │ > │ │ │ > Replace `TestAlarmModel` with the name of your alarm model. │ │ │ > │ │ │ > For more information about using the `Fn::Sub` intrinsic function, see [Fn::Sub](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html) . │ │ │ - Use an asset model property to specify the state of the alarm. │ │ │ - The name must be `AWS/ALARM_STATE` . │ │ │ - The data type must be `STRUCT` . │ │ │ - The `DataTypeSpec` value must be `AWS/ALARM_STATE` . │ │ │ - For the `Type` property, the type name must be `Measurement` . │ │ │ At the bottom of this page, we provide a YAML example that you can modify to create an alarm. │ │ │ + documentation: Contains information about a composite model in an asset model. This object contains the asset property definitions that you define in the composite model. │ │ ├[~] type AssetModelHierarchy │ │ │ ├ - documentation: Describes an asset hierarchy that contains a hierarchy's name, `LogicalID` , and child asset model ID that specifies the type of asset that can be in this hierarchy. │ │ │ │ + documentation: Describes an asset hierarchy that contains a hierarchy's name, ID, and child asset model ID that specifies the type of asset that can be in this hierarchy. │ │ │ └ properties │ │ │ ├ ChildAssetModelId: (documentation changed) │ │ │ ├ LogicalId: (documentation changed) │ │ │ └ Name: (documentation changed) │ │ ├[~] type AssetModelProperty │ │ │ └ properties │ │ │ ├ DataType: (documentation changed) │ │ │ ├ LogicalId: (documentation changed) │ │ │ ├ Name: (documentation changed) │ │ │ └ Type: (documentation changed) │ │ ├[~] type Attribute │ │ │ └ - documentation: Contains an asset attribute property. For more information, see [Defining data properties](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-properties.html#attributes) in the *AWS IoT SiteWise User Guide* . │ │ │ + documentation: Contains an asset attribute property. For more information, see [Attributes](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-properties.html#attributes) in the *AWS IoT SiteWise User Guide* . │ │ ├[~] type ExpressionVariable │ │ │ └ properties │ │ │ └ Name: (documentation changed) │ │ ├[~] type Metric │ │ │ └ - documentation: Contains an asset metric property. With metrics, you can calculate aggregate functions, such as an average, maximum, or minimum, as specified through an expression. A metric maps several values to a single value (such as a sum). │ │ │ The maximum number of dependent/cascading variables used in any one metric calculation is 10. Therefore, a *root* metric can have up to 10 cascading metrics in its computational dependency tree. Additionally, a metric can only have a data type of `DOUBLE` and consume properties with data types of `INTEGER` or `DOUBLE` . │ │ │ For more information, see [Defining data properties](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-properties.html#metrics) in the *AWS IoT SiteWise User Guide* . │ │ │ + documentation: Contains an asset metric property. With metrics, you can calculate aggregate functions, such as an average, maximum, or minimum, as specified through an expression. A metric maps several values to a single value (such as a sum). │ │ │ The maximum number of dependent/cascading variables used in any one metric calculation is 10. Therefore, a *root* metric can have up to 10 cascading metrics in its computational dependency tree. Additionally, a metric can only have a data type of `DOUBLE` and consume properties with data types of `INTEGER` or `DOUBLE` . │ │ │ For more information, see [Metrics](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-properties.html#metrics) in the *AWS IoT SiteWise User Guide* . │ │ ├[~] type PropertyType │ │ │ ├ - documentation: Contains a property type, which can be one of `Attribute` , `Measurement` , `Metric` , or `Transform` . │ │ │ │ + documentation: Contains a property type, which can be one of `attribute` , `measurement` , `metric` , or `transform` . │ │ │ └ properties │ │ │ ├ Attribute: (documentation changed) │ │ │ ├ Metric: (documentation changed) │ │ │ └ Transform: (documentation changed) │ │ ├[~] type Transform │ │ │ └ - documentation: Contains an asset transform property. A transform is a one-to-one mapping of a property's data points from one form to another. For example, you can use a transform to convert a Celsius data stream to Fahrenheit by applying the transformation expression to each data point of the Celsius stream. Transforms can only input properties that are `INTEGER` , `DOUBLE` , or `BOOLEAN` type. Booleans convert to `0` ( `FALSE` ) and `1` ( `TRUE` ).. │ │ │ For more information, see [Defining data properties](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-properties.html#transforms) in the *AWS IoT SiteWise User Guide* . │ │ │ + documentation: Contains an asset transform property. A transform is a one-to-one mapping of a property's data points from one form to another. For example, you can use a transform to convert a Celsius data stream to Fahrenheit by applying the transformation expression to each data point of the Celsius stream. A transform can only have a data type of `DOUBLE` and consume properties with data types of `INTEGER` or `DOUBLE` . │ │ │ For more information, see [Transforms](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-properties.html#transforms) in the *AWS IoT SiteWise User Guide* . │ │ └[~] type VariableValue │ │ └ properties │ │ ├ HierarchyLogicalId: (documentation changed) │ │ └ PropertyLogicalId: (documentation changed) │ ├[~] resource AWS::IoTSiteWise::Gateway │ │ ├ properties │ │ │ └ GatewayName: (documentation changed) │ │ └ types │ │ ├[~] type GatewayCapabilitySummary │ │ │ └ properties │ │ │ └ CapabilityNamespace: (documentation changed) │ │ └[~] type Greengrass │ │ └ properties │ │ └ GroupArn: (documentation changed) │ └[~] resource AWS::IoTSiteWise::Portal │ ├ - documentation: Creates a portal, which can contain projects and dashboards. Before you can create a portal, you must enable IAM Identity Center . AWS IoT SiteWise Monitor uses IAM Identity Center to manage user permissions. For more information, see [Enabling IAM Identity Center](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/monitor-get-started.html#mon-gs-sso) in the *AWS IoT SiteWise User Guide* . │ │ > Before you can sign in to a new portal, you must add at least one IAM Identity Center user or group to that portal. For more information, see [Adding or removing portal administrators](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/administer-portals.html#portal-change-admins) in the *AWS IoT SiteWise User Guide* . │ │ + documentation: Creates a portal, which can contain projects and dashboards. AWS IoT SiteWise Monitor uses IAM Identity Center or IAM to authenticate portal users and manage user permissions. │ │ > Before you can sign in to a new portal, you must add at least one identity to that portal. For more information, see [Adding or removing portal administrators](https://docs.aws.amazon.com/iot-sitewise/latest/userguide/administer-portals.html#portal-change-admins) in the *AWS IoT SiteWise User Guide* . │ └ properties │ └ PortalAuthMode: (documentation changed) ├[~] service aws-iotwireless │ └ resources │ ├[~] resource AWS::IoTWireless::WirelessDevice │ │ └ properties │ │ └ Positioning: (documentation changed) │ └[~] resource AWS::IoTWireless::WirelessDeviceImportTask │ └ attributes │ └ Sidewalk.DeviceCreationFileList: (documentation changed) ├[~] service aws-kendra │ └ resources │ └[~] resource AWS::Kendra::DataSource │ └ types │ └[~] type S3DataSourceConfiguration │ └ properties │ ├ ExclusionPatterns: (documentation changed) │ └ InclusionPatterns: (documentation changed) ├[~] service aws-lambda │ └ resources │ ├[~] resource AWS::Lambda::Alias │ │ └ properties │ │ └ FunctionName: (documentation changed) │ ├[~] resource AWS::Lambda::EventSourceMapping │ │ └ properties │ │ └ FunctionName: (documentation changed) │ ├[~] resource AWS::Lambda::Permission │ │ └ properties │ │ └ FunctionName: (documentation changed) │ └[~] resource AWS::Lambda::Version │ └ properties │ └ FunctionName: (documentation changed) ├[~] service aws-rds │ └ resources │ ├[~] resource AWS::RDS::DBCluster │ │ ├ properties │ │ │ ├ EnableHttpEndpoint: (documentation changed) │ │ │ └ StorageType: (documentation changed) │ │ └ attributes │ │ └[+] StorageThroughput: integer │ └[~] resource AWS::RDS::DBInstance │ └ properties │ ├ DBInstanceClass: (documentation changed) │ └ StorageType: (documentation changed) ├[~] service aws-redshift │ └ resources │ └[~] resource AWS::Redshift::Cluster │ └ properties │ └ Port: (documentation changed) ├[~] service aws-redshiftserverless │ └ resources │ └[~] resource AWS::RedshiftServerless::Namespace │ ├ properties │ │ └[-] SnapshotCopyConfigurations: Array │ └ types │ └[-] type SnapshotCopyConfiguration │ ├ name: SnapshotCopyConfiguration │ └ properties │ ├DestinationRegion: string (required) │ ├DestinationKmsKeyId: string │ └SnapshotRetentionPeriod: integer ├[~] service aws-sagemaker │ └ resources │ ├[~] resource AWS::SageMaker::EndpointConfig │ │ └ types │ │ └[~] type ServerlessConfig │ │ └ properties │ │ └ ProvisionedConcurrency: (documentation changed) │ ├[~] resource AWS::SageMaker::FeatureGroup │ │ └ types │ │ ├[~] type FeatureDefinition │ │ │ └ properties │ │ │ └ FeatureName: (documentation changed) │ │ └[~] type S3StorageConfig │ │ └ - documentation: The Amazon Simple Storage (Amazon S3) location and and security configuration for `OfflineStore` . │ │ + documentation: The Amazon Simple Storage (Amazon S3) location and security configuration for `OfflineStore` . │ └[~] resource AWS::SageMaker::InferenceExperiment │ └ attributes │ ├ Arn: (documentation changed) │ ├ CreationTime: (documentation changed) │ └ Status: (documentation changed) ├[~] service aws-shield │ └ resources │ ├[~] resource AWS::Shield::DRTAccess │ │ └ properties │ │ └ RoleArn: (documentation changed) │ └[~] resource AWS::Shield::ProtectionGroup │ └ properties │ └ Aggregation: (documentation changed) ├[~] service aws-ssm │ └ resources │ ├[~] resource AWS::SSM::Association │ │ └ properties │ │ └ Targets: (documentation changed) │ └[~] resource AWS::SSM::Parameter │ └ properties │ └ Type: (documentation changed) └[~] service aws-wafv2 └ resources ├[~] resource AWS::WAFv2::RuleGroup │ └ types │ ├[~] type FieldToMatch │ │ └ properties │ │ └[+] JA3Fingerprint: JA3Fingerprint │ ├[+] type JA3Fingerprint │ │ ├ documentation: Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. AWS WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information. │ │ │ > You can use this choice only with a string match `ByteMatchStatement` with the `PositionalConstraint` set to `EXACTLY` . │ │ │ You can obtain the JA3 fingerprint for client requests from the web ACL logs. If AWS WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see [Log fields](https://docs.aws.amazon.com/waf/latest/developerguide/logging-fields.html) in the *AWS WAF Developer Guide* . │ │ │ Provide the JA3 fingerprint string from the logs in your string match statement specification, to match with any future requests that have the same TLS configuration. │ │ │ name: JA3Fingerprint │ │ └ properties │ │ └FallbackBehavior: string (required) │ └[~] type RateBasedStatement │ └ properties │ └[+] EvaluationWindowSec: integer └[~] resource AWS::WAFv2::WebACL └ types ├[~] type FieldToMatch │ └ properties │ └[+] JA3Fingerprint: JA3Fingerprint ├[+] type JA3Fingerprint │ ├ documentation: Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. AWS WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information. │ │ > You can use this choice only with a string match `ByteMatchStatement` with the `PositionalConstraint` set to `EXACTLY` . │ │ You can obtain the JA3 fingerprint for client requests from the web ACL logs. If AWS WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see [Log fields](https://docs.aws.amazon.com/waf/latest/developerguide/logging-fields.html) in the *AWS WAF Developer Guide* . │ │ Provide the JA3 fingerprint string from the logs in your string match statement specification, to match with any future requests that have the same TLS configuration. │ │ name: JA3Fingerprint │ └ properties │ └FallbackBehavior: string (required) └[~] type RateBasedStatement └ properties └[+] EvaluationWindowSec: integer ``` --- .../@aws-cdk/cloudformation-diff/package.json | 4 +-- packages/@aws-cdk/integ-runner/package.json | 2 +- packages/aws-cdk-lib/package.json | 2 +- tools/@aws-cdk/spec2cdk/package.json | 6 ++-- yarn.lock | 28 +++++++++---------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 0963f584b1b32..95d9fd32188df 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -23,8 +23,8 @@ }, "license": "Apache-2.0", "dependencies": { - "@aws-cdk/aws-service-spec": "^0.0.52", - "@aws-cdk/service-spec-types": "^0.0.52", + "@aws-cdk/aws-service-spec": "^0.0.53", + "@aws-cdk/service-spec-types": "^0.0.53", "chalk": "^4", "diff": "^5.2.0", "fast-deep-equal": "^3.1.3", diff --git a/packages/@aws-cdk/integ-runner/package.json b/packages/@aws-cdk/integ-runner/package.json index a41e82cbcfa34..1d04992fca455 100644 --- a/packages/@aws-cdk/integ-runner/package.json +++ b/packages/@aws-cdk/integ-runner/package.json @@ -74,7 +74,7 @@ "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cloudformation-diff": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "@aws-cdk/aws-service-spec": "^0.0.52", + "@aws-cdk/aws-service-spec": "^0.0.53", "cdk-assets": "0.0.0", "@aws-cdk/cdk-cli-wrapper": "0.0.0", "aws-cdk": "0.0.0", diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index cc3bd7c682bbe..994e5afd0eac6 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -135,7 +135,7 @@ "mime-types": "^2.1.35" }, "devDependencies": { - "@aws-cdk/aws-service-spec": "^0.0.52", + "@aws-cdk/aws-service-spec": "^0.0.53", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/custom-resource-handlers": "0.0.0", "@aws-cdk/pkglint": "0.0.0", diff --git a/tools/@aws-cdk/spec2cdk/package.json b/tools/@aws-cdk/spec2cdk/package.json index 3c9f8b5e968da..078e8928421c5 100644 --- a/tools/@aws-cdk/spec2cdk/package.json +++ b/tools/@aws-cdk/spec2cdk/package.json @@ -32,9 +32,9 @@ }, "license": "Apache-2.0", "dependencies": { - "@aws-cdk/aws-service-spec": "^0.0.52", - "@aws-cdk/service-spec-importers": "^0.0.23", - "@aws-cdk/service-spec-types": "^0.0.52", + "@aws-cdk/aws-service-spec": "^0.0.53", + "@aws-cdk/service-spec-importers": "^0.0.24", + "@aws-cdk/service-spec-types": "^0.0.53", "@cdklabs/tskb": "^0.0.3", "@cdklabs/typewriter": "^0.0.3", "camelcase": "^6", diff --git a/yarn.lock b/yarn.lock index fd141c7631a27..6cc7ad5fddeb6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -56,12 +56,12 @@ resolved "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.0.1.tgz#6dc9b7cdb22ff622a7176141197962360c33e9ac" integrity sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg== -"@aws-cdk/aws-service-spec@^0.0.52": - version "0.0.52" - resolved "https://registry.npmjs.org/@aws-cdk/aws-service-spec/-/aws-service-spec-0.0.52.tgz#426bf8adebc825b49b152a3ba89d6816fa8be903" - integrity sha512-SJA4xtG2y5NpTmtKtFNbrYh6BaFgKEcr7ye8N+S4H3KByXIa0NLOh5bPTVBjvyXiRPDJ9q39Xu433vxC3BsDhg== +"@aws-cdk/aws-service-spec@^0.0.53": + version "0.0.53" + resolved "https://registry.npmjs.org/@aws-cdk/aws-service-spec/-/aws-service-spec-0.0.53.tgz#d8f7b2edc69e9819a304261fcc9c0c0b87916015" + integrity sha512-CcKhkQDuf4I9K93/5v/Bq3ekWIq2A5KmUQTWqnqWjXaof1J3mk+htsFU8vP7AhsLfTuYsJM9vTLF7WK6fPD5mA== dependencies: - "@aws-cdk/service-spec-types" "^0.0.52" + "@aws-cdk/service-spec-types" "^0.0.53" "@cdklabs/tskb" "^0.0.3" "@aws-cdk/lambda-layer-kubectl-v24@^2.0.242": @@ -69,12 +69,12 @@ resolved "https://registry.npmjs.org/@aws-cdk/lambda-layer-kubectl-v24/-/lambda-layer-kubectl-v24-2.0.242.tgz#4273a5ad7714f933a7eba155eb9280823086db71" integrity sha512-7/wIOo685tmrEe4hh6zqDELhBZh5OQGf3Hd2FU2Vnwy2ZubW8qTmEw5gqJCsCrGKeYDoa1BcVhDRZ/nzjkaqyA== -"@aws-cdk/service-spec-importers@^0.0.23": - version "0.0.23" - resolved "https://registry.npmjs.org/@aws-cdk/service-spec-importers/-/service-spec-importers-0.0.23.tgz#eaade0ef38a2be6fe2932d6ba2a0f46c97a72dc8" - integrity sha512-U0e3AUfnmf/wFScWbXJHUIAqYOmIzhAbVuzvKVbVc5vC9o0OsQvjvdb5vnOnLbsjjgxCDsHtWF4nZhkxRIBK3g== +"@aws-cdk/service-spec-importers@^0.0.24": + version "0.0.24" + resolved "https://registry.npmjs.org/@aws-cdk/service-spec-importers/-/service-spec-importers-0.0.24.tgz#74c1e97afe252149c1c1ebfb6bf09b66d41e6aa0" + integrity sha512-bDA3wZT19FdpHZZVQfFpBt7ax5ppXC5u3gSk6j7SKV6JThaBXXtUjixD6AMPIGju/xmKuhUVOlhvezd0OS9/7w== dependencies: - "@aws-cdk/service-spec-types" "^0.0.52" + "@aws-cdk/service-spec-types" "^0.0.53" "@cdklabs/tskb" "^0.0.3" ajv "^6" canonicalize "^2.0.0" @@ -85,10 +85,10 @@ glob "^8" sort-json "^2.0.1" -"@aws-cdk/service-spec-types@^0.0.52": - version "0.0.52" - resolved "https://registry.npmjs.org/@aws-cdk/service-spec-types/-/service-spec-types-0.0.52.tgz#08824dcf78dbf8435c25c771ddd7a1e89897c3a0" - integrity sha512-vVoZPgEmkUPeTVJSQ9iyXTiwnb6GiBbntJdnsWTr6I9ao66TuU9HijEcAQHxkC7CxTkian+3KSX/NTl01Klm0A== +"@aws-cdk/service-spec-types@^0.0.53": + version "0.0.53" + resolved "https://registry.npmjs.org/@aws-cdk/service-spec-types/-/service-spec-types-0.0.53.tgz#026e203d973114973f1cdc67d8c2feb6026f2888" + integrity sha512-TbZ9/9wkGlwZyE4/Tuv0azCbUqHHPlp91SWwqd8CjNFHZ3r+1r0m8yKdJgGdfO6PO973Ojesr4+4IxMc8rmy/w== dependencies: "@cdklabs/tskb" "^0.0.3" From bf33efd01cf78bba04b50efb3fc7f90eae57d26f Mon Sep 17 00:00:00 2001 From: Jimmy Gaussen Date: Mon, 11 Mar 2024 18:28:00 +0100 Subject: [PATCH 06/18] chore(rds): update engine versions (#29422) ### Issue # (if applicable) Closes #29360, closes #23810 **Note**: #29421 already adds some of the missing Oracle versions, this PR also includes them ### Reason for this change Update the CDK RDS engine versions to match the current availability, as well as facilitate automated alerts for updates in the future ### Description of changes * Added missing engine version for all RDS engines * This includes engines missing in the CDK that are already deprecated, but still returned by the SDK. The goal is to remove any differences between the two, even if it means a few needless static fields * Updated missing or un-needed `@deprecated` TSDoc tags ### Description of how you validated changes Like I mentioned in https://github.com/aws/aws-cdk/issues/29360#issuecomment-1986892555, I'm working on a CLI that compares the `aws-cdk-lib` TypeScript declarations to SDK API calls, in this case `DescribeDBEngineVersions`. I am re-validating these locally edited files as I update them, until I have no differences between the CDK and the live SDK results. This is currently a mostly manual process. I'll add support for more version fields such as `ec2.WindowsVersion` before adding automation, to bridge the other currently missing versions ASAP. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-cdk-lib/aws-rds/lib/cluster-engine.ts | 77 +- .../aws-rds/lib/instance-engine.ts | 829 ++++++++++++++---- 2 files changed, 737 insertions(+), 169 deletions(-) diff --git a/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts b/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts index 38a44394d9f12..ae359182c0fe7 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts @@ -325,6 +325,11 @@ export class AuroraMysqlEngineVersion { * @deprecated Version 5.7.12 is no longer supported by Amazon RDS. */ public static readonly VER_5_7_12 = AuroraMysqlEngineVersion.builtIn_5_7('12', false); + /** + * Version "5.7.mysql_aurora.2.02.3" + * @deprecated Version 5.7.mysql_aurora.2.02.3 is no longer supported by Amazon RDS. + */ + public static readonly VER_2_02_3 = AuroraMysqlEngineVersion.builtIn_5_7('2.02.3'); /** * Version "5.7.mysql_aurora.2.03.2". * @deprecated Version 5.7.mysql_aurora.2.03.2 is no longer supported by Amazon RDS. @@ -385,11 +390,21 @@ export class AuroraMysqlEngineVersion { * @deprecated Version 5.7.mysql_aurora.2.04.8 is no longer supported by Amazon RDS. */ public static readonly VER_2_04_8 = AuroraMysqlEngineVersion.builtIn_5_7('2.04.8'); + /** + * Version "5.7.mysql_aurora.2.04.9" + * @deprecated Version 5.7.mysql_aurora.2.04.9 is no longer supported by Amazon RDS. + */ + public static readonly VER_2_04_9 = AuroraMysqlEngineVersion.builtIn_5_7('2.04.9'); /** * Version "5.7.mysql_aurora.2.05.0". * @deprecated Version 5.7.mysql_aurora.2.05.0 is no longer supported by Amazon RDS. */ public static readonly VER_2_05_0 = AuroraMysqlEngineVersion.builtIn_5_7('2.05.0'); + /** + * Version "5.7.mysql_aurora.2.05.1" + * @deprecated Version 5.7.mysql_aurora.2.05.1 is no longer supported by Amazon RDS. + */ + public static readonly VER_2_05_1 = AuroraMysqlEngineVersion.builtIn_5_7('2.05.1'); /** * Version "5.7.mysql_aurora.2.06.0". * @deprecated Version 5.7.mysql_aurora.2.06.0 is no longer supported by Amazon RDS. @@ -510,8 +525,8 @@ export class AuroraMysqlEngineVersion { */ public static readonly VER_2_10_3 = AuroraMysqlEngineVersion.builtIn_5_7('2.10.3'); /** - * Version "5.7.mysql_aurora.2.11.0". - * This version isn't available for new creations. + * Version "5.7.mysql_aurora.2.11.0" + * @deprecated Version 5.7.mysql_aurora.2.11.0 is no longer supported by Amazon RDS. */ public static readonly VER_2_11_0 = AuroraMysqlEngineVersion.builtIn_5_7('2.11.0'); /** Version "5.7.mysql_aurora.2.11.1". */ @@ -524,6 +539,8 @@ export class AuroraMysqlEngineVersion { public static readonly VER_2_11_4 = AuroraMysqlEngineVersion.builtIn_5_7('2.11.4'); /** Version "5.7.mysql_aurora.2.12.0". */ public static readonly VER_2_12_0 = AuroraMysqlEngineVersion.builtIn_5_7('2.12.0'); + /** Version "5.7.mysql_aurora.2.12.1". */ + public static readonly VER_2_12_1 = AuroraMysqlEngineVersion.builtIn_5_7('2.12.1'); /** Version "8.0.mysql_aurora.3.01.0". */ public static readonly VER_3_01_0 = AuroraMysqlEngineVersion.builtIn_8_0('3.01.0'); /** Version "8.0.mysql_aurora.3.01.1". */ @@ -540,16 +557,28 @@ export class AuroraMysqlEngineVersion { public static readonly VER_3_03_0 = AuroraMysqlEngineVersion.builtIn_8_0('3.03.0'); /** Version "8.0.mysql_aurora.3.03.1". */ public static readonly VER_3_03_1 = AuroraMysqlEngineVersion.builtIn_8_0('3.03.1'); + /** Version "8.0.mysql_aurora.3.03.2". */ + public static readonly VER_3_03_2 = AuroraMysqlEngineVersion.builtIn_8_0('3.03.2'); + /** Version "8.0.mysql_aurora.3.03.3". */ + public static readonly VER_3_03_3 = AuroraMysqlEngineVersion.builtIn_8_0('3.03.3'); /** Version "8.0.mysql_aurora.3.04.0". */ public static readonly VER_3_04_0 = AuroraMysqlEngineVersion.builtIn_8_0('3.04.0'); /** Version "8.0.mysql_aurora.3.04.1". */ public static readonly VER_3_04_1 = AuroraMysqlEngineVersion.builtIn_8_0('3.04.1'); - /** Version "8.0.mysql_aurora.3.05.0". */ + /** + * Version "8.0.mysql_aurora.3.05.0" + * @deprecated Aurora MySQL 8.0.mysql_aurora.3.05.0 is no longer supported by Amazon RDS. + */ public static readonly VER_3_05_0 = AuroraMysqlEngineVersion.builtIn_8_0('3.05.0'); - /** Version "8.0.mysql_aurora.3.05.1". */ + /** + * Version "8.0.mysql_aurora.3.05.1" + * @deprecated Aurora MySQL 8.0.mysql_aurora.3.05.1 is no longer supported by Amazon RDS. + */ public static readonly VER_3_05_1 = AuroraMysqlEngineVersion.builtIn_8_0('3.05.1'); /** Version "8.0.mysql_aurora.3.05.2". */ public static readonly VER_3_05_2 = AuroraMysqlEngineVersion.builtIn_8_0('3.05.2'); + /** Version "8.0.mysql_aurora.3.06.0". */ + public static readonly VER_3_06_0 = AuroraMysqlEngineVersion.builtIn_8_0('3.06.0'); /** * Create a new AuroraMysqlEngineVersion with an arbitrary version. @@ -689,6 +718,11 @@ export class AuroraPostgresEngineVersion { * @deprecated Version 9.6.19 is no longer supported by Amazon RDS. */ public static readonly VER_9_6_19 = AuroraPostgresEngineVersion.of('9.6.19', '9.6'); + /** + * Version "9.6.22" + * @deprecated Version 9.6.22 is no longer supported by Amazon RDS. + */ + public static readonly VER_9_6_22 = AuroraPostgresEngineVersion.of('9.6.22', '9.6'); /** * Version "10.4". * @deprecated Version 10.4 is no longer supported by Amazon RDS. @@ -806,15 +840,30 @@ export class AuroraPostgresEngineVersion { * @deprecated Version 11.15 is no longer supported by Amazon RDS. */ public static readonly VER_11_15 = AuroraPostgresEngineVersion.of('11.15', '11', { s3Import: true, s3Export: true }); - /** Version "11.16". */ + /** + * Version "11.16" + * @deprecated Version 11.16 is no longer supported by Amazon RDS. + */ public static readonly VER_11_16 = AuroraPostgresEngineVersion.of('11.16', '11', { s3Import: true, s3Export: true }); - /** Version "11.17". */ + /** + * Version "11.17" + * @deprecated Version 11.17 is no longer supported by Amazon RDS. + */ public static readonly VER_11_17 = AuroraPostgresEngineVersion.of('11.17', '11', { s3Import: true, s3Export: true }); - /** Version "11.18". */ + /** + * Version "11.18" + * @deprecated Version 11.18 is no longer supported by Amazon RDS. + */ public static readonly VER_11_18 = AuroraPostgresEngineVersion.of('11.18', '11', { s3Import: true, s3Export: true }); - /** Version "11.19". */ + /** + * Version "11.19" + * @deprecated Version 11.19 is no longer supported by Amazon RDS. + */ public static readonly VER_11_19 = AuroraPostgresEngineVersion.of('11.19', '11', { s3Import: true, s3Export: true }); - /** Version "11.20". */ + /** + * Version "11.20" + * @deprecated Version 11.20 is no longer supported by Amazon RDS. + */ public static readonly VER_11_20 = AuroraPostgresEngineVersion.of('11.20', '11', { s3Import: true, s3Export: true }); /** Version "11.21". */ public static readonly VER_11_21 = AuroraPostgresEngineVersion.of('11.21', '11', { s3Import: true, s3Export: true }); @@ -895,10 +944,7 @@ export class AuroraPostgresEngineVersion { public static readonly VER_13_13 = AuroraPostgresEngineVersion.of('13.13', '13', { s3Import: true, s3Export: true }); /** Version "14.3". */ public static readonly VER_14_3 = AuroraPostgresEngineVersion.of('14.3', '14', { s3Import: true, s3Export: true }); - /** - * Version "14.4". - * @deprecated Version 14.4 is no longer supported by Amazon RDS. - */ + /** Version "14.4". */ public static readonly VER_14_4 = AuroraPostgresEngineVersion.of('14.4', '14', { s3Import: true, s3Export: true }); /** Version "14.5". */ public static readonly VER_14_5 = AuroraPostgresEngineVersion.of('14.5', '14', { s3Import: true, s3Export: true }); @@ -920,7 +966,10 @@ export class AuroraPostgresEngineVersion { public static readonly VER_15_4 = AuroraPostgresEngineVersion.of('15.4', '15', { s3Import: true, s3Export: true }); /** Version "15.5". */ public static readonly VER_15_5 = AuroraPostgresEngineVersion.of('15.5', '15', { s3Import: true, s3Export: true }); - /** Version "16.0". */ + /** + * Version "16.0" + * @deprecated Version 16.0 is no longer supported by Amazon RDS. + */ public static readonly VER_16_0 = AuroraPostgresEngineVersion.of('16.0', '16', { s3Import: true, s3Export: true }); /** Version "16.1". */ public static readonly VER_16_1 = AuroraPostgresEngineVersion.of('16.1', '16', { s3Import: true, s3Export: true }); diff --git a/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts b/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts index 7436dc116ac83..3774347e21e61 100644 --- a/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts +++ b/packages/aws-cdk-lib/aws-rds/lib/instance-engine.ts @@ -288,53 +288,129 @@ export class MariaDbEngineVersion { * @deprecated MariaDB 10.2 is no longer supported by Amazon RDS. */ public static readonly VER_10_2_41 = MariaDbEngineVersion.of('10.2.41', '10.2'); + /** + * Version "10.2.43" + * @deprecated MariaDB 10.2.43 is no longer supported by Amazon RDS. + */ + public static readonly VER_10_2_43 = MariaDbEngineVersion.of('10.2.43', '10.2'); + /** + * Version "10.2.44" + * @deprecated MariaDB 10.2.44 is no longer supported by Amazon RDS. + */ + public static readonly VER_10_2_44 = MariaDbEngineVersion.of('10.2.44', '10.2'); - /** Version "10.3" (only a major version, without a specific minor version). */ + /** + * Version "10.3" (only a major version, without a specific minor version). + * @deprecated MariaDB 10.3 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3 = MariaDbEngineVersion.of('10.3', '10.3'); - /** Version "10.3.8". */ + /** + * Version "10.3.8" + * @deprecated MariaDB 10.3.8 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_8 = MariaDbEngineVersion.of('10.3.8', '10.3'); - /** Version "10.3.13". */ + /** + * Version "10.3.13" + * @deprecated MariaDB 10.3.13 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_13 = MariaDbEngineVersion.of('10.3.13', '10.3'); - /** Version "10.3.20". */ + /** + * Version "10.3.20" + * @deprecated MariaDB 10.3.20 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_20 = MariaDbEngineVersion.of('10.3.20', '10.3'); - /** Version "10.3.23". */ + /** + * Version "10.3.23" + * @deprecated MariaDB 10.3.23 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_23 = MariaDbEngineVersion.of('10.3.23', '10.3'); - /** Version "10.3.28". */ + /** + * Version "10.3.28" + * @deprecated MariaDB 10.3.28 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_28 = MariaDbEngineVersion.of('10.3.28', '10.3'); - /** Version "10.3.31". */ + /** + * Version "10.3.31" + * @deprecated MariaDB 10.3.31 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_31 = MariaDbEngineVersion.of('10.3.31', '10.3'); - /** Version "10.3.32". */ + /** + * Version "10.3.32" + * @deprecated MariaDB 10.3.32 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_32 = MariaDbEngineVersion.of('10.3.32', '10.3'); - /** Version "10.3.34". */ + /** + * Version "10.3.34" + * @deprecated MariaDB 10.3.34 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_34 = MariaDbEngineVersion.of('10.3.34', '10.3'); - /** Version "10.3.35". */ + /** + * Version "10.3.35" + * @deprecated MariaDB 10.3.35 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_35 = MariaDbEngineVersion.of('10.3.35', '10.3'); - /** Version "10.3.36". */ + /** + * Version "10.3.36" + * @deprecated MariaDB 10.3.36 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_36 = MariaDbEngineVersion.of('10.3.36', '10.3'); - /** Version "10.3.37". */ + /** + * Version "10.3.37" + * @deprecated MariaDB 10.3.37 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_37 = MariaDbEngineVersion.of('10.3.37', '10.3'); - /** Version "10.3.38". */ + /** + * Version "10.3.38" + * @deprecated MariaDB 10.3.38 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_38 = MariaDbEngineVersion.of('10.3.38', '10.3'); - /** Version "10.3.39". */ + /** + * Version "10.3.39" + * @deprecated MariaDB 10.3.39 is no longer supported by Amazon RDS. + */ public static readonly VER_10_3_39 = MariaDbEngineVersion.of('10.3.39', '10.3'); /** Version "10.4" (only a major version, without a specific minor version). */ public static readonly VER_10_4 = MariaDbEngineVersion.of('10.4', '10.4'); - /** Version "10.4.8". */ + /** + * Version "10.4.8" + * @deprecated MariaDB 10.4.8 is no longer supported by Amazon RDS. + */ public static readonly VER_10_4_8 = MariaDbEngineVersion.of('10.4.8', '10.4'); - /** Version "10.4.13". */ + /** + * Version "10.4.13" + * @deprecated MariaDB 10.4.13 is no longer supported by Amazon RDS. + */ public static readonly VER_10_4_13 = MariaDbEngineVersion.of('10.4.13', '10.4'); - /** Version "10.4.18". */ + /** + * Version "10.4.18" + * @deprecated MariaDB 10.4.18 is no longer supported by Amazon RDS. + */ public static readonly VER_10_4_18 = MariaDbEngineVersion.of('10.4.18', '10.4'); - /** Version "10.4.21". */ + /** + * Version "10.4.21" + * @deprecated MariaDB 10.4.21 is no longer supported by Amazon RDS. + */ public static readonly VER_10_4_21 = MariaDbEngineVersion.of('10.4.21', '10.4'); - /** Version "10.4.22". */ + /** + * Version "10.4.22" + * @deprecated MariaDB 10.4.22 is no longer supported by Amazon RDS. + */ public static readonly VER_10_4_22 = MariaDbEngineVersion.of('10.4.22', '10.4'); - /** Version "10.4.24". */ + /** + * Version "10.4.24" + * @deprecated MariaDB 10.4.24 is no longer supported by Amazon RDS. + */ public static readonly VER_10_4_24 = MariaDbEngineVersion.of('10.4.24', '10.4'); - /** Version "10.4.25". */ + /** + * Version "10.4.25" + * @deprecated MariaDB 10.4.25 is no longer supported by Amazon RDS. + */ public static readonly VER_10_4_25 = MariaDbEngineVersion.of('10.4.25', '10.4'); - /** Version "10.4.26". */ + /** + * Version "10.4.26" + * @deprecated MariaDB 10.4.26 is no longer supported by Amazon RDS. + */ public static readonly VER_10_4_26 = MariaDbEngineVersion.of('10.4.26', '10.4'); /** Version "10.4.27". */ public static readonly VER_10_4_27 = MariaDbEngineVersion.of('10.4.27', '10.4') @@ -348,22 +424,45 @@ export class MariaDbEngineVersion { public static readonly VER_10_4_31 = MariaDbEngineVersion.of('10.4.31', '10.4') /** Version "10.4.32". */ public static readonly VER_10_4_32 = MariaDbEngineVersion.of('10.4.32', '10.4') + /** Version "10.4.33". */ + public static readonly VER_10_4_33 = MariaDbEngineVersion.of('10.4.33', '10.4'); /** Version "10.5" (only a major version, without a specific minor version). */ public static readonly VER_10_5 = MariaDbEngineVersion.of('10.5', '10.5'); - /** Version "10.5.8". */ + /** + * Version "10.5.8" + * @deprecated MariaDB 10.5.8 is no longer supported by Amazon RDS. + */ public static readonly VER_10_5_8 = MariaDbEngineVersion.of('10.5.8', '10.5'); - /** Version "10.5.9". */ + /** + * Version "10.5.9" + * @deprecated MariaDB 10.5.9 is no longer supported by Amazon RDS. + */ public static readonly VER_10_5_9 = MariaDbEngineVersion.of('10.5.9', '10.5'); - /** Version "10.5.12". */ + /** + * Version "10.5.12" + * @deprecated MariaDB 10.5.12 is no longer supported by Amazon RDS. + */ public static readonly VER_10_5_12 = MariaDbEngineVersion.of('10.5.12', '10.5'); - /** Version "10.5.13". */ + /** + * Version "10.5.13" + * @deprecated MariaDB 10.5.13 is no longer supported by Amazon RDS. + */ public static readonly VER_10_5_13 = MariaDbEngineVersion.of('10.5.13', '10.5'); - /** Version "10.5.15". */ + /** + * Version "10.5.15" + * @deprecated MariaDB 10.5.15 is no longer supported by Amazon RDS. + */ public static readonly VER_10_5_15 = MariaDbEngineVersion.of('10.5.15', '10.5'); - /** Version "10.5.16". */ + /** + * Version "10.5.16" + * @deprecated MariaDB 10.5.16 is no longer supported by Amazon RDS. + */ public static readonly VER_10_5_16 = MariaDbEngineVersion.of('10.5.16', '10.5'); - /** Version "10.5.17". */ + /** + * Version "10.5.17" + * @deprecated MariaDB 10.5.17 is no longer supported by Amazon RDS. + */ public static readonly VER_10_5_17 = MariaDbEngineVersion.of('10.5.17', '10.5'); /** Version "10.5.18". */ public static readonly VER_10_5_18 = MariaDbEngineVersion.of('10.5.18', '10.5'); @@ -377,14 +476,25 @@ export class MariaDbEngineVersion { public static readonly VER_10_5_22 = MariaDbEngineVersion.of('10.5.22', '10.5'); /** Version "10.5.23". */ public static readonly VER_10_5_23 = MariaDbEngineVersion.of('10.5.23', '10.5'); + /** Version "10.5.24". */ + public static readonly VER_10_5_24 = MariaDbEngineVersion.of('10.5.24', '10.5'); /** Version "10.6" (only a major version, without a specific minor version). */ public static readonly VER_10_6 = MariaDbEngineVersion.of('10.6', '10.6'); - /** Version "10.6.5". */ + /** + * Version "10.6.5" + * @deprecated MariaDB 10.6.5 is no longer supported by Amazon RDS. + */ public static readonly VER_10_6_5 = MariaDbEngineVersion.of('10.6.5', '10.6'); - /** Version "10.6.7". */ + /** + * Version "10.6.7" + * @deprecated MariaDB 10.6.7 is no longer supported by Amazon RDS. + */ public static readonly VER_10_6_7 = MariaDbEngineVersion.of('10.6.7', '10.6'); - /** Version "10.6.8". */ + /** + * Version "10.6.8" + * @deprecated MariaDB 10.6.8 is no longer supported by Amazon RDS. + */ public static readonly VER_10_6_8 = MariaDbEngineVersion.of('10.6.8', '10.6'); /** Version "10.6.10". */ public static readonly VER_10_6_10 = MariaDbEngineVersion.of('10.6.10', '10.6'); @@ -400,6 +510,8 @@ export class MariaDbEngineVersion { public static readonly VER_10_6_15 = MariaDbEngineVersion.of('10.6.15', '10.6'); /** Version "10.6.16". */ public static readonly VER_10_6_16 = MariaDbEngineVersion.of('10.6.16', '10.6'); + /** Version "10.6.17". */ + public static readonly VER_10_6_17 = MariaDbEngineVersion.of('10.6.17', '10.6'); /** Version "10.11" (only a major version, without a specific minor version). */ public static readonly VER_10_11 = MariaDbEngineVersion.of('10.11', '10.11'); @@ -409,6 +521,8 @@ export class MariaDbEngineVersion { public static readonly VER_10_11_5 = MariaDbEngineVersion.of('10.11.5', '10.11'); /** Version "10.11.6". */ public static readonly VER_10_11_6 = MariaDbEngineVersion.of('10.11.6', '10.11'); + /** Version "10.11.7". */ + public static readonly VER_10_11_7 = MariaDbEngineVersion.of('10.11.7', '10.11'); /** * Create a new MariaDbEngineVersion with an arbitrary version. @@ -487,6 +601,11 @@ export class MysqlEngineVersion { * @deprecated MySQL 5.5 is no longer supported by Amazon RDS. */ public static readonly VER_5_5_53 = MysqlEngineVersion.of('5.5.53', '5.5'); + /** + * Version "5.5.54" + * @deprecated MySQL 5.5.54 is no longer supported by Amazon RDS. + */ + public static readonly VER_5_5_54 = MysqlEngineVersion.of('5.5.54', '5.5'); /** * Version "5.5.57". * @deprecated MySQL 5.5 is no longer supported by Amazon RDS. @@ -571,37 +690,85 @@ export class MysqlEngineVersion { /** Version "5.7" (only a major version, without a specific minor version). */ public static readonly VER_5_7 = MysqlEngineVersion.of('5.7', '5.7'); - /** Version "5.7.16". */ + /** + * Version "5.7.16" + * @deprecated MySQL 5.7.16 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_16 = MysqlEngineVersion.of('5.7.16', '5.7'); - /** Version "5.7.17". */ + /** + * Version "5.7.17" + * @deprecated MySQL 5.7.17 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_17 = MysqlEngineVersion.of('5.7.17', '5.7'); - /** Version "5.7.19". */ + /** + * Version "5.7.19" + * @deprecated MySQL 5.7.19 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_19 = MysqlEngineVersion.of('5.7.19', '5.7'); - /** Version "5.7.21". */ + /** + * Version "5.7.21" + * @deprecated MySQL 5.7.21 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_21 = MysqlEngineVersion.of('5.7.21', '5.7'); - /** Version "5.7.22". */ + /** + * Version "5.7.22" + * @deprecated MySQL 5.7.22 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_22 = MysqlEngineVersion.of('5.7.22', '5.7'); - /** Version "5.7.23". */ + /** + * Version "5.7.23" + * @deprecated MySQL 5.7.23 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_23 = MysqlEngineVersion.of('5.7.23', '5.7'); - /** Version "5.7.24". */ + /** + * Version "5.7.24" + * @deprecated MySQL 5.7.24 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_24 = MysqlEngineVersion.of('5.7.24', '5.7'); - /** Version "5.7.25". */ + /** + * Version "5.7.25" + * @deprecated MySQL 5.7.25 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_25 = MysqlEngineVersion.of('5.7.25', '5.7'); - /** Version "5.7.26". */ + /** + * Version "5.7.26" + * @deprecated MySQL 5.7.26 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_26 = MysqlEngineVersion.of('5.7.26', '5.7'); - /** Version "5.7.28". */ + /** + * Version "5.7.28" + * @deprecated MySQL 5.7.28 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_28 = MysqlEngineVersion.of('5.7.28', '5.7'); - /** Version "5.7.30". */ + /** + * Version "5.7.30" + * @deprecated MySQL 5.7.30 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_30 = MysqlEngineVersion.of('5.7.30', '5.7'); - /** Version "5.7.31". */ + /** + * Version "5.7.31" + * @deprecated MySQL 5.7.31 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_31 = MysqlEngineVersion.of('5.7.31', '5.7'); - /** Version "5.7.33". */ + /** + * Version "5.7.33" + * @deprecated MySQL 5.7.33 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_33 = MysqlEngineVersion.of('5.7.33', '5.7'); - /** Version "5.7.34". */ + /** + * Version "5.7.34" + * @deprecated MySQL 5.7.34 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_34 = MysqlEngineVersion.of('5.7.34', '5.7'); - /** Version "5.7.35". */ + /** + * Version "5.7.35" + * @deprecated MySQL 5.7.35 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_35 = MysqlEngineVersion.of('5.7.35', '5.7'); - /** Version "5.7.36". */ + /** + * Version "5.7.36" + * @deprecated MySQL 5.7.36 is no longer supported by Amazon RDS. + */ public static readonly VER_5_7_36 = MysqlEngineVersion.of('5.7.36', '5.7'); /** Version "5.7.37". */ public static readonly VER_5_7_37 = MysqlEngineVersion.of('5.7.37', '5.7'); @@ -622,33 +789,77 @@ export class MysqlEngineVersion { /** Version "8.0" (only a major version, without a specific minor version). */ public static readonly VER_8_0 = MysqlEngineVersion.of('8.0', '8.0'); - /** Version "8.0.11". */ + /** + * Version "8.0.11" + * @deprecated MySQL 8.0.11 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_11 = MysqlEngineVersion.of('8.0.11', '8.0'); - /** Version "8.0.13". */ + /** + * Version "8.0.13" + * @deprecated MySQL 8.0.13 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_13 = MysqlEngineVersion.of('8.0.13', '8.0'); - /** Version "8.0.15". */ + /** + * Version "8.0.15" + * @deprecated MySQL 8.0.15 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_15 = MysqlEngineVersion.of('8.0.15', '8.0'); - /** Version "8.0.16". */ + /** + * Version "8.0.16" + * @deprecated MySQL 8.0.16 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_16 = MysqlEngineVersion.of('8.0.16', '8.0'); - /** Version "8.0.17". */ + /** + * Version "8.0.17" + * @deprecated MySQL 8.0.17 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_17 = MysqlEngineVersion.of('8.0.17', '8.0'); - /** Version "8.0.19". */ + /** + * Version "8.0.19" + * @deprecated MySQL 8.0.19 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_19 = MysqlEngineVersion.of('8.0.19', '8.0'); - /** Version "8.0.20 ". */ + /** + * Version "8.0.20" + * @deprecated MySQL 8.0.20 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_20 = MysqlEngineVersion.of('8.0.20', '8.0'); - /** Version "8.0.21 ". */ + /** + * Version "8.0.21" + * @deprecated MySQL 8.0.21 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_21 = MysqlEngineVersion.of('8.0.21', '8.0'); - /** Version "8.0.23". */ + /** + * Version "8.0.23" + * @deprecated MySQL 8.0.23 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_23 = MysqlEngineVersion.of('8.0.23', '8.0'); - /** Version "8.0.25". */ + /** + * Version "8.0.25" + * @deprecated MySQL 8.0.25 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_25 = MysqlEngineVersion.of('8.0.25', '8.0'); - /** Version "8.0.26". */ + /** + * Version "8.0.26" + * @deprecated MySQL 8.0.26 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_26 = MysqlEngineVersion.of('8.0.26', '8.0'); - /** Version "8.0.27". */ + /** + * Version "8.0.27" + * @deprecated MySQL 8.0.27 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_27 = MysqlEngineVersion.of('8.0.27', '8.0'); /** Version "8.0.28". */ public static readonly VER_8_0_28 = MysqlEngineVersion.of('8.0.28', '8.0'); - /** Version "8.0.30". */ + /** + * Version "8.0.29" + * @deprecated MySQL 8.0.29 is no longer supported by Amazon RDS. + */ + public static readonly VER_8_0_29 = MysqlEngineVersion.of('8.0.29', '8.0'); + /** + * Version "8.0.30" + * @deprecated MySQL 8.0.30 is no longer supported by Amazon RDS. + */ public static readonly VER_8_0_30 = MysqlEngineVersion.of('8.0.30', '8.0'); /** Version "8.0.31". */ public static readonly VER_8_0_31 = MysqlEngineVersion.of('8.0.31', '8.0'); @@ -660,6 +871,8 @@ export class MysqlEngineVersion { public static readonly VER_8_0_34 = MysqlEngineVersion.of('8.0.34', '8.0'); /** Version "8.0.35". */ public static readonly VER_8_0_35 = MysqlEngineVersion.of('8.0.35', '8.0'); + /** Version "8.0.36". */ + public static readonly VER_8_0_36 = MysqlEngineVersion.of('8.0.36', '8.0'); /** * Create a new MysqlEngineVersion with an arbitrary version. @@ -1131,7 +1344,10 @@ export class PostgresEngineVersion { * @deprecated PostgreSQL 11.15 is no longer supported by Amazon RDS. */ public static readonly VER_11_15 = PostgresEngineVersion.of('11.15', '11', { s3Import: true, s3Export: true }); - /** Version "11.16". */ + /** + * Version "11.16" + * @deprecated PostgreSQL 11.16 is no longer supported by Amazon RDS. + */ public static readonly VER_11_16 = PostgresEngineVersion.of('11.16', '11', { s3Import: true, s3Export: true }); /** Version "11.17". */ public static readonly VER_11_17 = PostgresEngineVersion.of('11.17', '11', { s3Import: true, s3Export: true }); @@ -1193,7 +1409,10 @@ export class PostgresEngineVersion { * @deprecated PostgreSQL 12.10 is no longer supported by Amazon RDS. */ public static readonly VER_12_10 = PostgresEngineVersion.of('12.10', '12', { s3Import: true, s3Export: true }); - /** Version "12.11". */ + /** + * Version "12.11" + * @deprecated PostgreSQL 12.11 is no longer supported by Amazon RDS. + */ public static readonly VER_12_11 = PostgresEngineVersion.of('12.11', '12', { s3Import: true, s3Export: true }); /** Version "12.12". */ public static readonly VER_12_12 = PostgresEngineVersion.of('12.12', '12', { s3Import: true, s3Export: true }); @@ -1207,6 +1426,8 @@ export class PostgresEngineVersion { public static readonly VER_12_16 = PostgresEngineVersion.of('12.16', '12', { s3Import: true, s3Export: true }); /** Version "12.17". */ public static readonly VER_12_17 = PostgresEngineVersion.of('12.17', '12', { s3Import: true, s3Export: true }); + /** Version "12.18". */ + public static readonly VER_12_18 = PostgresEngineVersion.of('12.18', '12', { s3Import: true, s3Export: true }); /** Version "13" (only a major version, without a specific minor version). */ public static readonly VER_13 = PostgresEngineVersion.of('13', '13', { s3Import: true, s3Export: true }); @@ -1240,7 +1461,10 @@ export class PostgresEngineVersion { * @deprecated PostgreSQL 13.6 is no longer supported by Amazon RDS. */ public static readonly VER_13_6 = PostgresEngineVersion.of('13.6', '13', { s3Import: true, s3Export: true }); - /** Version "13.7". */ + /** + * Version "13.7" + * @deprecated PostgreSQL 13.7 is no longer supported by Amazon RDS. + */ public static readonly VER_13_7 = PostgresEngineVersion.of('13.7', '13', { s3Import: true, s3Export: true }); /** Version "13.8". */ public static readonly VER_13_8 = PostgresEngineVersion.of('13.8', '13', { s3Import: true, s3Export: true }); @@ -1254,6 +1478,8 @@ export class PostgresEngineVersion { public static readonly VER_13_12 = PostgresEngineVersion.of('13.12', '13', { s3Import: true, s3Export: true }); /** Version "13.13". */ public static readonly VER_13_13 = PostgresEngineVersion.of('13.13', '13', { s3Import: true, s3Export: true }); + /** Version "13.14". */ + public static readonly VER_13_14 = PostgresEngineVersion.of('13.14', '13', { s3Import: true, s3Export: true }); /** Version "14" (only a major version, without a specific minor version). */ public static readonly VER_14 = PostgresEngineVersion.of('14', '14', { s3Import: true, s3Export: true }); @@ -1267,9 +1493,15 @@ export class PostgresEngineVersion { * @deprecated PostgreSQL 14.2 is no longer supported by Amazon RDS. */ public static readonly VER_14_2 = PostgresEngineVersion.of('14.2', '14', { s3Import: true, s3Export: true }); - /** Version "14.3". */ + /** + * Version "14.3" + * @deprecated PostgreSQL 14.3 is no longer supported by Amazon RDS. + */ public static readonly VER_14_3 = PostgresEngineVersion.of('14.3', '14', { s3Import: true, s3Export: true }); - /** Version "14.4". */ + /** + * Version "14.4" + * @deprecated PostgreSQL 14.4 is no longer supported by Amazon RDS. + */ public static readonly VER_14_4 = PostgresEngineVersion.of('14.4', '14', { s3Import: true, s3Export: true }); /** Version "14.5". */ public static readonly VER_14_5 = PostgresEngineVersion.of('14.5', '14', { s3Import: true, s3Export: true }); @@ -1283,6 +1515,8 @@ export class PostgresEngineVersion { public static readonly VER_14_9 = PostgresEngineVersion.of('14.9', '14', { s3Import: true, s3Export: true }); /** Version "14.10". */ public static readonly VER_14_10 = PostgresEngineVersion.of('14.10', '14', { s3Import: true, s3Export: true }); + /** Version "14.11". */ + public static readonly VER_14_11 = PostgresEngineVersion.of('14.11', '14', { s3Import: true, s3Export: true }); /** Version "15" (only a major version, without a specific minor version). */ public static readonly VER_15 = PostgresEngineVersion.of('15', '15', { s3Import: true, s3Export: true }); @@ -1294,11 +1528,15 @@ export class PostgresEngineVersion { public static readonly VER_15_4 = PostgresEngineVersion.of('15.4', '15', { s3Import: true, s3Export: true }); /** Version "15.5". */ public static readonly VER_15_5 = PostgresEngineVersion.of('15.5', '15', { s3Import: true, s3Export: true }); + /** Version "15.6". */ + public static readonly VER_15_6 = PostgresEngineVersion.of('15.6', '15', { s3Import: true, s3Export: true }); /** Version "16" (only a major version, without a specific minor version). */ public static readonly VER_16 = PostgresEngineVersion.of('16', '16', { s3Import: true, s3Export: true }); /** Version "16.1". */ public static readonly VER_16_1 = PostgresEngineVersion.of('16.1', '16', { s3Import: true, s3Export: true }); + /** Version "16.2". */ + public static readonly VER_16_2 = PostgresEngineVersion.of('16.2', '16', { s3Import: true, s3Export: true }); /** * Create a new PostgresEngineVersion with an arbitrary version. @@ -1451,115 +1689,277 @@ export class OracleLegacyEngineVersion { * - `DatabaseInstanceEngine.oracleEeCdb`. */ export class OracleEngineVersion { - /** Version "12.1" (only a major version, without a specific minor version). */ + /** + * Version "12.1" (only a major version, without a specific minor version). + * @deprecated Oracle 12.1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1 = OracleEngineVersion.of('12.1', '12.1'); - /** Version "12.1.0.2.v1". */ + /** + * Version "12.1.0.2.v1" + * @deprecated Oracle 12.1.0.2.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V1 = OracleEngineVersion.of('12.1.0.2.v1', '12.1'); - /** Version "12.1.0.2.v2". */ + /** + * Version "12.1.0.2.v2" + * @deprecated Oracle 12.1.0.2.v2 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V2 = OracleEngineVersion.of('12.1.0.2.v2', '12.1'); - /** Version "12.1.0.2.v3". */ + /** + * Version "12.1.0.2.v3" + * @deprecated Oracle 12.1.0.2.v3 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V3 = OracleEngineVersion.of('12.1.0.2.v3', '12.1'); - /** Version "12.1.0.2.v4". */ + /** + * Version "12.1.0.2.v4" + * @deprecated Oracle 12.1.0.2.v4 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V4 = OracleEngineVersion.of('12.1.0.2.v4', '12.1'); - /** Version "12.1.0.2.v5". */ + /** + * Version "12.1.0.2.v5" + * @deprecated Oracle 12.1.0.2.v5 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V5 = OracleEngineVersion.of('12.1.0.2.v5', '12.1'); - /** Version "12.1.0.2.v6". */ + /** + * Version "12.1.0.2.v6" + * @deprecated Oracle 12.1.0.2.v6 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V6 = OracleEngineVersion.of('12.1.0.2.v6', '12.1'); - /** Version "12.1.0.2.v7". */ + /** + * Version "12.1.0.2.v7" + * @deprecated Oracle 12.1.0.2.v7 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V7 = OracleEngineVersion.of('12.1.0.2.v7', '12.1'); - /** Version "12.1.0.2.v8". */ + /** + * Version "12.1.0.2.v8" + * @deprecated Oracle 12.1.0.2.v8 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V8 = OracleEngineVersion.of('12.1.0.2.v8', '12.1'); - /** Version "12.1.0.2.v9". */ + /** + * Version "12.1.0.2.v9" + * @deprecated Oracle 12.1.0.2.v9 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V9 = OracleEngineVersion.of('12.1.0.2.v9', '12.1'); - /** Version "12.1.0.2.v10". */ + /** + * Version "12.1.0.2.v10" + * @deprecated Oracle 12.1.0.2.v10 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V10 = OracleEngineVersion.of('12.1.0.2.v10', '12.1'); - /** Version "12.1.0.2.v11". */ + /** + * Version "12.1.0.2.v11" + * @deprecated Oracle 12.1.0.2.v11 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V11 = OracleEngineVersion.of('12.1.0.2.v11', '12.1'); - /** Version "12.1.0.2.v12". */ + /** + * Version "12.1.0.2.v12" + * @deprecated Oracle 12.1.0.2.v12 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V12 = OracleEngineVersion.of('12.1.0.2.v12', '12.1'); - /** Version "12.1.0.2.v13". */ + /** + * Version "12.1.0.2.v13" + * @deprecated Oracle 12.1.0.2.v13 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V13 = OracleEngineVersion.of('12.1.0.2.v13', '12.1'); - /** Version "12.1.0.2.v14". */ + /** + * Version "12.1.0.2.v14" + * @deprecated Oracle 12.1.0.2.v14 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V14 = OracleEngineVersion.of('12.1.0.2.v14', '12.1'); - /** Version "12.1.0.2.v15". */ + /** + * Version "12.1.0.2.v15" + * @deprecated Oracle 12.1.0.2.v15 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V15 = OracleEngineVersion.of('12.1.0.2.v15', '12.1'); - /** Version "12.1.0.2.v16". */ + /** + * Version "12.1.0.2.v16" + * @deprecated Oracle 12.1.0.2.v16 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V16 = OracleEngineVersion.of('12.1.0.2.v16', '12.1'); - /** Version "12.1.0.2.v17". */ + /** + * Version "12.1.0.2.v17" + * @deprecated Oracle 12.1.0.2.v17 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V17 = OracleEngineVersion.of('12.1.0.2.v17', '12.1'); - /** Version "12.1.0.2.v18". */ + /** + * Version "12.1.0.2.v18" + * @deprecated Oracle 12.1.0.2.v18 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V18 = OracleEngineVersion.of('12.1.0.2.v18', '12.1'); - /** Version "12.1.0.2.v19". */ + /** + * Version "12.1.0.2.v19" + * @deprecated Oracle 12.1.0.2.v19 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V19 = OracleEngineVersion.of('12.1.0.2.v19', '12.1'); - /** Version "12.1.0.2.v20". */ + /** + * Version "12.1.0.2.v20" + * @deprecated Oracle 12.1.0.2.v20 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V20 = OracleEngineVersion.of('12.1.0.2.v20', '12.1'); - /** Version "12.1.0.2.v21". */ + /** + * Version "12.1.0.2.v21" + * @deprecated Oracle 12.1.0.2.v21 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V21 = OracleEngineVersion.of('12.1.0.2.v21', '12.1'); - /** Version "12.1.0.2.v22". */ + /** + * Version "12.1.0.2.v22" + * @deprecated Oracle 12.1.0.2.v22 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V22 = OracleEngineVersion.of('12.1.0.2.v22', '12.1'); - /** Version "12.1.0.2.v23". */ + /** + * Version "12.1.0.2.v23" + * @deprecated Oracle 12.1.0.2.v23 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V23 = OracleEngineVersion.of('12.1.0.2.v23', '12.1'); - /** Version "12.1.0.2.v24". */ + /** + * Version "12.1.0.2.v24" + * @deprecated Oracle 12.1.0.2.v24 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V24 = OracleEngineVersion.of('12.1.0.2.v24', '12.1'); - /** Version "12.1.0.2.v25". */ + /** + * Version "12.1.0.2.v25" + * @deprecated Oracle 12.1.0.2.v25 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V25 = OracleEngineVersion.of('12.1.0.2.v25', '12.1'); - /** Version "12.1.0.2.v26". */ + /** + * Version "12.1.0.2.v26" + * @deprecated Oracle 12.1.0.2.v26 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V26 = OracleEngineVersion.of('12.1.0.2.v26', '12.1'); - /** Version "12.1.0.2.v27". */ + /** + * Version "12.1.0.2.v27" + * @deprecated Oracle 12.1.0.2.v27 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V27 = OracleEngineVersion.of('12.1.0.2.v27', '12.1'); - /** Version "12.1.0.2.v28". */ + /** + * Version "12.1.0.2.v28" + * @deprecated Oracle 12.1.0.2.v28 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V28 = OracleEngineVersion.of('12.1.0.2.v28', '12.1'); - /** Version "12.1.0.2.v29". */ + /** + * Version "12.1.0.2.v29" + * @deprecated Oracle 12.1.0.2.v29 is no longer supported by Amazon RDS. + */ public static readonly VER_12_1_0_2_V29 = OracleEngineVersion.of('12.1.0.2.v29', '12.1'); - /** Version "12.2" (only a major version, without a specific minor version). */ + /** + * Version "12.1" (only a major version, without a specific minor version). + * @deprecated Oracle 12.1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2 = OracleEngineVersion.of('12.2', '12.2'); - /** Version "12.2.0.1.ru-2018-10.rur-2018-10.r1". */ + /** + * Version "12.2.0.1.ru-2018-10.rur-2018-10.r1" + * @deprecated Oracle 12.2.0.1.ru-2018-10.rur-2018-10.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2018_10_R1 = OracleEngineVersion.of('12.2.0.1.ru-2018-10.rur-2018-10.r1', '12.2'); - /** Version "12.2.0.1.ru-2019-01.rur-2019-01.r1". */ + /** + * Version "12.2.0.1.ru-2019-01.rur-2019-01.r1" + * @deprecated Oracle 12.2.0.1.ru-2019-01.rur-2019-01.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2019_01_R1 = OracleEngineVersion.of('12.2.0.1.ru-2019-01.rur-2019-01.r1', '12.2'); - /** Version "12.2.0.1.ru-2019-04.rur-2019-04.r1". */ + /** + * Version "12.2.0.1.ru-2019-04.rur-2019-04.r1" + * @deprecated Oracle 12.2.0.1.ru-2019-04.rur-2019-04.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2019_04_R1 = OracleEngineVersion.of('12.2.0.1.ru-2019-04.rur-2019-04.r1', '12.2'); - /** Version "12.2.0.1.ru-2019-07.rur-2019-07.r1". */ + /** + * Version "12.2.0.1.ru-2019-07.rur-2019-07.r1" + * @deprecated Oracle 12.2.0.1.ru-2019-07.rur-2019-07.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2019_07_R1 = OracleEngineVersion.of('12.2.0.1.ru-2019-07.rur-2019-07.r1', '12.2'); - /** Version "12.2.0.1.ru-2019-10.rur-2019-10.r1". */ + /** + * Version "12.2.0.1.ru-2019-10.rur-2019-10.r1" + * @deprecated Oracle 12.2.0.1.ru-2019-10.rur-2019-10.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2019_10_R1 = OracleEngineVersion.of('12.2.0.1.ru-2019-10.rur-2019-10.r1', '12.2'); - /** Version "12.2.0.1.ru-2020-01.rur-2020-01.r1". */ + /** + * Version "12.2.0.1.ru-2020-01.rur-2020-01.r1" + * @deprecated Oracle 12.2.0.1.ru-2020-01.rur-2020-01.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2020_01_R1 = OracleEngineVersion.of('12.2.0.1.ru-2020-01.rur-2020-01.r1', '12.2'); - /** Version "12.2.0.1.ru-2020-04.rur-2020-04.r1". */ + /** + * Version "12.2.0.1.ru-2020-04.rur-2020-04.r1" + * @deprecated Oracle 12.2.0.1.ru-2020-04.rur-2020-04.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2020_04_R1 = OracleEngineVersion.of('12.2.0.1.ru-2020-04.rur-2020-04.r1', '12.2'); - /** Version "12.2.0.1.ru-2020-07.rur-2020-07.r1". */ + /** + * Version "12.2.0.1.ru-2020-07.rur-2020-07.r1" + * @deprecated Oracle 12.2.0.1.ru-2020-07.rur-2020-07.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2020_07_R1 = OracleEngineVersion.of('12.2.0.1.ru-2020-07.rur-2020-07.r1', '12.2'); - /** Version "12.2.0.1.ru-2021-10.rur-2020-10.r1". */ + /** + * Version "12.2.0.1.ru-2021-10.rur-2020-10.r1" + * @deprecated Oracle 12.2.0.1.ru-2021-10.rur-2020-10.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2020_10_R1 = OracleEngineVersion.of('12.2.0.1.ru-2020-10.rur-2020-10.r1', '12.2'); - /** Version "12.2.0.1.ru-2021-01.rur-2021-01.r1". */ + /** + * Version "12.2.0.1.ru-2021-01.rur-2021-01.r1" + * @deprecated Oracle 12.2.0.1.ru-2021-01.rur-2021-01.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2021_01_R1 = OracleEngineVersion.of('12.2.0.1.ru-2021-01.rur-2021-01.r1', '12.2'); - /** Version "12.2.0.1.ru-2021-04.rur-2021-04.r1". */ + /** + * Version "12.2.0.1.ru-2021-04.rur-2021-04.r1" + * @deprecated Oracle 12.2.0.1.ru-2021-04.rur-2021-04.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2021_04_R1 = OracleEngineVersion.of('12.2.0.1.ru-2021-04.rur-2021-04.r1', '12.2'); - /** Version "12.2.0.1.ru-2021-07.rur-2021-07.r1". */ + /** + * Version "12.2.0.1.ru-2021-07.rur-2021-07.r1" + * @deprecated Oracle 12.2.0.1.ru-2021-07.rur-2021-07.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2021_07_R1 = OracleEngineVersion.of('12.2.0.1.ru-2021-07.rur-2021-07.r1', '12.2'); - /** Version "12.2.0.1.ru-2021-10.rur-2021-10.r1". */ + /** + * Version "12.2.0.1.ru-2021-10.rur-2021-10.r1" + * @deprecated Oracle 12.2.0.1.ru-2021-10.rur-2021-10.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2021_10_R1 = OracleEngineVersion.of('12.2.0.1.ru-2021-10.rur-2021-10.r1', '12.2'); - /** Version "12.2.0.1.ru-2022-01.rur-2022-01.r1". */ + /** + * Version "12.2.0.1.ru-2022-01.rur-2022-01.r1" + * @deprecated Oracle 12.2.0.1.ru-2022-01.rur-2022-01.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_2_0_1_2022_01_R1 = OracleEngineVersion.of('12.2.0.1.ru-2022-01.rur-2022-01.r1', '12.2'); - /** Version "18" (only a major version, without a specific minor version). */ + /** + * Version "18" (only a major version, without a specific minor version). + * @deprecated Oracle 18 is no longer supported by Amazon RDS. + */ public static readonly VER_18 = OracleEngineVersion.of('18', '18'); - /** Version "18.0.0.0.ru-2019-07.rur-2019-07.r1". */ + /** + * Version "18.0.0.0.ru-2019-07.rur-2019-07.r1" + * @deprecated Oracle 18.0.0.0.ru-2019-07.rur-2019-07.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_18_0_0_0_2019_07_R1 = OracleEngineVersion.of('18.0.0.0.ru-2019-07.rur-2019-07.r1', '18'); - /** Version "18.0.0.0.ru-2019-10.rur-2019-10.r1". */ + /** + * Version "18.0.0.0.ru-2019-10.rur-2019-10.r1" + * @deprecated Oracle 18.0.0.0.ru-2019-10.rur-2019-10.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_18_0_0_0_2019_10_R1 = OracleEngineVersion.of('18.0.0.0.ru-2019-10.rur-2019-10.r1', '18'); - /** Version "18.0.0.0.ru-2020-01.rur-2020-01.r1". */ + /** + * Version "18.0.0.0.ru-2020-01.rur-2020-01.r1" + * @deprecated Oracle 18.0.0.0.ru-2020-01.rur-2020-01.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_18_0_0_0_2020_01_R1 = OracleEngineVersion.of('18.0.0.0.ru-2020-01.rur-2020-01.r1', '18'); - /** Version "18.0.0.0.ru-2020-04.rur-2020-04.r1". */ + /** + * Version "18.0.0.0.ru-2020-04.rur-2020-04.r1" + * @deprecated Oracle 18.0.0.0.ru-2020-04.rur-2020-04.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_18_0_0_0_2020_04_R1 = OracleEngineVersion.of('18.0.0.0.ru-2020-04.rur-2020-04.r1', '18'); - /** Version "18.0.0.0.ru-2020-07.rur-2020-07.r1". */ + /** + * Version "18.0.0.0.ru-2020-07.rur-2020-07.r1" + * @deprecated Oracle 18.0.0.0.ru-2020-07.rur-2020-07.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_18_0_0_0_2020_07_R1 = OracleEngineVersion.of('18.0.0.0.ru-2020-07.rur-2020-07.r1', '18'); - /** Version "18.0.0.0.ru-2020-10.rur-2020-10.r1". */ + /** + * Version "18.0.0.0.ru-2020-10.rur-2020-10.r1" + * @deprecated Oracle 18.0.0.0.ru-2020-10.rur-2020-10.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_18_0_0_0_2020_10_R1 = OracleEngineVersion.of('18.0.0.0.ru-2020-10.rur-2020-10.r1', '18'); - /** Version "18.0.0.0.ru-2021-01.rur-2021-01.r1". */ + /** + * Version "18.0.0.0.ru-2021-01.rur-2021-01.r1" + * @deprecated Oracle 18.0.0.0.ru-2021-01.rur-2021-01.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_18_0_0_0_2021_01_R1 = OracleEngineVersion.of('18.0.0.0.ru-2021-01.rur-2021-01.r1', '18'); - /** Version "18.0.0.0.ru-2021-04.rur-2021-04.r1". */ + /** + * Version "18.0.0.0.ru-2021-04.rur-2021-04.r1" + * @deprecated Oracle 18.0.0.0.ru-2021-04.rur-2021-04.r1 is no longer supported by Amazon RDS. + */ public static readonly VER_18_0_0_0_2021_04_R1 = OracleEngineVersion.of('18.0.0.0.ru-2021-04.rur-2021-04.r1', '18'); /** Version "19" (only a major version, without a specific minor version). */ @@ -1596,12 +1996,16 @@ export class OracleEngineVersion { public static readonly VER_19_0_0_0_2022_10_R1 = OracleEngineVersion.of('19.0.0.0.ru-2022-10.rur-2022-10.r1', '19'); /** Version "19.0.0.0.ru-2023-01.rur-2023-01.r1". */ public static readonly VER_19_0_0_0_2023_01_R1 = OracleEngineVersion.of('19.0.0.0.ru-2023-01.rur-2023-01.r1', '19'); + /** Version "19.0.0.0.ru-2023-01.rur-2023-01.r2". */ + public static readonly VER_19_0_0_0_2023_01_R2 = OracleEngineVersion.of('19.0.0.0.ru-2023-01.rur-2023-01.r2', '19'); /** Version "19.0.0.0.ru-2023-04.rur-2023-04.r1". */ public static readonly VER_19_0_0_0_2023_04_R1 = OracleEngineVersion.of('19.0.0.0.ru-2023-04.rur-2023-04.r1', '19'); /** Version "19.0.0.0.ru-2023-07.rur-2023-07.r1" */ public static readonly VER_19_0_0_0_2023_07_R1 = OracleEngineVersion.of('19.0.0.0.ru-2023-07.rur-2023-07.r1', '19'); /** Version "19.0.0.0.ru-2023-10.rur-2023-10.r1" */ public static readonly VER_19_0_0_0_2023_10_R1 = OracleEngineVersion.of('19.0.0.0.ru-2023-10.rur-2023-10.r1', '19'); + /** Version "19.0.0.0.ru-2024-01.rur-2024-01.r1". */ + public static readonly VER_19_0_0_0_2024_01_R1 = OracleEngineVersion.of('19.0.0.0.ru-2024-01.rur-2024-01.r1', '19'); /** Version "21" (only a major version, without a specific minor version). */ public static readonly VER_21 = OracleEngineVersion.of('21', '21'); @@ -1615,12 +2019,16 @@ export class OracleEngineVersion { public static readonly VER_21_0_0_0_2022_10_R1 = OracleEngineVersion.of('21.0.0.0.ru-2022-10.rur-2022-10.r1', '21'); /** Version "21.0.0.0.ru-2023-01.rur-2023-01.r1". */ public static readonly VER_21_0_0_0_2023_01_R1 = OracleEngineVersion.of('21.0.0.0.ru-2023-01.rur-2023-01.r1', '21'); + /** Version "21.0.0.0.ru-2023-01.rur-2023-01.r2". */ + public static readonly VER_21_0_0_0_2023_01_R2 = OracleEngineVersion.of('21.0.0.0.ru-2023-01.rur-2023-01.r2', '21'); /** Version "21.0.0.0.ru-2023-04.rur-2023-04.r1". */ public static readonly VER_21_0_0_0_2023_04_R1 = OracleEngineVersion.of('21.0.0.0.ru-2023-04.rur-2023-04.r1', '21'); /** Version "21.0.0.0.ru-2023-07.rur-2023-07.r1". */ public static readonly VER_21_0_0_0_2023_07_R1 = OracleEngineVersion.of('21.0.0.0.ru-2023-07.rur-2023-07.r1', '21'); /** Version "21.0.0.0.ru-2023-10.rur-2023-10.r1". */ public static readonly VER_21_0_0_0_2023_10_R1 = OracleEngineVersion.of('21.0.0.0.ru-2023-10.rur-2023-10.r1', '21'); + /** Version "21.0.0.0.ru-2024-01.rur-2024-01.r1". */ + public static readonly VER_21_0_0_0_2024_01_R1 = OracleEngineVersion.of('21.0.0.0.ru-2024-01.rur-2024-01.r1', '21'); /** * Creates a new OracleEngineVersion with an arbitrary version. @@ -1841,67 +2249,159 @@ class OracleEeCdbInstanceEngine extends OracleInstanceEngineBase { * and `DatabaseInstanceEngine.sqlServerEe`). */ export class SqlServerEngineVersion { - /** Version "11.00" (only a major version, without a specific minor version). */ + /** + * Version "11.00" (only a major version, without a specific minor version). + * @deprecated SQL Server 11.00 is no longer supported by Amazon RDS. + */ public static readonly VER_11 = SqlServerEngineVersion.of('11.00', '11.00'); - /** Version "11.00.5058.0.v1". */ + /** + * Version "11.00.5058.0.v1". + * @deprecated SQL Server 11.00.5058.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_11_00_5058_0_V1 = SqlServerEngineVersion.of('11.00.5058.0.v1', '11.00'); - /** Version "11.00.6020.0.v1". */ + /** + * Version "11.00.6020.0.v1". + * @deprecated SQL Server 11.00.6020.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_11_00_6020_0_V1 = SqlServerEngineVersion.of('11.00.6020.0.v1', '11.00'); - /** Version "11.00.6594.0.v1". */ + /** + * Version "11.00.6594.0.v1". + * @deprecated SQL Server 11.00.6594.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_11_00_6594_0_V1 = SqlServerEngineVersion.of('11.00.6594.0.v1', '11.00'); - /** Version "11.00.7462.6.v1". */ + /** + * Version "11.00.7462.6.v1". + * @deprecated SQL Server 11.00.7462.6.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_11_00_7462_6_V1 = SqlServerEngineVersion.of('11.00.7462.6.v1', '11.00'); - /** Version "11.00.7493.4.v1". */ + /** + * Version "11.00.7493.4.v1". + * @deprecated SQL Server 11.00.7493.4.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_11_00_7493_4_V1 = SqlServerEngineVersion.of('11.00.7493.4.v1', '11.00'); - /** Version "12.00" (only a major version, without a specific minor version). */ + /** + * Version "12.00" (only a major version, without a specific minor version). + * @deprecated SQL Server 12.00 is no longer supported by Amazon RDS. + */ public static readonly VER_12 = SqlServerEngineVersion.of('12.00', '12.00'); - /** Version "12.00.5000.0.v1". */ + /** + * Version "12.00.4422.0.v1" + * @deprecated SQL Server 12.00.4422.0.v1 is no longer supported by Amazon RDS. + */ + public static readonly VER_12_00_4422_0_V1 = SqlServerEngineVersion.of('12.00.4422.0.v1', '12.00'); + /** + * Version "12.00.5000.0.v1". + * @deprecated SQL Server 12.00.5000.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_00_5000_0_V1 = SqlServerEngineVersion.of('12.00.5000.0.v1', '12.00'); - /** Version "12.00.5546.0.v1". */ + /** + * Version "12.00.5546.0.v1". + * @deprecated SQL Server 12.00.5546.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_00_5546_0_V1 = SqlServerEngineVersion.of('12.00.5546.0.v1', '12.00'); - /** Version "12.00.5571.0.v1". */ + /** + * Version "12.00.5571.0.v1". + * @deprecated SQL Server 12.00.5571.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_00_5571_0_V1 = SqlServerEngineVersion.of('12.00.5571.0.v1', '12.00'); - /** Version "12.00.6293.0.v1". */ + /** + * Version "12.00.6293.0.v1". + * @deprecated SQL Server 12.00.6293.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_00_6293_0_V1 = SqlServerEngineVersion.of('12.00.6293.0.v1', '12.00'); - /** Version "12.00.6329.1.v1". */ + /** + * Version "12.00.6329.1.v1". + * @deprecated SQL Server 12.00.6329.1.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_00_6329_1_V1 = SqlServerEngineVersion.of('12.00.6329.1.v1', '12.00'); - /** Version "12.00.6433.1.v1". */ + /** + * Version "12.00.6433.1.v1". + * @deprecated SQL Server 12.00.6433.1.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_00_6433_1_V1 = SqlServerEngineVersion.of('12.00.6433.1.v1', '12.00'); - /** Version "12.00.6439.10.v1". */ + /** + * Version "12.00.6439.10.v1". + * @deprecated SQL Server 12.00.6439.10.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_00_6439_10_V1 = SqlServerEngineVersion.of('12.00.6439.10.v1', '12.00'); - /** Version "12.00.6444.4.v1". */ + /** + * Version "12.00.6444.4.v1". + * @deprecated SQL Server 12.00.6444.4.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_00_6444_4_V1 = SqlServerEngineVersion.of('12.00.6444.4.v1', '12.00'); - /** Version "12.00.6449.1.v1". */ + /** + * Version "12.00.6449.1.v1". + * @deprecated SQL Server 12.00.6449.1.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_12_00_6449_1_V1 = SqlServerEngineVersion.of('12.00.6449.1.v1', '12.00'); /** Version "13.00" (only a major version, without a specific minor version). */ public static readonly VER_13 = SqlServerEngineVersion.of('13.00', '13.00'); - /** Version "13.00.2164.0.v1". */ + /** + * Version "13.00.2164.0.v1". + * @deprecated SQL Server 13.00.2164.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_2164_0_V1 = SqlServerEngineVersion.of('13.00.2164.0.v1', '13.00'); - /** Version "13.00.4422.0.v1". */ + /** + * Version "13.00.4422.0.v1". + * @deprecated SQL Server 13.00.4422.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_4422_0_V1 = SqlServerEngineVersion.of('13.00.4422.0.v1', '13.00'); - /** Version "13.00.4451.0.v1". */ + /** + * Version "13.00.4451.0.v1". + * @deprecated SQL Server 13.00.4451.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_4451_0_V1 = SqlServerEngineVersion.of('13.00.4451.0.v1', '13.00'); - /** Version "13.00.4466.4.v1". */ + /** + * Version "13.00.4466.4.v1". + * @deprecated SQL Server 13.00.4466.4.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_4466_4_V1 = SqlServerEngineVersion.of('13.00.4466.4.v1', '13.00'); - /** Version "13.00.4522.0.v1". */ + /** + * Version "13.00.4522.0.v1". + * @deprecated SQL Server 13.00.4522.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_4522_0_V1 = SqlServerEngineVersion.of('13.00.4522.0.v1', '13.00'); - /** Version "13.00.5216.0.v1". */ + /** + * Version "13.00.5216.0.v1". + * @deprecated SQL Server 13.00.5216.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_5216_0_V1 = SqlServerEngineVersion.of('13.00.5216.0.v1', '13.00'); - /** Version "13.00.5292.0.v1". */ + /** + * Version "13.00.5292.0.v1". + * @deprecated SQL Server 13.00.5292.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_5292_0_V1 = SqlServerEngineVersion.of('13.00.5292.0.v1', '13.00'); - /** Version "13.00.5366.0.v1". */ + /** + * Version "13.00.5366.0.v1". + * @deprecated SQL Server 13.00.5366.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_5366_0_V1 = SqlServerEngineVersion.of('13.00.5366.0.v1', '13.00'); - /** Version "13.00.5426.0.v1". */ + /** + * Version "13.00.5426.0.v1". + * @deprecated SQL Server 13.00.5426.0.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_5426_0_V1 = SqlServerEngineVersion.of('13.00.5426.0.v1', '13.00'); - /** Version "13.00.5598.27.v1". */ + /** + * Version "13.00.5598.27.v1". + * @deprecated SQL Server 13.00.5598.27.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_5598_27_V1 = SqlServerEngineVersion.of('13.00.5598.27.v1', '13.00'); - /** Version "13.00.5820.21.v1". */ + /** + * Version "13.00.5820.21.v1". + * @deprecated SQL Server 13.00.5820.21.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_5820_21_V1 = SqlServerEngineVersion.of('13.00.5820.21.v1', '13.00'); - /** Version "13.00.5850.14.v1". */ + /** + * Version "13.00.5850.14.v1". + * @deprecated SQL Server 13.00.5850.14.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_5850_14_V1 = SqlServerEngineVersion.of('13.00.5850.14.v1', '13.00'); - /** Version "13.00.5882.1.v1". */ + /** + * Version "13.00.5882.1.v1". + * @deprecated SQL Server 13.00.5882.1.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_13_00_5882_1_V1 = SqlServerEngineVersion.of('13.00.5882.1.v1', '13.00'); /** Version "13.00.6300.2.v1". */ public static readonly VER_13_00_6300_2_V1 = SqlServerEngineVersion.of('13.00.6300.2.v1', '13.00'); @@ -1914,20 +2414,35 @@ export class SqlServerEngineVersion { /** Version "14.00" (only a major version, without a specific minor version). */ public static readonly VER_14 = SqlServerEngineVersion.of('14.00', '14.00'); - /** Version "14.00.1000.169.v1". */ + /** + * Version "14.00.1000.169.v1". + * @deprecated SQL Server 14.00.1000.169.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_14_00_1000_169_V1 = SqlServerEngineVersion.of('14.00.1000.169.v1', '14.00'); - /** Version "14.00.3015.40.v1". */ + /** + * Version "14.00.3015.40.v1". + * @deprecated SQL Server 14.00.3015.40.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_14_00_3015_40_V1 = SqlServerEngineVersion.of('14.00.3015.40.v1', '14.00'); - /** Version "14.00.3035.2.v1". */ + /** + * Version "14.00.3035.2.v1". + * @deprecated SQL Server 14.00.3035.2.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_14_00_3035_2_V1 = SqlServerEngineVersion.of('14.00.3035.2.v1', '14.00'); - /** Version "14.00.3049.1.v1". */ + /** + * Version "14.00.3049.1.v1". + * @deprecated SQL Server 14.00.3049.1.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_14_00_3049_1_V1 = SqlServerEngineVersion.of('14.00.3049.1.v1', '14.00'); /** * Version "14.00.3192.2.v1". - * @deprecated SQL Server version 14.00.3192.2.v1 reached end of life + * @deprecated SQL Server 14.00.3192.2.v1 is no longer supported by Amazon RDS. */ public static readonly VER_14_00_3192_2_V1 = SqlServerEngineVersion.of('14.00.3192.2.v1', '14.00'); - /** Version "14.00.3223.3.v1". */ + /** + * Version "14.00.3223.3.v1". + * @deprecated SQL Server 14.00.3223.3.v1 is no longer supported by Amazon RDS. + */ public static readonly VER_14_00_3223_3_V1 = SqlServerEngineVersion.of('14.00.3223.3.v1', '14.00'); /** Version "14.00.3281.6.v1". */ public static readonly VER_14_00_3281_6_V1 = SqlServerEngineVersion.of('14.00.3281.6.v1', '14.00'); @@ -1952,6 +2467,8 @@ export class SqlServerEngineVersion { public static readonly VER_15 = SqlServerEngineVersion.of('15.00', '15.00'); /** Version "15.00.4043.16.v1". */ public static readonly VER_15_00_4043_16_V1 = SqlServerEngineVersion.of('15.00.4043.16.v1', '15.00'); + /** Version "15.00.4355.3.v1". */ + public static readonly VER_15_00_4355_3_V1 = SqlServerEngineVersion.of('15.00.4355.3.v1', '15.00'); /** * Version "15.00.4043.23.v1". * @deprecated This version is erroneous. You might be looking for `SqlServerEngineVersion.VER_15_00_4073_23_V1`, instead. @@ -1982,6 +2499,8 @@ export class SqlServerEngineVersion { public static readonly VER_16_00_4085_2_V1 = SqlServerEngineVersion.of('16.00.4085.2.v1', '16.00'); /** Version "16.00.4095.4.v1". */ public static readonly VER_16_00_4095_4_V1 = SqlServerEngineVersion.of('16.00.4095.4.v1', '16.00'); + /** Version "16.00.4105.2.v1". */ + public static readonly VER_16_00_4105_2_V1 = SqlServerEngineVersion.of('16.00.4105.2.v1', '16.00'); /** * Create a new SqlServerEngineVersion with an arbitrary version. From 840ec977b09a48395c6be411250836edbc81b14c Mon Sep 17 00:00:00 2001 From: Jimmy Gaussen Date: Mon, 11 Mar 2024 21:37:07 +0100 Subject: [PATCH 07/18] chore(ec2): add missing instance types (#29427) ### Issue # (if applicable) Closes #23854 ### Reason for this change Update the CDK EC2 instance class and size enums to match the current availability ### Description of changes Added the missing instance class and sizes ### Description of how you validated changes This was generated with the help of the same tool I used to create #29422, using the live SDK data to match against the CDK. For the instance types, I am using the `DescribeInstanceTypes` API command in multiple regions (`us-east-1`, `us-east-2`, `us-west-1`, `eu-west-1`.) As far as I could tell, the union of `us-east-1` and `us-east-2` cover all possible instance classes and sizes, but correct me if I'm wrong. As a sanity check, I'm also checking that the CDK does not have more instance types and sizes that the SDK does. It does vary between regions, but of note, there were: * `p4de`, in developer preview * `x2g`, RDS exclusive and not returned by `DescribeInstanceTypes` Finally, I am ignoring some of the previous generation instance classes missing from the CDK, as they are very outdated and weren't added in first place, i.e. `c1`, `t1`, `m1`, `m2`, and `i2`. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-cdk-lib/aws-ec2/lib/instance-types.ts | 99 ++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts b/packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts index bcf63f59a0260..890363932a68f 100644 --- a/packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts +++ b/packages/aws-cdk-lib/aws-ec2/lib/instance-types.ts @@ -1110,6 +1110,36 @@ export enum InstanceClass { */ MAC1 = 'mac1', + /** + * Macintosh instances built on Apple Mac mini 2020 computers, 2nd generation with Apple silicon M1 processors + */ + MACINTOSH2_M1 = 'macintosh2-m1', + + /** + * Macintosh instances built on Apple Mac mini 2020 computers, 2nd generation with Apple silicon M1 processors + */ + MAC2 = 'mac2', + + /** + * Macintosh instances built on Apple Mac mini 2023 computers, 2nd generation with Apple silicon M2 processors + */ + MACINTOSH2_M2 = 'macintosh2-m2', + + /** + * Macintosh instances built on Apple Mac mini 2023 computers, 2nd generation with Apple silicon M2 processors + */ + MAC2_M2 = 'mac2-m2', + + /** + * Macintosh instances built on Apple Mac mini 2023 computers, 2nd generation with Apple silicon M2 Pro processors + */ + MACINTOSH2_M2_PRO = 'macintosh2-m2-pro', + + /** + * Macintosh instances built on Apple Mac mini 2023 computers, 2nd generation with Apple silicon M2 Pro processors + */ + MAC2_M2PRO = 'mac2-m2pro', + /** * Multi-stream video transcoding instances for resolutions up to 4K UHD, 1st generation */ @@ -1130,6 +1160,36 @@ export enum InstanceClass { */ HPC6A = 'hpc6a', + /** + * High performance computing with local NVME drive based on 6th generation with Intel Xeon Scalable processors (3rd generation processors code named Ice Lake), 6th generation + */ + HIGH_PERFORMANCE_COMPUTING6_INTEL_NVME_DRIVE = 'high-performance-computing6-intel-nvme-drive', + + /** + * High performance computing with local NVME drive based on 6th generation with Intel Xeon Scalable processors (3rd generation processors code named Ice Lake), 6th generation + */ + HPC6ID = 'hpc6id', + + /** + * High performance computing based on AMD EPYC, 7th generation + */ + HIGH_PERFORMANCE_COMPUTING7_AMD = 'high-performance-computing7-amd', + + /** + * High performance computing based on AMD EPYC, 7th generation + */ + HPC7A = 'hpc7a', + + /** + * High performance computing based on Graviton, 7th generation + */ + HIGH_PERFORMANCE_COMPUTING7_GRAVITON = 'high-performance-computing7-graviton', + + /** + * High performance computing based on Graviton, 7th generation + */ + HPC7G = 'hpc7g', + /** * Deep learning instances powered by Gaudi accelerators from Habana Labs (an Intel company), 1st generation */ @@ -1261,7 +1321,12 @@ export enum InstanceSize { XLARGE56 = '56xlarge', /** - * Instance size XLARGE56 (112xlarge) + * Instance size XLARGE96 (96xlarge) + */ + XLARGE96 = '96xlarge', + + /** + * Instance size XLARGE112 (112xlarge) */ XLARGE112 = '112xlarge', @@ -1269,6 +1334,26 @@ export enum InstanceSize { * Instance size METAL (metal) */ METAL = 'metal', + + /** + * Instance size XLARGE16METAL (metal-16xl) + */ + XLARGE16METAL = 'metal-16xl', + + /** + * Instance size XLARGE24METAL (metal-24xl) + */ + XLARGE24METAL = 'metal-24xl', + + /** + * Instance size XLARGE32METAL (metal-32xl) + */ + XLARGE32METAL = 'metal-32xl', + + /** + * Instance size XLARGE48METAL (metal-48xl) + */ + XLARGE48METAL = 'metal-48xl', } /** @@ -1495,10 +1580,22 @@ export class InstanceType { [InstanceClass.INF2]: 'inf2', [InstanceClass.MACINTOSH1_INTEL]: 'mac1', [InstanceClass.MAC1]: 'mac1', + [InstanceClass.MACINTOSH2_M1]: 'mac2', + [InstanceClass.MAC2]: 'mac2', + [InstanceClass.MACINTOSH2_M2]: 'mac2-m2', + [InstanceClass.MAC2_M2]: 'mac2-m2', + [InstanceClass.MACINTOSH2_M2_PRO]: 'mac2-m2pro', + [InstanceClass.MAC2_M2PRO]: 'mac2-m2pro', [InstanceClass.VIDEO_TRANSCODING1]: 'vt1', [InstanceClass.VT1]: 'vt1', [InstanceClass.HIGH_PERFORMANCE_COMPUTING6_AMD]: 'hpc6a', [InstanceClass.HPC6A]: 'hpc6a', + [InstanceClass.HIGH_PERFORMANCE_COMPUTING6_INTEL_NVME_DRIVE]: 'hpc6id', + [InstanceClass.HPC6ID]: 'hpc6id', + [InstanceClass.HIGH_PERFORMANCE_COMPUTING7_AMD]: 'hpc7a', + [InstanceClass.HPC7A]: 'hpc7a', + [InstanceClass.HIGH_PERFORMANCE_COMPUTING7_GRAVITON]: 'hpc7g', + [InstanceClass.HPC7G]: 'hpc7g', [InstanceClass.I4I]: 'i4i', [InstanceClass.IO4_INTEL]: 'i4i', [InstanceClass.X2IEDN]: 'x2iedn', From 5592553ac5edc6b2c29a786031b8bec139b2aef7 Mon Sep 17 00:00:00 2001 From: kazuho cryer-shinozuka Date: Tue, 12 Mar 2024 08:53:07 +0900 Subject: [PATCH 08/18] feat(stepfunctions-tasks): start glue crawler (#29016) ### Issue Closes #24188. ### Reason for this change AWS Step Functions supports the ability to start a Glue Crawler as a task within a state machine. However, this is not configurable. ### Description of changes I've implemented `GlueStartCrawlerRun` class in stepfunctions-tasks and we can create start crawler task easily: ```ts const task = new GlueStartCrawlerRun(stack, 'Task', { crawlerName: 'glue-crawler-name', }); ``` ### Description of how you validated changes I've added both unit and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --------- Co-authored-by: Luca Pizzini Co-authored-by: GZ --- ...efaultTestDeployAssertA6573788.assets.json | 19 + ...aultTestDeployAssertA6573788.template.json | 36 ++ .../aws-cdk-glue-crawler.assets.json | 19 + .../aws-cdk-glue-crawler.template.json | 214 +++++++++ .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 149 +++++++ .../tree.json | 416 ++++++++++++++++++ .../test/glue/integ.glue-start-crawler.ts | 63 +++ .../aws-stepfunctions-tasks/README.md | 22 + .../lib/glue/start-crawler-run.ts | 61 +++ .../aws-stepfunctions-tasks/lib/index.ts | 1 + .../test/glue/start-crawler-run.test.ts | 76 ++++ 13 files changed, 1089 insertions(+) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/aws-cdk-glue-crawler.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/aws-cdk-glue-crawler.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.ts create mode 100644 packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/glue/start-crawler-run.ts create mode 100644 packages/aws-cdk-lib/aws-stepfunctions-tasks/test/glue/start-crawler-run.test.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.assets.json new file mode 100644 index 0000000000000..2b4cb4f0e4ce1 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/aws-cdk-glue-crawler.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/aws-cdk-glue-crawler.assets.json new file mode 100644 index 0000000000000..929c70bebc213 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/aws-cdk-glue-crawler.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "2696c3da684e3f0b5017ac207dcb6b3e007ba12083d1a7ae40e3e1b0fb6b584e": { + "source": { + "path": "aws-cdk-glue-crawler.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "2696c3da684e3f0b5017ac207dcb6b3e007ba12083d1a7ae40e3e1b0fb6b584e.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/aws-cdk-glue-crawler.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/aws-cdk-glue-crawler.template.json new file mode 100644 index 0000000000000..b26c0776ea56b --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/aws-cdk-glue-crawler.template.json @@ -0,0 +1,214 @@ +{ + "Resources": { + "Bucket83908E77": { + "Type": "AWS::S3::Bucket", + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "GluecrawlwerRole4E24839F": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "glue.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSGlueServiceRole" + ] + ] + } + ] + } + }, + "Database": { + "Type": "AWS::Glue::Database", + "Properties": { + "CatalogId": { + "Ref": "AWS::AccountId" + }, + "DatabaseInput": { + "Description": "My database", + "Name": "my-database" + } + } + }, + "Crawler": { + "Type": "AWS::Glue::Crawler", + "Properties": { + "DatabaseName": { + "Ref": "Database" + }, + "Role": { + "Fn::GetAtt": [ + "GluecrawlwerRole4E24839F", + "Arn" + ] + }, + "Targets": { + "S3Targets": [ + { + "Path": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "Bucket83908E77" + }, + "/" + ] + ] + } + } + ] + } + } + }, + "StateMachineRole543B9670": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "StateMachineRoleDefaultPolicyDA5F7DA8": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "glue:GetCrawler", + "glue:StartCrawler" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":glue:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":crawler/", + { + "Ref": "Crawler" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "StateMachineRoleDefaultPolicyDA5F7DA8", + "Roles": [ + { + "Ref": "StateMachineRole543B9670" + } + ] + } + }, + "StateMachine81935E76": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"Start Task\",\"States\":{\"Start Task\":{\"Type\":\"Pass\",\"Next\":\"Glue Crawler Task\"},\"Glue Crawler Task\":{\"Next\":\"End Task\",\"Type\":\"Task\",\"Resource\":\"arn:", + { + "Ref": "AWS::Partition" + }, + ":states:::aws-sdk:glue:startCrawler\",\"Parameters\":{\"Name\":\"", + { + "Ref": "Crawler" + }, + "\"}},\"End Task\":{\"Type\":\"Pass\",\"End\":true}}}" + ] + ] + }, + "RoleArn": { + "Fn::GetAtt": [ + "StateMachineRole543B9670", + "Arn" + ] + } + }, + "DependsOn": [ + "StateMachineRoleDefaultPolicyDA5F7DA8", + "StateMachineRole543B9670" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/integ.json new file mode 100644 index 0000000000000..e7e16aaf4c251 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "EcsDeploymentConfigTest/DefaultTest": { + "stacks": [ + "aws-cdk-glue-crawler" + ], + "assertionStack": "EcsDeploymentConfigTest/DefaultTest/DeployAssert", + "assertionStackName": "EcsDeploymentConfigTestDefaultTestDeployAssertA6573788" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/manifest.json new file mode 100644 index 0000000000000..9914823b67fd3 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/manifest.json @@ -0,0 +1,149 @@ +{ + "version": "36.0.0", + "artifacts": { + "aws-cdk-glue-crawler.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-glue-crawler.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-glue-crawler": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-glue-crawler.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2696c3da684e3f0b5017ac207dcb6b3e007ba12083d1a7ae40e3e1b0fb6b584e.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-glue-crawler.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-cdk-glue-crawler.assets" + ], + "metadata": { + "/aws-cdk-glue-crawler/Bucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Bucket83908E77" + } + ], + "/aws-cdk-glue-crawler/Glue crawlwer Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "GluecrawlwerRole4E24839F" + } + ], + "/aws-cdk-glue-crawler/Database": [ + { + "type": "aws:cdk:logicalId", + "data": "Database" + } + ], + "/aws-cdk-glue-crawler/Crawler": [ + { + "type": "aws:cdk:logicalId", + "data": "Crawler" + } + ], + "/aws-cdk-glue-crawler/State Machine/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "StateMachineRole543B9670" + } + ], + "/aws-cdk-glue-crawler/State Machine/Role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "StateMachineRoleDefaultPolicyDA5F7DA8" + } + ], + "/aws-cdk-glue-crawler/State Machine/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "StateMachine81935E76" + } + ], + "/aws-cdk-glue-crawler/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-glue-crawler/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-glue-crawler" + }, + "EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "EcsDeploymentConfigTestDefaultTestDeployAssertA6573788": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "EcsDeploymentConfigTestDefaultTestDeployAssertA6573788.assets" + ], + "metadata": { + "/EcsDeploymentConfigTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/EcsDeploymentConfigTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "EcsDeploymentConfigTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/tree.json new file mode 100644 index 0000000000000..d58012eebd2e3 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.js.snapshot/tree.json @@ -0,0 +1,416 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-glue-crawler": { + "id": "aws-cdk-glue-crawler", + "path": "aws-cdk-glue-crawler", + "children": { + "Bucket": { + "id": "Bucket", + "path": "aws-cdk-glue-crawler/Bucket", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-glue-crawler/Bucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.CfnBucket", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_s3.Bucket", + "version": "0.0.0" + } + }, + "Glue crawlwer Role": { + "id": "Glue crawlwer Role", + "path": "aws-cdk-glue-crawler/Glue crawlwer Role", + "children": { + "ImportGlue crawlwer Role": { + "id": "ImportGlue crawlwer Role", + "path": "aws-cdk-glue-crawler/Glue crawlwer Role/ImportGlue crawlwer Role", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-glue-crawler/Glue crawlwer Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "glue.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "managedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSGlueServiceRole" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Database": { + "id": "Database", + "path": "aws-cdk-glue-crawler/Database", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Glue::Database", + "aws:cdk:cloudformation:props": { + "catalogId": { + "Ref": "AWS::AccountId" + }, + "databaseInput": { + "name": "my-database", + "description": "My database" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_glue.CfnDatabase", + "version": "0.0.0" + } + }, + "Crawler": { + "id": "Crawler", + "path": "aws-cdk-glue-crawler/Crawler", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Glue::Crawler", + "aws:cdk:cloudformation:props": { + "databaseName": { + "Ref": "Database" + }, + "role": { + "Fn::GetAtt": [ + "GluecrawlwerRole4E24839F", + "Arn" + ] + }, + "targets": { + "s3Targets": [ + { + "path": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "Bucket83908E77" + }, + "/" + ] + ] + } + } + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_glue.CfnCrawler", + "version": "0.0.0" + } + }, + "Glue Crawler Task": { + "id": "Glue Crawler Task", + "path": "aws-cdk-glue-crawler/Glue Crawler Task", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.GlueStartCrawlerRun", + "version": "0.0.0" + } + }, + "Start Task": { + "id": "Start Task", + "path": "aws-cdk-glue-crawler/Start Task", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_stepfunctions.Pass", + "version": "0.0.0" + } + }, + "End Task": { + "id": "End Task", + "path": "aws-cdk-glue-crawler/End Task", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_stepfunctions.Pass", + "version": "0.0.0" + } + }, + "State Machine": { + "id": "State Machine", + "path": "aws-cdk-glue-crawler/State Machine", + "children": { + "Role": { + "id": "Role", + "path": "aws-cdk-glue-crawler/State Machine/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-cdk-glue-crawler/State Machine/Role/ImportRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-glue-crawler/State Machine/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-glue-crawler/State Machine/Role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-glue-crawler/State Machine/Role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "glue:GetCrawler", + "glue:StartCrawler" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":glue:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":crawler/", + { + "Ref": "Crawler" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "StateMachineRoleDefaultPolicyDA5F7DA8", + "roles": [ + { + "Ref": "StateMachineRole543B9670" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-glue-crawler/State Machine/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine", + "aws:cdk:cloudformation:props": { + "definitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"Start Task\",\"States\":{\"Start Task\":{\"Type\":\"Pass\",\"Next\":\"Glue Crawler Task\"},\"Glue Crawler Task\":{\"Next\":\"End Task\",\"Type\":\"Task\",\"Resource\":\"arn:", + { + "Ref": "AWS::Partition" + }, + ":states:::aws-sdk:glue:startCrawler\",\"Parameters\":{\"Name\":\"", + { + "Ref": "Crawler" + }, + "\"}},\"End Task\":{\"Type\":\"Pass\",\"End\":true}}}" + ] + ] + }, + "roleArn": { + "Fn::GetAtt": [ + "StateMachineRole543B9670", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-glue-crawler/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-glue-crawler/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "EcsDeploymentConfigTest": { + "id": "EcsDeploymentConfigTest", + "path": "EcsDeploymentConfigTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "EcsDeploymentConfigTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "EcsDeploymentConfigTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "EcsDeploymentConfigTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "EcsDeploymentConfigTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "EcsDeploymentConfigTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.ts new file mode 100644 index 0000000000000..6b69a7fda3f0e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/glue/integ.glue-start-crawler.ts @@ -0,0 +1,63 @@ +import * as glue from 'aws-cdk-lib/aws-glue'; +import * as iam from 'aws-cdk-lib/aws-iam'; +import * as sfn from 'aws-cdk-lib/aws-stepfunctions'; +import * as s3 from 'aws-cdk-lib/aws-s3'; +import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks'; +import * as integ from '@aws-cdk/integ-tests-alpha'; +import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; + +class TestStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + const bucket = new s3.Bucket(this, 'Bucket', { + removalPolicy: RemovalPolicy.DESTROY, + }); + + const jobRole = new iam.Role(this, 'Glue crawlwer Role', { + assumedBy: new iam.ServicePrincipal('glue.amazonaws.com'), + managedPolicies: [ + iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSGlueServiceRole'), + ], + }); + + const database = new glue.CfnDatabase(this, 'Database', { + catalogId: Stack.of(this).account, + databaseInput: { + name: 'my-database', + description: 'My database', + }, + }); + + const crawler = new glue.CfnCrawler(this, 'Crawler', { + databaseName: database.ref, + role: jobRole.roleArn, + targets: { + s3Targets: [ + { + path: `s3://${bucket.bucketName}/`, + }, + ], + }, + }); + + const crawlerTask = new tasks.GlueStartCrawlerRun(this, 'Glue Crawler Task', { + crawlerName: crawler.ref, + }); + + const startTask = new sfn.Pass(this, 'Start Task'); + const endTask = new sfn.Pass(this, 'End Task'); + + new sfn.StateMachine(this, 'State Machine', { + definition: sfn.Chain.start(startTask).next(crawlerTask).next(endTask), + }); + } +} + +const app = new App(); +const stack = new TestStack(app, 'aws-cdk-glue-crawler'); + +new integ.IntegTest(app, 'EcsDeploymentConfigTest', { + testCases: [stack], +}); diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/README.md b/packages/aws-cdk-lib/aws-stepfunctions-tasks/README.md index 7d6d69da5df58..17ab14275f6bb 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/README.md +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/README.md @@ -1080,6 +1080,8 @@ new tasks.EventBridgePutEvents(this, 'Send an event to EventBridge', { Step Functions supports [AWS Glue](https://docs.aws.amazon.com/step-functions/latest/dg/connect-glue.html) through the service integration pattern. +### StartJobRun + You can call the [`StartJobRun`](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-runs.html#aws-glue-api-jobs-runs-StartJobRun) API from a `Task` state. ```ts @@ -1093,6 +1095,26 @@ new tasks.GlueStartJobRun(this, 'Task', { }); ``` +### StartCrawlerRun + +You can call the [`StartCrawler`](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-crawler-crawling.html#aws-glue-api-crawler-crawling-StartCrawler) API from a `Task` state through AWS SDK service integrations. + +```ts +import * as glue from 'aws-cdk-lib/aws-glue'; + +declare const myCrawler: glue.CfnCrawler; + +// You can get the crawler name from `crawler.ref` +new tasks.GlueStartCrawlerRun(this, 'Task1', { + crawlerName: myCrawler.ref, +}); + +// Of course, you can also specify the crawler name directly. +new tasks.GlueStartCrawlerRun(this, 'Task2', { + crawlerName: 'my-crawler-job', +}); +``` + ## Glue DataBrew Step Functions supports [AWS Glue DataBrew](https://docs.aws.amazon.com/step-functions/latest/dg/connect-databrew.html) through the service integration pattern. diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/glue/start-crawler-run.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/glue/start-crawler-run.ts new file mode 100644 index 0000000000000..7f7af3cbeb011 --- /dev/null +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/glue/start-crawler-run.ts @@ -0,0 +1,61 @@ +import { Construct } from 'constructs'; +import * as iam from '../../../aws-iam'; +import * as sfn from '../../../aws-stepfunctions'; +import { Stack } from '../../../core'; +import { integrationResourceArn } from '../private/task-utils'; + +/** + * Properties for starting an AWS Glue Crawler as a task + */ +export interface GlueStartCrawlerRunProps extends sfn.TaskStateBaseProps { + + /** + * Glue crawler name + */ + readonly crawlerName: string; + +} + +/** + * Starts an AWS Glue Crawler in a Task state + * + * @see https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-crawler-crawling.html#aws-glue-api-crawler-crawling-StartCrawler + */ +export class GlueStartCrawlerRun extends sfn.TaskStateBase { + + protected readonly taskMetrics?: sfn.TaskMetricsConfig; + protected readonly taskPolicies?: iam.PolicyStatement[]; + + private readonly integrationPattern: sfn.IntegrationPattern; + + constructor(scope: Construct, id: string, private readonly props: GlueStartCrawlerRunProps) { + super(scope, id, props); + + this.integrationPattern = props.integrationPattern ?? sfn.IntegrationPattern.REQUEST_RESPONSE; + this.taskPolicies = [new iam.PolicyStatement({ + resources: [ + Stack.of(this).formatArn({ + service: 'glue', + resource: 'crawler', + resourceName: this.props.crawlerName, + }), + ], + actions: [ + 'glue:StartCrawler', + 'glue:GetCrawler', + ], + })]; + } + + /** + * @internal + */ + protected _renderTask(): any { + return { + Resource: integrationResourceArn('aws-sdk:glue', 'startCrawler', this.integrationPattern), + Parameters: { + Name: this.props.crawlerName, + }, + }; + } +} \ No newline at end of file diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/index.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/index.ts index 1021c7e9950a6..372f8d724293e 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/index.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/index.ts @@ -34,6 +34,7 @@ export * from './emrcontainers/delete-virtual-cluster'; export * from './emrcontainers/start-job-run'; export * from './glue/run-glue-job-task'; export * from './glue/start-job-run'; +export * from './glue/start-crawler-run'; export * from './batch/run-batch-job'; export * from './batch/submit-job'; export * from './dynamodb/get-item'; diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/glue/start-crawler-run.test.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/glue/start-crawler-run.test.ts new file mode 100644 index 0000000000000..de099c19ebb1d --- /dev/null +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/glue/start-crawler-run.test.ts @@ -0,0 +1,76 @@ +import { Template } from '../../../assertions'; +import * as sfn from '../../../aws-stepfunctions'; +import { App, Stack } from '../../../core'; +import { GlueStartCrawlerRun } from '../../lib/glue/start-crawler-run'; + +const crawlerName = 'GlueCrawler'; +let stack: Stack; +beforeEach(() => { + const app = new App(); + stack = new Stack(app); +}); + +test('Invoke glue crawler with crawler name', () => { + const task = new GlueStartCrawlerRun(stack, 'Task', { + crawlerName, + }); + + new sfn.StateMachine(stack, 'StateMachine', { + definitionBody: sfn.DefinitionBody.fromChainable(task), + }); + + expect(stack.resolve(task.toStateJson())).toEqual({ + Type: 'Task', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':states:::aws-sdk:glue:startCrawler', + ], + ], + }, + End: true, + Parameters: { + Name: crawlerName, + }, + }); + + const template = Template.fromStack(stack); + expect(template.hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: [ + 'glue:StartCrawler', + 'glue:GetCrawler', + ], + Effect: 'Allow', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':glue:', + { + Ref: 'AWS::Region', + }, + ':', + { + Ref: 'AWS::AccountId', + }, + `:crawler/${crawlerName}`, + ], + ], + }, + }, + ], + }, + })); +}); From bd41b9ff91d3482abc310c24ee5e622a498316bd Mon Sep 17 00:00:00 2001 From: paulhcsun <47882901+paulhcsun@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:59:06 -0700 Subject: [PATCH 09/18] chore: add weekly workflow for github issues/pr metrics (#29444) ### Issue # (if applicable) Closes #. ### Reason for this change Generate weekly version of the [PR/issues metrics](https://github.com/aws/aws-cdk/issues/28952). ### Description of changes Add new workflow that runs weekly on Mondays @ 9 AM to generate a PR/Issue metrics report for the past week (Monday - Sunday). ### Description of how you validated changes ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- ...o-metrics.yml => repo-metrics-monthly.yml} | 0 .github/workflows/repo-metrics-weekly.yml | 58 +++++++++++++++++++ 2 files changed, 58 insertions(+) rename .github/workflows/{repo-metrics.yml => repo-metrics-monthly.yml} (100%) create mode 100644 .github/workflows/repo-metrics-weekly.yml diff --git a/.github/workflows/repo-metrics.yml b/.github/workflows/repo-metrics-monthly.yml similarity index 100% rename from .github/workflows/repo-metrics.yml rename to .github/workflows/repo-metrics-monthly.yml diff --git a/.github/workflows/repo-metrics-weekly.yml b/.github/workflows/repo-metrics-weekly.yml new file mode 100644 index 0000000000000..f993bebe7c4dd --- /dev/null +++ b/.github/workflows/repo-metrics-weekly.yml @@ -0,0 +1,58 @@ +name: Weekly repo metrics +on: + workflow_dispatch: + schedule: + - cron: '0 9 * * MON' + +permissions: + issues: write + pull-requests: read + +jobs: + build: + # this workflow will always fail in forks; bail if this isn't running in the upstream + if: github.repository == 'aws/aws-cdk' + name: metrics + runs-on: ubuntu-latest + + steps: + - name: Get dates for last week + shell: bash + run: | + # Calculate the date of the previous Monday + PREVIOUS_MONDAY=$(date -d "7 days ago" "+%Y-%m-%d") + + # Calculate the date of the current Sunday + CURRENT_SUNDAY=$(date -d "1 day ago" "+%Y-%m-%d") + + # Set an environment variable with the date range + echo "$PREVIOUS_MONDAY..$CURRENT_SUNDAY" + echo "last_week=$PREVIOUS_MONDAY..$CURRENT_SUNDAY" >> "$GITHUB_ENV" + + - name: Report on issues + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:aws/aws-cdk is:issue created:${{ env.last_week }} -reason:"not planned"' + + - name: Create report for issues + uses: peter-evans/create-issue-from-file@v5 + with: + title: Weekly issue metrics report + token: ${{ secrets.GITHUB_TOKEN }} + content-filepath: ./issue_metrics.md + assignees: paulhcsun + + - name: Report on PRs + uses: github/issue-metrics@v2 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEARCH_QUERY: 'repo:aws/aws-cdk is:pr created:${{ env.last_week }} -is:draft' + + - name: Create report for PRs + uses: peter-evans/create-issue-from-file@v5 + with: + title: Weekly PR metrics report + token: ${{ secrets.GITHUB_TOKEN }} + content-filepath: ./issue_metrics.md + assignees: paulhcsun From 77189be16b4ab007450176010f71f1558ced6430 Mon Sep 17 00:00:00 2001 From: SankyRed <121981451+SankyRed@users.noreply.github.com> Date: Mon, 11 Mar 2024 21:07:58 -0500 Subject: [PATCH 10/18] fix(cli): `cdk ls` returns stack id instead of stack display name (#29447) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Issue # (if applicable) Closes #29420 ### Reason for this change The `cdk list` functionality displays the stacks . For instance ``` > cdk ls producer consumer ``` With the latest changes for list stack dependencies we did add a new flag `-d` to show the dependencies. The dependencies between stacks can be established in 2 ways: 1. Using the resource defined from one stack in another. 2. Using `addDependency()` to add dependency among stacks. Current we are fetching the dependency details through the `CloudStackArtifact`. * Establishing the dependency between stacks through the first method would have the same `displayName` and `id` for the stacks. Using the `-d` flag to display dependencies - ``` ❯ cdk list --show-dependencies - id: producer dependencies: [] - id: consumer dependencies: - id: producer dependencies: [] ``` * Establishing the dependency through `addDependency()` will create a different `displayName` and `id`. In such a case when a user runs `cdk ls` we would want to show the `displayName` and if not present then use the `id` For instance: ``` > cdk ls producer producer/consumer ``` With the `-d` flag we would want to display something like: ``` > cdk ls -d - id: producer dependencies: [] - id: producer/consumer dependencies: - id: producer dependencies: [] ``` With our previous change we didn't consider `displayName` and just fetched `id`s which changes the previous functionality and caused a regression. ### Description of changes With the new changes we are looking out for `displayName` first and if it does not exist we fetch the `id`. ### Description of how you validated changes Added a new unit test and updated integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../cli-regression-patches/v2.132.0/NOTES.md | 1 + .../v2.132.0/skip-tests.txt | 4 + .../tests/cli-integ-tests/cli.integtest.ts | 8 +- packages/aws-cdk/lib/list-stacks.ts | 4 +- packages/aws-cdk/test/list-stacks.test.ts | 92 ++++++++++++++++++- 5 files changed, 101 insertions(+), 8 deletions(-) create mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.132.0/NOTES.md create mode 100644 packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.132.0/skip-tests.txt diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.132.0/NOTES.md b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.132.0/NOTES.md new file mode 100644 index 0000000000000..6f59e64a3b0b7 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.132.0/NOTES.md @@ -0,0 +1 @@ +This patch brings the [fix](https://github.com/aws/aws-cdk/issues/29420) into the regression suite. \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.132.0/skip-tests.txt b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.132.0/skip-tests.txt new file mode 100644 index 0000000000000..744f3c3396861 --- /dev/null +++ b/packages/@aws-cdk-testing/cli-integ/resources/cli-regression-patches/v2.132.0/skip-tests.txt @@ -0,0 +1,4 @@ +# Skipping the test to fix issue https://github.com/aws/aws-cdk/issues/29420. +# cli-integ tests failing for the old tests with the new cli changes for list stacks. + +cdk ls --show-dependencies --json \ No newline at end of file diff --git a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts index d3d5b12d94154..3c69673e775ba 100644 --- a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts @@ -886,10 +886,10 @@ integTest('cdk ls --show-dependencies --json', withDefaultFixture(async (fixture id: 'list-stacks', dependencies: [ { - id: 'liststacksDependentStack', + id: 'list-stacks/DependentStack', dependencies: [ { - id: 'liststacksDependentStackInnerDependentStack', + id: 'list-stacks/DependentStack/InnerDependentStack', dependencies: [], }, ], @@ -900,11 +900,11 @@ integTest('cdk ls --show-dependencies --json', withDefaultFixture(async (fixture id: 'list-multiple-dependent-stacks', dependencies: [ { - id: 'listmultipledependentstacksDependentStack1', + id: 'list-multiple-dependent-stacks/DependentStack1', dependencies: [], }, { - id: 'listmultipledependentstacksDependentStack2', + id: 'list-multiple-dependent-stacks/DependentStack2', dependencies: [], }, ], diff --git a/packages/aws-cdk/lib/list-stacks.ts b/packages/aws-cdk/lib/list-stacks.ts index e76a1f393a0a9..dddf6fda3613e 100644 --- a/packages/aws-cdk/lib/list-stacks.ts +++ b/packages/aws-cdk/lib/list-stacks.ts @@ -56,7 +56,7 @@ export async function listStacks(toolkit: CdkToolkit, options: ListStacksOptions for (const stack of collectionOfStacks.stackArtifacts) { const data: StackDetails = { - id: stack.id, + id: stack.displayName ?? stack.id, name: stack.stackName, environment: stack.environment, dependencies: [], @@ -82,7 +82,7 @@ export async function listStacks(toolkit: CdkToolkit, options: ListStacksOptions } } else { data.dependencies.push({ - id: depStack.stackArtifacts[0].id, + id: depStack.stackArtifacts[0].displayName ?? depStack.stackArtifacts[0].id, dependencies: [], }); } diff --git a/packages/aws-cdk/test/list-stacks.test.ts b/packages/aws-cdk/test/list-stacks.test.ts index e36081e99c1d2..016a7160549a7 100644 --- a/packages/aws-cdk/test/list-stacks.test.ts +++ b/packages/aws-cdk/test/list-stacks.test.ts @@ -171,7 +171,7 @@ describe('list', () => { dependencies: [], }, { - id: 'Test-Stack-B', + id: 'Test-Stack-A/Test-Stack-B', name: 'Test-Stack-B', environment: { account: '123456789012', @@ -185,7 +185,7 @@ describe('list', () => { }])); }); - test('stacks with nested dependencies', async () => { + test('stacks with display names and have nested dependencies', async () => { let cloudExecutable = new MockCloudExecutable({ stacks: [ MockStack.MOCK_STACK_A, @@ -201,9 +201,84 @@ describe('list', () => { ], }, depends: ['Test-Stack-A'], + displayName: 'Test-Stack-A/Test-Stack-B', }, { stackName: 'Test-Stack-C', + template: { Resources: { TemplateName: 'Test-Stack-C' } }, + env: 'aws://123456789012/bermuda-triangle-1', + metadata: { + '/Test-Stack-C': [ + { + type: cxschema.ArtifactMetadataEntryType.STACK_TAGS, + }, + ], + }, + depends: ['Test-Stack-B'], + displayName: 'Test-Stack-A/Test-Stack-B/Test-Stack-C', + }, + ], + }); + + // GIVEN + const toolkit = new CdkToolkit({ + cloudExecutable, + configuration: cloudExecutable.configuration, + sdkProvider: cloudExecutable.sdkProvider, + deployments: cloudFormation, + }); + + // WHEN + const workflow = await listStacks( toolkit, { selectors: ['Test-Stack-A', 'Test-Stack-A/Test-Stack-B', 'Test-Stack-A/Test-Stack-B/Test-Stack-C'] }); + + // THEN + expect(JSON.stringify(workflow)).toEqual(JSON.stringify([{ + id: 'Test-Stack-A', + name: 'Test-Stack-A', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [], + }, + { + id: 'Test-Stack-A/Test-Stack-B', + name: 'Test-Stack-B', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [{ + id: 'Test-Stack-A', + dependencies: [], + }], + }, + { + id: 'Test-Stack-A/Test-Stack-B/Test-Stack-C', + name: 'Test-Stack-C', + environment: { + account: '123456789012', + region: 'bermuda-triangle-1', + name: 'aws://123456789012/bermuda-triangle-1', + }, + dependencies: [{ + id: 'Test-Stack-A/Test-Stack-B', + dependencies: [{ + id: 'Test-Stack-A', + dependencies: [], + }], + }], + }])); + }); + + test('stacks with nested dependencies', async () => { + let cloudExecutable = new MockCloudExecutable({ + stacks: [ + MockStack.MOCK_STACK_A, + { + stackName: 'Test-Stack-B', template: { Resources: { TemplateName: 'Test-Stack-B' } }, env: 'aws://123456789012/bermuda-triangle-1', metadata: { @@ -213,6 +288,19 @@ describe('list', () => { }, ], }, + depends: ['Test-Stack-A'], + }, + { + stackName: 'Test-Stack-C', + template: { Resources: { TemplateName: 'Test-Stack-C' } }, + env: 'aws://123456789012/bermuda-triangle-1', + metadata: { + '/Test-Stack-C': [ + { + type: cxschema.ArtifactMetadataEntryType.STACK_TAGS, + }, + ], + }, depends: ['Test-Stack-B'], }, ], From a1fbd51d7fa6791b6a55004a938ec157194b89ba Mon Sep 17 00:00:00 2001 From: Nicolas Abdelnour <107426072+abdelnn@users.noreply.github.com> Date: Tue, 12 Mar 2024 11:00:39 -0700 Subject: [PATCH 11/18] fix(stepfunctions): the retry field in CustomState is not iterable (#29403) ### Issue # (if applicable) Closes #29274 ### Reason for this change CDK users were unable to specify their retry strategy if it was specified inline in their ASL state machine definition ### Description of changes Checks if the state definition has an inline retry policy defined. If it does, add it to the existing strategy defined using `addRetry` (if there is one defined, this is where it was failing before) ### Description of how you validated changes Added unit and integration tests ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- ...epfunctions-custom-state-integ.assets.json | 4 +- ...functions-custom-state-integ.template.json | 2 +- .../manifest.json | 2 +- .../integ.custom-state.js.snapshot/tree.json | 10 ++- .../test/integ.custom-state.ts | 6 +- .../lib/states/custom-state.ts | 4 +- .../test/custom-state.test.ts | 67 +++++++++++++++++++ 7 files changed, 87 insertions(+), 8 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.assets.json index 3454b8b875b21..05b3c392f0c6d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.assets.json @@ -1,7 +1,7 @@ { "version": "36.0.0", "files": { - "71bbec51055d157bf20b5d4967405c92dfbeb3ed29cc17b9d9bb976120c48d1c": { + "d69f65db580786444054b9064fa98c75f899eca808bd6a50efdcb9a27ecf5bdf": { "source": { "path": "aws-stepfunctions-custom-state-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "71bbec51055d157bf20b5d4967405c92dfbeb3ed29cc17b9d9bb976120c48d1c.json", + "objectKey": "d69f65db580786444054b9064fa98c75f899eca808bd6a50efdcb9a27ecf5bdf.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.template.json index d01f5b47541fd..e350c49d15925 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/aws-stepfunctions-custom-state-integ.template.json @@ -20,7 +20,7 @@ "StateMachine2E01A3A5": { "Type": "AWS::StepFunctions::StateMachine", "Properties": { - "DefinitionString": "{\"StartAt\":\"my custom task\",\"States\":{\"my custom task\":{\"Next\":\"final step\",\"Type\":\"Task\",\"Resource\":\"arn:aws:states:::dynamodb:putItem\",\"Parameters\":{\"TableName\":\"my-cool-table\",\"Item\":{\"id\":{\"S\":\"my-entry\"}}},\"ResultPath\":null,\"Retry\":[{\"ErrorEquals\":[\"States.Timeout\"],\"IntervalSeconds\":10,\"MaxAttempts\":5},{\"ErrorEquals\":[\"States.Permissions\"],\"IntervalSeconds\":20,\"MaxAttempts\":2}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"failed\"}]},\"final step\":{\"Type\":\"Pass\",\"End\":true},\"failed\":{\"Type\":\"Fail\",\"Error\":\"DidNotWork\",\"Cause\":\"We got stuck\"}},\"TimeoutSeconds\":30}", + "DefinitionString": "{\"StartAt\":\"my custom task\",\"States\":{\"my custom task\":{\"Next\":\"my custom task with inline Retriers\",\"Type\":\"Task\",\"Resource\":\"arn:aws:states:::dynamodb:putItem\",\"Parameters\":{\"TableName\":\"my-cool-table\",\"Item\":{\"id\":{\"S\":\"my-entry\"}}},\"ResultPath\":null,\"Retry\":[{\"ErrorEquals\":[\"States.Timeout\"],\"IntervalSeconds\":10,\"MaxAttempts\":5},{\"ErrorEquals\":[\"States.Permissions\"],\"IntervalSeconds\":20,\"MaxAttempts\":2}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"failed\"}]},\"my custom task with inline Retriers\":{\"Next\":\"final step\",\"Type\":\"Task\",\"Resource\":\"arn:aws:states:::dynamodb:putItem\",\"Parameters\":{\"TableName\":\"my-cool-table\",\"Item\":{\"id\":{\"S\":\"my-entry\"}}},\"ResultPath\":null,\"Retry\":[{\"ErrorEquals\":[\"States.Permissions\"],\"IntervalSeconds\":20,\"MaxAttempts\":2}]},\"final step\":{\"Type\":\"Pass\",\"End\":true},\"failed\":{\"Type\":\"Fail\",\"Error\":\"DidNotWork\",\"Cause\":\"We got stuck\"}},\"TimeoutSeconds\":30}", "RoleArn": { "Fn::GetAtt": [ "StateMachineRoleB840431D", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/manifest.json index a244339d85089..dcd9a742e3a48 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/71bbec51055d157bf20b5d4967405c92dfbeb3ed29cc17b9d9bb976120c48d1c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d69f65db580786444054b9064fa98c75f899eca808bd6a50efdcb9a27ecf5bdf.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/tree.json index cb3e3dafba612..76e337ccedcba 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.js.snapshot/tree.json @@ -32,6 +32,14 @@ "version": "0.0.0" } }, + "my custom task with inline Retriers": { + "id": "my custom task with inline Retriers", + "path": "aws-stepfunctions-custom-state-integ/my custom task with inline Retriers", + "constructInfo": { + "fqn": "aws-cdk-lib.aws_stepfunctions.CustomState", + "version": "0.0.0" + } + }, "StateMachine": { "id": "StateMachine", "path": "aws-stepfunctions-custom-state-integ/StateMachine", @@ -85,7 +93,7 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine", "aws:cdk:cloudformation:props": { - "definitionString": "{\"StartAt\":\"my custom task\",\"States\":{\"my custom task\":{\"Next\":\"final step\",\"Type\":\"Task\",\"Resource\":\"arn:aws:states:::dynamodb:putItem\",\"Parameters\":{\"TableName\":\"my-cool-table\",\"Item\":{\"id\":{\"S\":\"my-entry\"}}},\"ResultPath\":null,\"Retry\":[{\"ErrorEquals\":[\"States.Timeout\"],\"IntervalSeconds\":10,\"MaxAttempts\":5},{\"ErrorEquals\":[\"States.Permissions\"],\"IntervalSeconds\":20,\"MaxAttempts\":2}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"failed\"}]},\"final step\":{\"Type\":\"Pass\",\"End\":true},\"failed\":{\"Type\":\"Fail\",\"Error\":\"DidNotWork\",\"Cause\":\"We got stuck\"}},\"TimeoutSeconds\":30}", + "definitionString": "{\"StartAt\":\"my custom task\",\"States\":{\"my custom task\":{\"Next\":\"my custom task with inline Retriers\",\"Type\":\"Task\",\"Resource\":\"arn:aws:states:::dynamodb:putItem\",\"Parameters\":{\"TableName\":\"my-cool-table\",\"Item\":{\"id\":{\"S\":\"my-entry\"}}},\"ResultPath\":null,\"Retry\":[{\"ErrorEquals\":[\"States.Timeout\"],\"IntervalSeconds\":10,\"MaxAttempts\":5},{\"ErrorEquals\":[\"States.Permissions\"],\"IntervalSeconds\":20,\"MaxAttempts\":2}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"failed\"}]},\"my custom task with inline Retriers\":{\"Next\":\"final step\",\"Type\":\"Task\",\"Resource\":\"arn:aws:states:::dynamodb:putItem\",\"Parameters\":{\"TableName\":\"my-cool-table\",\"Item\":{\"id\":{\"S\":\"my-entry\"}}},\"ResultPath\":null,\"Retry\":[{\"ErrorEquals\":[\"States.Permissions\"],\"IntervalSeconds\":20,\"MaxAttempts\":2}]},\"final step\":{\"Type\":\"Pass\",\"End\":true},\"failed\":{\"Type\":\"Fail\",\"Error\":\"DidNotWork\",\"Cause\":\"We got stuck\"}},\"TimeoutSeconds\":30}", "roleArn": { "Fn::GetAtt": [ "StateMachineRoleB840431D", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.ts index 4beae53782d81..a3bd05c8de318 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions/test/integ.custom-state.ts @@ -39,6 +39,10 @@ const custom = new sfn.CustomState(stack, 'my custom task', { stateJson, }); +const customWithInlineRetry = new sfn.CustomState(stack, 'my custom task with inline Retriers', { + stateJson, +}); + custom.addCatch(failure); custom.addRetry({ errors: [sfn.Errors.TIMEOUT], @@ -46,7 +50,7 @@ custom.addRetry({ maxAttempts: 5, }); -const chain = sfn.Chain.start(custom).next(finalStatus); +const chain = sfn.Chain.start(custom).next(customWithInlineRetry).next(finalStatus); const sm = new sfn.StateMachine(stack, 'StateMachine', { definition: chain, diff --git a/packages/aws-cdk-lib/aws-stepfunctions/lib/states/custom-state.ts b/packages/aws-cdk-lib/aws-stepfunctions/lib/states/custom-state.ts index 4f79376c0cded..63744f75e9433 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions/lib/states/custom-state.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions/lib/states/custom-state.ts @@ -74,9 +74,9 @@ export class CustomState extends State implements IChainable, INextable { ...this.renderRetryCatch(), }; - // merge the Retry filed defined in the stateJson into the state + // merge the Retry field defined in the stateJson into the state if (Array.isArray(this.stateJson.Retry)) { - state.Retry = [...state.Retry, ...this.stateJson.Retry]; + state.Retry = Array.isArray(state.Retry) ? [...state.Retry, ...this.stateJson.Retry] : [...this.stateJson.Retry]; } return state; diff --git a/packages/aws-cdk-lib/aws-stepfunctions/test/custom-state.test.ts b/packages/aws-cdk-lib/aws-stepfunctions/test/custom-state.test.ts index 1d5d868ad96ea..610e25b425ad9 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions/test/custom-state.test.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions/test/custom-state.test.ts @@ -242,4 +242,71 @@ describe('Custom State', () => { }, ); }); + + test('expect retry to not fail when specifying strategy inline', () => { + // GIVEN + const custom = new sfn.CustomState(stack, 'Custom', { + stateJson: { + Type: 'Task', + Resource: 'arn:aws:states:::dynamodb:putItem', + Parameters: { + TableName: 'MyTable', + Item: { + id: { + S: 'MyEntry', + }, + }, + }, + ResultPath: null, + Retry: [ + { + ErrorEquals: [ + 'Lambda.ServiceException', + 'Lambda.AWSLambdaException', + 'Lambda.SdkClientException', + 'Lambda.TooManyRequestsException', + ], + IntervalSeconds: 20, + MaxAttempts: 2, + }, + ], + }, + }); + const chain = sfn.Chain.start(custom); + + // THEN + expect(render(stack, chain)).toStrictEqual( + { + StartAt: 'Custom', + States: { + Custom: { + Type: 'Task', + Resource: 'arn:aws:states:::dynamodb:putItem', + Parameters: { + TableName: 'MyTable', + Item: { + id: { + S: 'MyEntry', + }, + }, + }, + ResultPath: null, + Retry: [ + { + ErrorEquals: [ + 'Lambda.ServiceException', + 'Lambda.AWSLambdaException', + 'Lambda.SdkClientException', + 'Lambda.TooManyRequestsException', + ], + IntervalSeconds: 20, + MaxAttempts: 2, + }, + ], + End: true, + }, + }, + }, + ); + }); }); \ No newline at end of file From e85231c092892879479cf12b89756e8f2b70a094 Mon Sep 17 00:00:00 2001 From: "k.goto" <24818752+go-to-k@users.noreply.github.com> Date: Wed, 13 Mar 2024 03:46:57 +0900 Subject: [PATCH 12/18] feat(codepipeline): change default pipeline type to V2 (under feature flag) (#29096) ### Reason for this change We discussed about the default pipeline type, it was concluded that the new type (V2) should be the default. https://github.com/aws/aws-cdk/pull/28538#discussion_r1471761574 https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts#L492 ### Description of changes Change the default value using a feature flag so as not to affect existing processing. ### Description of how you validated changes Bot unit and integ tests ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-appconfig/test/integ.configuration.ts | 6 +- .../test/cloudformation/integ.stacksets.ts | 6 +- .../test/integ.cfn-template-from-repo.lit.ts | 6 +- ...ambda-deployed-through-codepipeline.lit.ts | 6 +- .../test/integ.lambda-pipeline.ts | 6 +- .../test/integ.pipeline-alexa-deploy.ts | 7 +- .../test/integ.pipeline-cfn-cross-region.ts | 6 +- .../integ.pipeline-cfn-with-action-role.ts | 6 +- .../test/integ.pipeline-cfn.ts | 6 +- .../test/integ.pipeline-code-build-batch.ts | 6 +- ...line-code-build-multiple-inputs-outputs.ts | 6 +- .../test/integ.pipeline-code-commit-build.ts | 6 +- ...integ.pipeline-code-commit-custom-event.ts | 9 +- .../test/integ.pipeline-code-commit-main.ts | 9 +- .../test/integ.pipeline-code-commit.ts | 11 +- .../test/integ.pipeline-code-deploy-ecs.ts | 6 +- .../test/integ.pipeline-code-deploy.ts | 6 +- .../test/integ.pipeline-ecr-source.ts | 6 +- .../test/integ.pipeline-ecs-deploy.ts | 6 +- ...integ.pipeline-elastic-beanstalk-deploy.ts | 6 +- .../test/integ.pipeline-events.ts | 6 +- .../test/integ.pipeline-jenkins.ts | 6 +- .../test/integ.pipeline-manual-approval.ts | 6 +- .../test/integ.pipeline-s3-deploy.ts | 6 +- .../test/integ.pipeline-stepfunctions.ts | 6 +- .../index.js | 1 + ...ne-pipeline-type-v2-by-default.assets.json | 32 + ...-pipeline-type-v2-by-default.template.json | 668 ++++++++++++ .../cdk.out | 1 + ...efaultTestDeployAssert9B55D727.assets.json | 19 + ...aultTestDeployAssert9B55D727.template.json | 36 + .../integ.json | 13 + .../manifest.json | 197 ++++ .../tree.json | 959 ++++++++++++++++++ .../test/integ.pipeline-type-v2-by-default.ts | 59 ++ .../test/integ.pipeline-with-replication.ts | 3 + ...urce-bucket-events-cross-stack-same-env.ts | 6 +- .../integ.pipeline-event-target.ts | 6 +- ...nteg.newpipeline-with-codebuild-logging.ts | 3 +- ...teg.newpipeline-with-cross-account-keys.ts | 7 +- ...e-with-cross-region-replication-buckets.ts | 3 +- ....newpipeline-with-file-system-locations.ts | 3 +- .../test/integ.newpipeline-with-vpc.ts | 3 +- .../test/pipelines/test/integ.newpipeline.ts | 3 +- .../pipelines/test/integ.pipeline-security.ts | 3 +- .../integ.pipeline-with-artifact-bucket.ts | 3 +- ...nteg.pipeline-with-assets-single-upload.ts | 3 +- .../test/integ.pipeline-with-assets.ts | 3 +- ...eline-with-stack-outputs-in-custom-step.ts | 3 +- .../test/integ.pipeline-with-variables.ts | 3 +- .../test/integ.pipeline-without-prepare.ts | 3 +- .../test/pipelines/test/integ.pipeline.ts | 3 +- .../test/integ.configuration.ts | 6 +- ...g.codepipeline-start-pipeline-execution.ts | 6 +- packages/@aws-cdk/cx-api/FEATURE_FLAGS.md | 20 +- .../test/integ.cfn-template-from-repo.lit.ts | 6 +- ...ambda-deployed-through-codepipeline.lit.ts | 6 +- .../aws-cdk-lib/aws-codepipeline/README.md | 3 + .../aws-codepipeline/lib/pipeline.ts | 11 +- .../aws-codepipeline/test/pipeline.test.ts | 30 +- packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md | 20 +- packages/aws-cdk-lib/cx-api/README.md | 17 + packages/aws-cdk-lib/cx-api/lib/features.ts | 14 + 63 files changed, 2284 insertions(+), 63 deletions(-) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c/index.js create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts index fff2fb369f76a..eb77c8f596506 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts @@ -32,7 +32,11 @@ def handler(event, context): print('This is my dummy validator') `; -const app = new App(); +const app = new App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new Stack(app, 'aws-appconfig-configuration'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts index 18d2d521e25be..85972dc67f432 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts @@ -76,7 +76,11 @@ export class StackSetPipelineStack extends Stack { } } -const app = new App(); +const app = new App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new StackSetPipelineStack(app, 'StackSetPipelineStack'); new IntegTest(app, 'StackSetPipelineStackInteg', { testCases: [stack], diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts index 7a9c9e681ba91..6dc0545738ee4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts @@ -3,7 +3,11 @@ import * as codepipeline from 'aws-cdk-lib/aws-codepipeline'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation'); /// !show diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts index 063d3b5d87ff0..f74a7a480a7e6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts @@ -7,7 +7,11 @@ import * as cdk from 'aws-cdk-lib'; import * as codepipeline_actions from 'aws-cdk-lib/aws-codepipeline-actions'; import { STANDARD_NODEJS_RUNTIME } from '../../config'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); /// !show const lambdaStack = new cdk.Stack(app, 'LambdaStack'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts index f21ea308ce0b4..269e150371f62 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts @@ -6,7 +6,11 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; import { STANDARD_NODEJS_RUNTIME } from '../../config'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-lambda'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts index 9311a8972a658..513ee5e7a85e9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts @@ -3,8 +3,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import { App, RemovalPolicy, SecretValue, Stack } from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new App(); - +const app = new App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new Stack(app, 'aws-cdk-codepipeline-alexa-deploy'); const bucket = new s3.Bucket(stack, 'PipelineBucket', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts index c17b22d81066b..b978eee5ba3b9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts @@ -3,7 +3,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const region = 'us-west-2'; // hardcode the region const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation-cross-region', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts index 52d53fd87efd7..c657b0d3c9205 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts @@ -4,7 +4,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation-cross-region-with-action-role', {}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts index 5086cf2df3926..b670dc5dd39f8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts @@ -4,7 +4,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts index 3da6c4609cced..d1897f4561fd9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts @@ -5,7 +5,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codebuild-batch'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts index 81458ec6ed0ca..cd2b2d3404a39 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts @@ -5,7 +5,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codebuild-multiple-inputs-outputs'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts index fbbaed9b5bdcc..2c9adf022da21 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts @@ -6,7 +6,11 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; /* eslint-disable quote-props */ -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codecommit-codebuild'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-custom-event.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-custom-event.ts index b0ae60e70e3f8..60d76a400090d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-custom-event.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-custom-event.ts @@ -2,15 +2,18 @@ import * as codecommit from 'aws-cdk-lib/aws-codecommit'; import * as codepipeline from 'aws-cdk-lib/aws-codepipeline'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME } from 'aws-cdk-lib/cx-api'; +import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME, CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2 } from 'aws-cdk-lib/cx-api'; import { ExpectedResult, IntegTest } from '@aws-cdk/integ-tests-alpha'; import { LambdaFunction } from 'aws-cdk-lib/aws-events-targets'; import { Code, Runtime, Function } from 'aws-cdk-lib/aws-lambda'; import { PolicyStatement } from 'aws-cdk-lib/aws-iam'; import * as path from 'path'; -const defaultBranchFeatureFlag = { [CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: true }; -const app = new cdk.App({ postCliContext: defaultBranchFeatureFlag }); +const defaultFeatureFlag = { + [CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: true, + [CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2]: false, +}; +const app = new cdk.App({ postCliContext: defaultFeatureFlag }); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codecommit-custom-event'); const branch = 'test-branch'; diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-main.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-main.ts index 1d5db2cc3e5f4..e007cc83da8db 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-main.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-main.ts @@ -2,11 +2,14 @@ import * as codecommit from 'aws-cdk-lib/aws-codecommit'; import * as codepipeline from 'aws-cdk-lib/aws-codepipeline'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME } from 'aws-cdk-lib/cx-api'; +import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME, CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2 } from 'aws-cdk-lib/cx-api'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; -const defaultBranchFeatureFlag = { [CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: true }; -const app = new cdk.App({ postCliContext: defaultBranchFeatureFlag }); +const defaultFeatureFlag = { + [CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: true, + [CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2]: false, +}; +const app = new cdk.App({ postCliContext: defaultFeatureFlag }); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codecommit-main'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts index 80db251c1bfc5..cac2ce690b4fe 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts @@ -2,12 +2,13 @@ import * as codecommit from 'aws-cdk-lib/aws-codecommit'; import * as codepipeline from 'aws-cdk-lib/aws-codepipeline'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME } from 'aws-cdk-lib/cx-api'; +import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME, CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2 } from 'aws-cdk-lib/cx-api'; -const defaultBranchFeatureFlag = { [CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: false }; -const app = new cdk.App({ - postCliContext: defaultBranchFeatureFlag, -}); +const defaultFeatureFlag = { + [CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: false, + [CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2]: false, +}; +const app = new cdk.App({ postCliContext: defaultFeatureFlag }); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codecommit'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts index 64918283d95e6..c9b7ef7f5331c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts @@ -4,7 +4,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codedeploy-ecs'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts index c285bf36e9c11..a151c41a08e86 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts @@ -4,7 +4,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codedeploy'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts index ec5f23a5dccf6..2dbdbfc0c5e90 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts @@ -24,7 +24,11 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; * was triggered successfully. */ -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-ecr-source'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts index ab47c1cfaba06..867a78ccb5e43 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts @@ -9,7 +9,11 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; /* eslint-disable quote-props */ -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-ecs-deploy'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts index 32b44ba03f8d3..ff19f0342c7b5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts @@ -21,7 +21,11 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; * 5. Manually delete the 'aws-cdk-codepipeline-elastic-beanstalk-deploy' stack */ -const app = new App(); +const app = new App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new Stack(app, 'aws-cdk-codepipeline-elastic-beanstalk-deploy'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts index f85004e2febb6..badaf54589e7f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts @@ -9,7 +9,11 @@ import * as sns from 'aws-cdk-lib/aws-sns'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-pipeline-event-target'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts index 32bbe67756c6e..3b3de3226380b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts @@ -3,7 +3,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-jenkins'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts index 92c3569697ffc..766ecd6381230 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts @@ -3,7 +3,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-manual-approval'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts index 8bd92c8896177..1e4f2192519b6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts @@ -6,7 +6,11 @@ import { Duration } from 'aws-cdk-lib'; import { IntegTest, ExpectedResult, Match } from '@aws-cdk/integ-tests-alpha'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-s3-deploy'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts index 400f8b023b168..1c02051327ffc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts @@ -4,7 +4,11 @@ import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions'; import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-stepfunctions'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c/index.js new file mode 100644 index 0000000000000..01a89b9921608 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c/index.js @@ -0,0 +1 @@ +"use strict";var I=Object.create;var i=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var k=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of P(t))!L.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(n=w(t,s))||n.enumerable});return e};var l=(e,t,o)=>(o=e!=null?I(A(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),B=e=>d(i({},"__esModule",{value:!0}),e);var q={};k(q,{autoDeleteHandler:()=>S,handler:()=>_});module.exports=B(q);var h=require("@aws-sdk/client-s3");var y=l(require("https")),m=l(require("url")),a={sendHttpRequest:b,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",D="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let n={...t,ResponseURL:"..."};if(a.log(JSON.stringify(n,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(n,o),r=T(t,s);await u("SUCCESS",r)}catch(s){let r={...t,Reason:a.includeStackTraces?s.stack:s.message};r.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),r.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",r)}}}function T(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||D,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},n=m.parse(t.ResponseURL),s=`${n.protocol}//${n.hostname}/${n.pathname}?***`;a.log("submit response to cloudformation",s,o);let r=JSON.stringify(o),C={hostname:n.hostname,path:n.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await x({attempts:5,sleep:1e3},a.sendHttpRequest)(C,r)}async function b(e,t){return new Promise((o,n)=>{try{let s=y.request(e,r=>{r.resume(),!r.statusCode||r.statusCode>=400?n(new Error(`Unsuccessful HTTP response: ${r.statusCode}`)):o()});s.on("error",n),s.write(t),s.end()}catch(s){n(s)}})}function O(e,...t){console.log(e,...t)}function x(e,t){return async(...o)=>{let n=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(r){if(n--<=0)throw r;await H(Math.floor(Math.random()*s)),s*=2}}}async function H(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",F=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return U(e);case"Delete":return E(e.ResourceProperties?.BucketName)}}async function U(e){let t=e,o=t.OldResourceProperties?.BucketName,n=t.ResourceProperties?.BucketName;if(n!=null&&o!=null&&n!==o)return E(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??F,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function f(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let n=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:n}}),t?.IsTruncated&&await f(e)}async function E(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await f(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")}0&&(module.exports={autoDeleteHandler,handler}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json new file mode 100644 index 0000000000000..4b6b4ec05124a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json @@ -0,0 +1,32 @@ +{ + "version": "36.0.0", + "files": { + "54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c": { + "source": { + "path": "asset.54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "4014d8c32c4c24d6e42c9648a97130e3370b1bb5508372ea3245f468ab0813f3": { + "source": { + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "4014d8c32c4c24d6e42c9648a97130e3370b1bb5508372ea3245f468ab0813f3.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json new file mode 100644 index 0000000000000..b7a01a2a8f06c --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json @@ -0,0 +1,668 @@ +{ + "Resources": { + "PipelineBucketB967BD35": { + "Type": "AWS::S3::Bucket", + "Properties": { + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true" + } + ], + "VersioningConfiguration": { + "Status": "Enabled" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PipelineBucketPolicyD65CDEF5": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "PipelineBucketB967BD35" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*", + "s3:PutBucketPolicy" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "PipelineBucketAutoDeleteObjectsCustomResource5F37E165": { + "Type": "Custom::S3AutoDeleteObjects", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn" + ] + }, + "BucketName": { + "Ref": "PipelineBucketB967BD35" + } + }, + "DependsOn": [ + "PipelineBucketPolicyD65CDEF5" + ], + "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": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c.zip" + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + }, + "Runtime": "nodejs18.x", + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "PipelineBucketB967BD35" + }, + " S3 bucket." + ] + ] + } + }, + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + ] + }, + "DeployBucket67E2C076": { + "Type": "AWS::S3::Bucket", + "Properties": { + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DeployBucketPolicyCED076FF": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "DeployBucket67E2C076" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*", + "s3:PutBucketPolicy" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "DeployBucketAutoDeleteObjectsCustomResourceC751D9D5": { + "Type": "Custom::S3AutoDeleteObjects", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn" + ] + }, + "BucketName": { + "Ref": "DeployBucket67E2C076" + } + }, + "DependsOn": [ + "DeployBucketPolicyCED076FF" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PipelineRoleD68726F7": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codepipeline.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PipelineRoleDefaultPolicyC7A05455": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineDeployDeployActionCodePipelineActionRole1C288A60", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "PipelineSourceCodePipelineActionRoleC6F9E7F5", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PipelineRoleDefaultPolicyC7A05455", + "Roles": [ + { + "Ref": "PipelineRoleD68726F7" + } + ] + } + }, + "PipelineC660917D": { + "Type": "AWS::CodePipeline::Pipeline", + "Properties": { + "ArtifactStore": { + "Location": { + "Ref": "PipelineBucketB967BD35" + }, + "Type": "S3" + }, + "PipelineType": "V2", + "RoleArn": { + "Fn::GetAtt": [ + "PipelineRoleD68726F7", + "Arn" + ] + }, + "Stages": [ + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Source", + "Owner": "AWS", + "Provider": "S3", + "Version": "1" + }, + "Configuration": { + "S3Bucket": { + "Ref": "PipelineBucketB967BD35" + }, + "S3ObjectKey": "key" + }, + "Name": "Source", + "OutputArtifacts": [ + { + "Name": "SourceArtifact" + } + ], + "RoleArn": { + "Fn::GetAtt": [ + "PipelineSourceCodePipelineActionRoleC6F9E7F5", + "Arn" + ] + }, + "RunOrder": 1 + } + ], + "Name": "Source" + }, + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "S3", + "Version": "1" + }, + "Configuration": { + "BucketName": { + "Ref": "DeployBucket67E2C076" + }, + "Extract": "false", + "ObjectKey": "test.txt" + }, + "InputArtifacts": [ + { + "Name": "SourceArtifact" + } + ], + "Name": "DeployAction", + "RoleArn": { + "Fn::GetAtt": [ + "PipelineDeployDeployActionCodePipelineActionRole1C288A60", + "Arn" + ] + }, + "RunOrder": 1 + } + ], + "Name": "Deploy" + } + ] + }, + "DependsOn": [ + "PipelineRoleDefaultPolicyC7A05455", + "PipelineRoleD68726F7" + ] + }, + "PipelineSourceCodePipelineActionRoleC6F9E7F5": { + "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" + } + } + }, + "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/key" + ] + ] + } + ] + }, + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925", + "Roles": [ + { + "Ref": "PipelineSourceCodePipelineActionRoleC6F9E7F5" + } + ] + } + }, + "PipelineDeployDeployActionCodePipelineActionRole1C288A60": { + "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" + } + } + }, + "PipelineDeployDeployActionCodePipelineActionRoleDefaultPolicyE194961B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PipelineDeployDeployActionCodePipelineActionRoleDefaultPolicyE194961B", + "Roles": [ + { + "Ref": "PipelineDeployDeployActionCodePipelineActionRole1C288A60" + } + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets.json new file mode 100644 index 0000000000000..7ba3edf507c43 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/integ.json new file mode 100644 index 0000000000000..791dae1500331 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/integ.json @@ -0,0 +1,13 @@ +{ + "version": "36.0.0", + "testCases": { + "codepipeline-pipeline-type-v2-by-default-test/DefaultTest": { + "stacks": [ + "aws-cdk-codepipeline-pipeline-type-v2-by-default" + ], + "diffAssets": true, + "assertionStack": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert", + "assertionStackName": "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json new file mode 100644 index 0000000000000..c2caa492a528c --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json @@ -0,0 +1,197 @@ +{ + "version": "36.0.0", + "artifacts": { + "aws-cdk-codepipeline-pipeline-type-v2-by-default.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-codepipeline-pipeline-type-v2-by-default": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4014d8c32c4c24d6e42c9648a97130e3370b1bb5508372ea3245f468ab0813f3.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-codepipeline-pipeline-type-v2-by-default.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-cdk-codepipeline-pipeline-type-v2-by-default.assets" + ], + "metadata": { + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineBucketB967BD35" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineBucketPolicyD65CDEF5" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/AutoDeleteObjectsCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineBucketAutoDeleteObjectsCustomResource5F37E165" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DeployBucket67E2C076" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DeployBucketPolicyCED076FF" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/AutoDeleteObjectsCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "DeployBucketAutoDeleteObjectsCustomResourceC751D9D5" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineRoleD68726F7" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineRoleDefaultPolicyC7A05455" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineC660917D" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineSourceCodePipelineActionRoleC6F9E7F5" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineDeployDeployActionCodePipelineActionRole1C288A60" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineDeployDeployActionCodePipelineActionRoleDefaultPolicyE194961B" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-codepipeline-pipeline-type-v2-by-default" + }, + "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets" + ], + "metadata": { + "/codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/tree.json new file mode 100644 index 0000000000000..f4fa4d1f225ef --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/tree.json @@ -0,0 +1,959 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-codepipeline-pipeline-type-v2-by-default": { + "id": "aws-cdk-codepipeline-pipeline-type-v2-by-default", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default", + "children": { + "PipelineBucket": { + "id": "PipelineBucket", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "aws-cdk:auto-delete-objects", + "value": "true" + } + ], + "versioningConfiguration": { + "status": "Enabled" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Policy": { + "id": "Policy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "PipelineBucketB967BD35" + }, + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*", + "s3:PutBucketPolicy" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "AutoDeleteObjectsCustomResource": { + "id": "AutoDeleteObjectsCustomResource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/AutoDeleteObjectsCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/AutoDeleteObjectsCustomResource/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Custom::S3AutoDeleteObjectsCustomResourceProvider": { + "id": "Custom::S3AutoDeleteObjectsCustomResourceProvider", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider", + "children": { + "Staging": { + "id": "Staging", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Handler": { + "id": "Handler", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployBucket": { + "id": "DeployBucket", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "aws-cdk:auto-delete-objects", + "value": "true" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Policy": { + "id": "Policy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "DeployBucket67E2C076" + }, + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*", + "s3:PutBucketPolicy" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "AutoDeleteObjectsCustomResource": { + "id": "AutoDeleteObjectsCustomResource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/AutoDeleteObjectsCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/AutoDeleteObjectsCustomResource/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Pipeline": { + "id": "Pipeline", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline", + "children": { + "Role": { + "id": "Role", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/ImportRole", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codepipeline.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineDeployDeployActionCodePipelineActionRole1C288A60", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "PipelineSourceCodePipelineActionRoleC6F9E7F5", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "PipelineRoleDefaultPolicyC7A05455", + "roles": [ + { + "Ref": "PipelineRoleD68726F7" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodePipeline::Pipeline", + "aws:cdk:cloudformation:props": { + "artifactStore": { + "type": "S3", + "location": { + "Ref": "PipelineBucketB967BD35" + } + }, + "pipelineType": "V2", + "roleArn": { + "Fn::GetAtt": [ + "PipelineRoleD68726F7", + "Arn" + ] + }, + "stages": [ + { + "name": "Source", + "actions": [ + { + "name": "Source", + "outputArtifacts": [ + { + "name": "SourceArtifact" + } + ], + "actionTypeId": { + "category": "Source", + "version": "1", + "owner": "AWS", + "provider": "S3" + }, + "configuration": { + "S3Bucket": { + "Ref": "PipelineBucketB967BD35" + }, + "S3ObjectKey": "key" + }, + "runOrder": 1, + "roleArn": { + "Fn::GetAtt": [ + "PipelineSourceCodePipelineActionRoleC6F9E7F5", + "Arn" + ] + } + } + ] + }, + { + "name": "Deploy", + "actions": [ + { + "name": "DeployAction", + "inputArtifacts": [ + { + "name": "SourceArtifact" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "S3" + }, + "configuration": { + "BucketName": { + "Ref": "DeployBucket67E2C076" + }, + "Extract": "false", + "ObjectKey": "test.txt" + }, + "runOrder": 1, + "roleArn": { + "Fn::GetAtt": [ + "PipelineDeployDeployActionCodePipelineActionRole1C288A60", + "Arn" + ] + } + } + ] + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Source": { + "id": "Source", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source", + "children": { + "Source": { + "id": "Source", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source", + "children": { + "CodePipelineActionRole": { + "id": "CodePipelineActionRole", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole", + "children": { + "ImportCodePipelineActionRole": { + "id": "ImportCodePipelineActionRole", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/ImportCodePipelineActionRole", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/key" + ] + ] + } + ] + }, + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925", + "roles": [ + { + "Ref": "PipelineSourceCodePipelineActionRoleC6F9E7F5" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Deploy": { + "id": "Deploy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy", + "children": { + "DeployAction": { + "id": "DeployAction", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction", + "children": { + "CodePipelineActionRole": { + "id": "CodePipelineActionRole", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole", + "children": { + "ImportCodePipelineActionRole": { + "id": "ImportCodePipelineActionRole", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/ImportCodePipelineActionRole", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "PipelineDeployDeployActionCodePipelineActionRoleDefaultPolicyE194961B", + "roles": [ + { + "Ref": "PipelineDeployDeployActionCodePipelineActionRole1C288A60" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "codepipeline-pipeline-type-v2-by-default-test": { + "id": "codepipeline-pipeline-type-v2-by-default-test", + "path": "codepipeline-pipeline-type-v2-by-default-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.ts new file mode 100644 index 0000000000000..d67861aa23e68 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.ts @@ -0,0 +1,59 @@ +import * as cdk from 'aws-cdk-lib'; +import * as codepipeline from 'aws-cdk-lib/aws-codepipeline'; +import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; +import * as s3 from 'aws-cdk-lib/aws-s3'; +import { CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2 } from 'aws-cdk-lib/cx-api'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-pipeline-type-v2-by-default'); +stack.node.setContext(CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2, true); + +const sourceBucket = new s3.Bucket(stack, 'PipelineBucket', { + versioned: true, + removalPolicy: cdk.RemovalPolicy.DESTROY, + autoDeleteObjects: true, +}); +const sourceOutput = new codepipeline.Artifact('SourceArtifact'); +const sourceAction = new cpactions.S3SourceAction({ + actionName: 'Source', + output: sourceOutput, + bucket: sourceBucket, + bucketKey: 'key', +}); + +const deployBucket = new s3.Bucket(stack, 'DeployBucket', { + removalPolicy: cdk.RemovalPolicy.DESTROY, + autoDeleteObjects: true, +}); + +new codepipeline.Pipeline(stack, 'Pipeline', { + artifactBucket: sourceBucket, + // pipelineType: codepipeline.PipelineType.V2, // V2 is set by default when the feature flag is enabled + stages: [ + { + stageName: 'Source', + actions: [sourceAction], + }, + { + stageName: 'Deploy', + actions: [ + new cpactions.S3DeployAction({ + actionName: 'DeployAction', + extract: false, + objectKey: 'test.txt', + input: sourceOutput, + bucket: deployBucket, + }), + ], + }, + ], +}); + +new IntegTest(app, 'codepipeline-pipeline-type-v2-by-default-test', { + testCases: [stack], + diffAssets: true, +}); + +app.synth(); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts index 816a548bc8675..2947d24b0eb6f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts @@ -8,6 +8,9 @@ import { S3SourceAction, CodeBuildAction } from 'aws-cdk-lib/aws-codepipeline-ac const app = new App({ treeMetadata: false, + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, }); const stack1 = new Stack(app, 'integ-pipeline-producer-stack', { env: { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts index 1ef92d1cc1594..ab6db0b2219f2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts @@ -7,7 +7,11 @@ import { App, RemovalPolicy, Stack } from 'aws-cdk-lib'; import * as integ from '@aws-cdk/integ-tests-alpha'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new App(); +const app = new App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const bucketStack = new Stack(app, 'BucketStack'); const bucket = new s3.Bucket(bucketStack, 'Bucket', { removalPolicy: RemovalPolicy.DESTROY, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts index 59276b644b7e3..198ee0fc9dafe 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts @@ -31,7 +31,11 @@ class MockAction implements codepipeline.IAction { } } -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'pipeline-events'); const repo = new codecommit.Repository(stack, 'Repo', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts index f6959d9bcedc9..637b794f5e43a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts @@ -68,8 +68,9 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts index 853f0d2805f19..c2648fd90d748 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts @@ -53,8 +53,11 @@ class AppStage extends Stage { } } -const app = new App(); - +const app = new App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new PipelineStack(app, 'PipelineStack'); new integ.IntegTest(app, 'LambdaTest', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts index ce91fd3fad3f4..579d9a3a02f90 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts @@ -73,8 +73,9 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts index 68ccb872e5937..99499134a6ff6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts @@ -58,8 +58,9 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts index 49d081b3e5e52..9d4baa745ee4b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts @@ -47,8 +47,9 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); new PipelineStack(app, 'PipelineStack'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts index 258b3e80d1bdc..2434b94f5e3d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts @@ -52,8 +52,9 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); new PipelineStack(app, 'PipelineStack'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts index ea7951477ee76..82870e7515ffa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts @@ -98,8 +98,9 @@ export class TestCdkStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); const stack = new TestCdkStack(app, 'PipelineSecurityStack', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts index b25a47dac2313..a06d3bb34b83e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts @@ -27,8 +27,9 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); const stack = new PipelineStack(app, 'PipelineStack'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts index fce31b49d8fad..c05a52e685eba 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts @@ -90,8 +90,9 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); const stack = new CdkpipelinesDemoPipelineStack(app, 'PipelineStack', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts index b8e89daa977fb..3c71922e1e02d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts @@ -89,8 +89,9 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); const stack = new CdkpipelinesDemoPipelineStack(app, 'PipelineStack', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts index f97495ba39538..bdaf4211e6e55 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts @@ -78,8 +78,9 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts index c47217e3cdaca..fb2b395070275 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts @@ -51,8 +51,9 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts index 80e19e2e0e345..58a19c2e3d901 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts @@ -65,8 +65,9 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts index fd7c1e4500354..b8afeedfc285d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts @@ -79,8 +79,9 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts index 6b7f0aeaf81df..a25287b7bf31a 100644 --- a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts @@ -32,7 +32,11 @@ def handler(event, context): print('This is my dummy validator') `; -const app = new App(); +const app = new App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new Stack(app, 'aws-appconfig-configuration'); diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts index f67bb7ea009c5..35e160a7892ed 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts @@ -17,7 +17,11 @@ import { CodePipelineStartPipelineExecution } from '../lib/codepipeline-start-pi * 2. The pipeline has a step function action that updates the Parameter 'MyParameter' from value '🌧️' to '🌈': * 3. The pipeline is invoked by the scheduler every minute (but it needs only one successful execution to pass). */ -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-scheduler-targets-codepipeline-start-pipeline-execution'); const payload = { diff --git a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md index 4b3333f630a60..86bb8373fa803 100644 --- a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md +++ b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md @@ -65,6 +65,7 @@ Flags come in three types: | [@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource](#aws-cdkaws-codepipeline-actionsusenewdefaultbranchforcodecommitsource) | When enabled, the CodeCommit source action is using the default branch name 'main'. | 2.103.1 | (fix) | | [@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction](#aws-cdkaws-cloudwatch-actionschangelambdapermissionlogicalidforlambdaaction) | When enabled, the logical ID of a Lambda permission for a Lambda action includes an alarm ID. | 2.124.0 | (fix) | | [@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse](#aws-cdkaws-codepipelinecrossaccountkeysdefaultvaluetofalse) | Enables Pipeline to set the default value for crossAccountKeys to false. | 2.127.0 | (default) | +| [@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2](#aws-cdkaws-codepipelinedefaultpipelinetypetov2) | Enables Pipeline to set the default pipeline type to V2. | V2NEXT | (default) | @@ -120,7 +121,8 @@ The following json shows the current recommended set of flags, as `cdk init` wou "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true, "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true, "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true, - "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true + "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true, + "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true } } ``` @@ -1231,4 +1233,20 @@ construct, the construct automatically defaults the value of this property to fa **Compatibility with old behavior:** Pass `crossAccountKeys: true` to `Pipeline` construct to restore the previous behavior. +### @aws-cdk/aws-codepipeline:defaultPipelineTypeToV2 + +*Enables Pipeline to set the default pipeline type to V2.* (default) + +When this feature flag is enabled, and the `pipelineType` property is not provided in a `Pipeline` +construct, the construct automatically defaults the value of this property to `PipelineType.V2`. + + +| Since | Default | Recommended | +| ----- | ----- | ----- | +| (not in v1) | | | +| V2NEXT | `false` | `true` | + +**Compatibility with old behavior:** Pass `pipelineType: PipelineType.V1` to `Pipeline` construct to restore the previous behavior. + + diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts index 0c934b12c5ce9..0811d85c5e127 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts @@ -3,7 +3,11 @@ import * as codepipeline from '../../aws-codepipeline'; import * as cdk from '../../core'; import * as cpactions from '../lib'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation'); /// !show diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts index 7c7873bf5badb..a00d835d17e25 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts @@ -6,7 +6,11 @@ import * as lambda from '../../aws-lambda'; import * as cdk from '../../core'; import * as codepipeline_actions from '../lib'; -const app = new cdk.App(); +const app = new cdk.App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); /// !show const lambdaStack = new cdk.Stack(app, 'LambdaStack'); diff --git a/packages/aws-cdk-lib/aws-codepipeline/README.md b/packages/aws-cdk-lib/aws-codepipeline/README.md index 5881e466d192b..f08a8306c7be0 100644 --- a/packages/aws-cdk-lib/aws-codepipeline/README.md +++ b/packages/aws-cdk-lib/aws-codepipeline/README.md @@ -650,6 +650,9 @@ new codepipeline.Pipeline(this, 'Pipeline', { To migrate your pipeline type from V1 to V2, you just need to update the `pipelineType` property to `PipelineType.V2`. This migration does not cause replacement of your pipeline. +When the `@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2` feature flag is set to `true` (default for new projects), +the V2 type is selected by default if you do not specify a value for `pipelineType` property. Otherwise, the V1 type is selected. + ```ts new codepipeline.Pipeline(this, 'Pipeline', { pipelineType: codepipeline.PipelineType.V2, // here diff --git a/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts b/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts index 218b7471e2528..57465e8d5093b 100644 --- a/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts +++ b/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts @@ -227,7 +227,8 @@ export interface PipelineProps { /** * Type of the pipeline. * - * @default - PipelineType.V1 + * @default - PipelineType.V2 if the feature flag `CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2` + * is true, PipelineType.V1 otherwise * * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-types-planning.html */ @@ -528,11 +529,11 @@ export class Pipeline extends PipelineBase { assumedBy: new iam.ServicePrincipal('codepipeline.amazonaws.com'), }); - // TODO: Change the default value of `pipelineType` to V2 under a feature flag. - if (props.pipelineType === undefined) { + const isDefaultV2 = FeatureFlags.of(this).isEnabled(cxapi.CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2); + if (!isDefaultV2 && props.pipelineType === undefined) { Annotations.of(this).addWarningV2('@aws-cdk/aws-codepipeline:unspecifiedPipelineType', 'V1 pipeline type is implicitly selected when `pipelineType` is not set. If you want to use V2 type, set `PipelineType.V2`.'); } - this.pipelineType = props.pipelineType ?? PipelineType.V1; + this.pipelineType = props.pipelineType ?? (isDefaultV2 ? PipelineType.V2 : PipelineType.V1); if ( props.executionMode @@ -549,7 +550,7 @@ export class Pipeline extends PipelineBase { disableInboundStageTransitions: Lazy.any({ produce: () => this.renderDisabledTransitions() }, { omitEmptyArray: true }), roleArn: this.role.roleArn, restartExecutionOnUpdate: props && props.restartExecutionOnUpdate, - pipelineType: props.pipelineType, + pipelineType: props.pipelineType ?? (isDefaultV2 ? PipelineType.V2 : undefined), variables: Lazy.any({ produce: () => this.renderVariables() }, { omitEmptyArray: true }), triggers: Lazy.any({ produce: () => this.renderTriggers() }, { omitEmptyArray: true }), executionMode: props.executionMode, diff --git a/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts b/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts index 5ad66bd39647e..29587bb657421 100644 --- a/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts +++ b/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts @@ -538,7 +538,8 @@ describe('', () => { test.each([ [codepipeline.PipelineType.V1, 'V1'], [codepipeline.PipelineType.V2, 'V2'], - ])('can specify pipeline type %s', (type, expected) => { + [undefined, Match.absent()], + ])('can specify pipeline type %s when feature flag is not set', (type, expected) => { const stack = new cdk.Stack(); const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { pipelineType: type, @@ -560,6 +561,33 @@ describe('', () => { }); }); + test.each([ + [codepipeline.PipelineType.V1, 'V1'], + [codepipeline.PipelineType.V2, 'V2'], + [undefined, 'V2'], + ])('can specify pipeline type %s when feature flag is enabled', (type, expected) => { + const stack = new cdk.Stack(); + stack.node.setContext(cxapi.CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2, true); + const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { + pipelineType: type, + }); + + const sourceArtifact = new codepipeline.Artifact(); + const sourceActions = [new FakeSourceAction({ + actionName: 'FakeSource', + output: sourceArtifact, + })]; + const buildActions = [new FakeBuildAction({ + actionName: 'FakeBuild', + input: sourceArtifact, + })]; + testPipelineSetup(pipeline, sourceActions, buildActions); + + Template.fromStack(stack).hasResourceProperties('AWS::CodePipeline::Pipeline', { + PipelineType: expected, + }); + }); + test.each([ [codepipeline.ExecutionMode.SUPERSEDED, 'SUPERSEDED'], [codepipeline.ExecutionMode.QUEUED, 'QUEUED'], diff --git a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md index 4b3333f630a60..86bb8373fa803 100644 --- a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +++ b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md @@ -65,6 +65,7 @@ Flags come in three types: | [@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource](#aws-cdkaws-codepipeline-actionsusenewdefaultbranchforcodecommitsource) | When enabled, the CodeCommit source action is using the default branch name 'main'. | 2.103.1 | (fix) | | [@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction](#aws-cdkaws-cloudwatch-actionschangelambdapermissionlogicalidforlambdaaction) | When enabled, the logical ID of a Lambda permission for a Lambda action includes an alarm ID. | 2.124.0 | (fix) | | [@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse](#aws-cdkaws-codepipelinecrossaccountkeysdefaultvaluetofalse) | Enables Pipeline to set the default value for crossAccountKeys to false. | 2.127.0 | (default) | +| [@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2](#aws-cdkaws-codepipelinedefaultpipelinetypetov2) | Enables Pipeline to set the default pipeline type to V2. | V2NEXT | (default) | @@ -120,7 +121,8 @@ The following json shows the current recommended set of flags, as `cdk init` wou "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true, "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true, "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true, - "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true + "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true, + "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true } } ``` @@ -1231,4 +1233,20 @@ construct, the construct automatically defaults the value of this property to fa **Compatibility with old behavior:** Pass `crossAccountKeys: true` to `Pipeline` construct to restore the previous behavior. +### @aws-cdk/aws-codepipeline:defaultPipelineTypeToV2 + +*Enables Pipeline to set the default pipeline type to V2.* (default) + +When this feature flag is enabled, and the `pipelineType` property is not provided in a `Pipeline` +construct, the construct automatically defaults the value of this property to `PipelineType.V2`. + + +| Since | Default | Recommended | +| ----- | ----- | ----- | +| (not in v1) | | | +| V2NEXT | `false` | `true` | + +**Compatibility with old behavior:** Pass `pipelineType: PipelineType.V1` to `Pipeline` construct to restore the previous behavior. + + diff --git a/packages/aws-cdk-lib/cx-api/README.md b/packages/aws-cdk-lib/cx-api/README.md index b93c709a1ee47..394a47009b24d 100644 --- a/packages/aws-cdk-lib/cx-api/README.md +++ b/packages/aws-cdk-lib/cx-api/README.md @@ -275,3 +275,20 @@ _cdk.json_ } } ``` + +* `@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2` + +Enables Pipeline to set the default pipeline type to V2. + +When this feature flag is enabled, and the `pipelineType` property is not provided in a `Pipeline` +construct, the construct automatically defaults the value of this property to `PipelineType.V2`. + +_cdk.json_ + +```json +{ + "context": { + "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true + } +} +``` diff --git a/packages/aws-cdk-lib/cx-api/lib/features.ts b/packages/aws-cdk-lib/cx-api/lib/features.ts index 72b96bf2e423e..28b15de29a57c 100644 --- a/packages/aws-cdk-lib/cx-api/lib/features.ts +++ b/packages/aws-cdk-lib/cx-api/lib/features.ts @@ -99,6 +99,7 @@ export const APPSYNC_ENABLE_USE_ARN_IDENTIFIER_SOURCE_API_ASSOCIATION = '@aws-cd export const CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME = '@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource'; export const LAMBDA_PERMISSION_LOGICAL_ID_FOR_LAMBDA_ACTION = '@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction'; export const CODEPIPELINE_CROSS_ACCOUNT_KEYS_DEFAULT_VALUE_TO_FALSE = '@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse'; +export const CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2 = '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2'; export const FLAGS: Record = { ////////////////////////////////////////////////////////////////////// @@ -1007,6 +1008,19 @@ export const FLAGS: Record = { recommendedValue: true, compatibilityWithOldBehaviorMd: 'Pass `crossAccountKeys: true` to `Pipeline` construct to restore the previous behavior.', }, + + ////////////////////////////////////////////////////////////////////// + [CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2]: { + type: FlagType.ApiDefault, + summary: 'Enables Pipeline to set the default pipeline type to V2.', + detailsMd: ` + When this feature flag is enabled, and the \`pipelineType\` property is not provided in a \`Pipeline\` + construct, the construct automatically defaults the value of this property to \`PipelineType.V2\`. + `, + introducedIn: { v2: 'V2NEXT' }, + recommendedValue: true, + compatibilityWithOldBehaviorMd: 'Pass `pipelineType: PipelineType.V1` to `Pipeline` construct to restore the previous behavior.', + }, }; const CURRENT_MV = 'v2'; From 00e8a7b877a732b4236227f6462bf3914ce7a214 Mon Sep 17 00:00:00 2001 From: Hirotaka Tagawa / wafuwafu13 Date: Wed, 13 Mar 2024 01:40:58 +0000 Subject: [PATCH 13/18] feat(ecs-patterns): support `securityGroups` in `NetworkLoadBalancedFargateService` (#29431) ### Issue # (if applicable) Closes #29430 (related to https://github.com/aws/aws-cdk/pull/29186#issuecomment-1959231406) ### Reason for this change We can't specify `securityGroups` in `NetworkLoadBalancedFargateService` now. ### Description of changes - Add `securityGroups` property to `NetworkLoadBalancedFargateServiceProps`. - Add unit test - Add integ test ### Description of how you validated changes - Pass unit test - Pass integ test ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-ecs-integ-lb-fargate.assets.json | 19 + .../aws-ecs-integ-lb-fargate.template.json | 750 ++++++++++ .../fargate/integ.nlb-sg.js.snapshot/cdk.out | 1 + .../integ.nlb-sg.js.snapshot/integ.json | 12 + ...efaultTestDeployAssert3391A20B.assets.json | 19 + ...aultTestDeployAssert3391A20B.template.json | 36 + .../integ.nlb-sg.js.snapshot/manifest.json | 323 ++++ .../integ.nlb-sg.js.snapshot/tree.json | 1304 +++++++++++++++++ .../test/fargate/integ.nlb-sg.ts | 40 + .../aws-cdk-lib/aws-ecs-patterns/README.md | 17 +- .../network-load-balanced-fargate-service.ts | 9 +- .../load-balanced-fargate-service.test.ts | 44 + 12 files changed, 2572 insertions(+), 2 deletions(-) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/aws-ecs-integ-lb-fargate.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/aws-ecs-integ-lb-fargate.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/l3FargateTestDefaultTestDeployAssert3391A20B.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/l3FargateTestDefaultTestDeployAssert3391A20B.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/aws-ecs-integ-lb-fargate.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/aws-ecs-integ-lb-fargate.assets.json new file mode 100644 index 0000000000000..17197614dcd47 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/aws-ecs-integ-lb-fargate.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "01677902a566d4c905bae44eaf146aefbe867b471036ab56d5abe5f9622c0ccd": { + "source": { + "path": "aws-ecs-integ-lb-fargate.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "01677902a566d4c905bae44eaf146aefbe867b471036ab56d5abe5f9622c0ccd.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/aws-ecs-integ-lb-fargate.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/aws-ecs-integ-lb-fargate.template.json new file mode 100644 index 0000000000000..69b2823074894 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/aws-ecs-integ-lb-fargate.template.json @@ -0,0 +1,750 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-lb-fargate/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "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-ecs-integ-lb-fargate/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet1EIPD7E02669": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1" + } + ] + } + }, + "VpcPublicSubnet1NATGateway4D7517AA": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet1DefaultRoute3DA9E72A", + "VpcPublicSubnet1RouteTableAssociation97140677" + ] + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "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-ecs-integ-lb-fargate/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet2EIP3C605A87": { + "Type": "AWS::EC2::EIP", + "Properties": { + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2" + } + ] + } + }, + "VpcPublicSubnet2NATGateway9182C01D": { + "Type": "AWS::EC2::NatGateway", + "Properties": { + "AllocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2" + } + ] + }, + "DependsOn": [ + "VpcPublicSubnet2DefaultRoute97F91067", + "VpcPublicSubnet2RouteTableAssociationDD5762D8" + ] + }, + "VpcPrivateSubnet1Subnet536B997A": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "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-ecs-integ-lb-fargate/Vpc/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet1RouteTableB2C5B500": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + } + } + }, + "VpcPrivateSubnet1DefaultRouteBE02A9ED": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + } + } + }, + "VpcPrivateSubnet2Subnet3788AAA1": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "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-ecs-integ-lb-fargate/Vpc/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet2RouteTableA678073B": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + }, + "SubnetId": { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + } + }, + "VpcPrivateSubnet2DefaultRoute060D2087": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "NatGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-lb-fargate/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "FargateCluster7CCD5F93": { + "Type": "AWS::ECS::Cluster" + }, + "SecurityGroupNlbFA132873": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "aws-ecs-integ-lb-fargate/SecurityGroupNlb", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "SecurityGroupIngress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "from 0.0.0.0/0:32768-65535", + "FromPort": 32768, + "IpProtocol": "tcp", + "ToPort": 65535 + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "SecurityGroupServiceDE1E5E6A": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "aws-ecs-integ-lb-fargate/SecurityGroupService", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "SecurityGroupIngress": [ + { + "Description": { + "Fn::Join": [ + "", + [ + "from ", + { + "Fn::GetAtt": [ + "SecurityGroupNlbFA132873", + "GroupId" + ] + }, + ":ALL PORTS" + ] + ] + }, + "FromPort": 0, + "IpProtocol": "tcp", + "SourceSecurityGroupId": { + "Fn::GetAtt": [ + "SecurityGroupNlbFA132873", + "GroupId" + ] + }, + "ToPort": 65535 + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "NLBFargateServiceLB659EC17C": { + "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "Properties": { + "LoadBalancerAttributes": [ + { + "Key": "deletion_protection.enabled", + "Value": "false" + } + ], + "Scheme": "internet-facing", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "SecurityGroupNlbFA132873", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + ], + "Type": "network" + }, + "DependsOn": [ + "VpcPublicSubnet1DefaultRoute3DA9E72A", + "VpcPublicSubnet1RouteTableAssociation97140677", + "VpcPublicSubnet2DefaultRoute97F91067", + "VpcPublicSubnet2RouteTableAssociationDD5762D8" + ] + }, + "NLBFargateServiceLBPublicListenerB0DCA73C": { + "Type": "AWS::ElasticLoadBalancingV2::Listener", + "Properties": { + "DefaultActions": [ + { + "TargetGroupArn": { + "Ref": "NLBFargateServiceLBPublicListenerECSGroupC469CAA2" + }, + "Type": "forward" + } + ], + "LoadBalancerArn": { + "Ref": "NLBFargateServiceLB659EC17C" + }, + "Port": 80, + "Protocol": "TCP" + } + }, + "NLBFargateServiceLBPublicListenerECSGroupC469CAA2": { + "Type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "Properties": { + "Port": 80, + "Protocol": "TCP", + "TargetType": "ip", + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "NLBFargateServiceTaskDefTaskRole6C88F40B": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "NLBFargateServiceTaskDefB836FA89": { + "Type": "AWS::ECS::TaskDefinition", + "Properties": { + "ContainerDefinitions": [ + { + "Essential": true, + "Image": "amazon/amazon-ecs-sample", + "LogConfiguration": { + "LogDriver": "awslogs", + "Options": { + "awslogs-group": { + "Ref": "NLBFargateServiceTaskDefwebLogGroupC4A42FE2" + }, + "awslogs-stream-prefix": "NLBFargateService", + "awslogs-region": { + "Ref": "AWS::Region" + } + } + }, + "Name": "web", + "PortMappings": [ + { + "ContainerPort": 80, + "Protocol": "tcp" + } + ] + } + ], + "Cpu": "512", + "ExecutionRoleArn": { + "Fn::GetAtt": [ + "NLBFargateServiceTaskDefExecutionRoleF6D642D5", + "Arn" + ] + }, + "Family": "awsecsinteglbfargateNLBFargateServiceTaskDef1265FF34", + "Memory": "1024", + "NetworkMode": "awsvpc", + "RequiresCompatibilities": [ + "FARGATE" + ], + "TaskRoleArn": { + "Fn::GetAtt": [ + "NLBFargateServiceTaskDefTaskRole6C88F40B", + "Arn" + ] + } + } + }, + "NLBFargateServiceTaskDefwebLogGroupC4A42FE2": { + "Type": "AWS::Logs::LogGroup", + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "NLBFargateServiceTaskDefExecutionRoleF6D642D5": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "NLBFargateServiceTaskDefExecutionRoleDefaultPolicy90080805": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "NLBFargateServiceTaskDefwebLogGroupC4A42FE2", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "NLBFargateServiceTaskDefExecutionRoleDefaultPolicy90080805", + "Roles": [ + { + "Ref": "NLBFargateServiceTaskDefExecutionRoleF6D642D5" + } + ] + } + }, + "NLBFargateServiceB92AC095": { + "Type": "AWS::ECS::Service", + "Properties": { + "Cluster": { + "Ref": "FargateCluster7CCD5F93" + }, + "DeploymentConfiguration": { + "Alarms": { + "AlarmNames": [], + "Enable": false, + "Rollback": false + }, + "MaximumPercent": 200, + "MinimumHealthyPercent": 50 + }, + "EnableECSManagedTags": false, + "HealthCheckGracePeriodSeconds": 60, + "LaunchType": "FARGATE", + "LoadBalancers": [ + { + "ContainerName": "web", + "ContainerPort": 80, + "TargetGroupArn": { + "Ref": "NLBFargateServiceLBPublicListenerECSGroupC469CAA2" + } + } + ], + "NetworkConfiguration": { + "AwsvpcConfiguration": { + "AssignPublicIp": "DISABLED", + "SecurityGroups": [ + { + "Fn::GetAtt": [ + "SecurityGroupServiceDE1E5E6A", + "GroupId" + ] + } + ], + "Subnets": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + } + }, + "TaskDefinition": { + "Ref": "NLBFargateServiceTaskDefB836FA89" + } + }, + "DependsOn": [ + "NLBFargateServiceLBPublicListenerECSGroupC469CAA2", + "NLBFargateServiceLBPublicListenerB0DCA73C", + "NLBFargateServiceTaskDefTaskRole6C88F40B" + ] + } + }, + "Outputs": { + "NLBFargateServiceLoadBalancerDNSC2B2922F": { + "Value": { + "Fn::GetAtt": [ + "NLBFargateServiceLB659EC17C", + "DNSName" + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/integ.json new file mode 100644 index 0000000000000..6d95f61c34e55 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "36.0.0", + "testCases": { + "l3FargateTest/DefaultTest": { + "stacks": [ + "aws-ecs-integ-lb-fargate" + ], + "assertionStack": "l3FargateTest/DefaultTest/DeployAssert", + "assertionStackName": "l3FargateTestDefaultTestDeployAssert3391A20B" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/l3FargateTestDefaultTestDeployAssert3391A20B.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/l3FargateTestDefaultTestDeployAssert3391A20B.assets.json new file mode 100644 index 0000000000000..4e6f5d15656c9 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/l3FargateTestDefaultTestDeployAssert3391A20B.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "l3FargateTestDefaultTestDeployAssert3391A20B.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/l3FargateTestDefaultTestDeployAssert3391A20B.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/l3FargateTestDefaultTestDeployAssert3391A20B.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/l3FargateTestDefaultTestDeployAssert3391A20B.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/manifest.json new file mode 100644 index 0000000000000..796449a3f0f70 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/manifest.json @@ -0,0 +1,323 @@ +{ + "version": "36.0.0", + "artifacts": { + "aws-ecs-integ-lb-fargate.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-ecs-integ-lb-fargate.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-ecs-integ-lb-fargate": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-ecs-integ-lb-fargate.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/01677902a566d4c905bae44eaf146aefbe867b471036ab56d5abe5f9622c0ccd.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-ecs-integ-lb-fargate.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-ecs-integ-lb-fargate.assets" + ], + "metadata": { + "/aws-ecs-integ-lb-fargate/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1Subnet5C2D37C4" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTable6C95E38E" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTableAssociation97140677" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1DefaultRoute3DA9E72A" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1EIPD7E02669" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1NATGateway4D7517AA" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2Subnet691E08A3" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTable94F7E489" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTableAssociationDD5762D8" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2DefaultRoute97F91067" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/EIP": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2EIP3C605A87" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/NATGateway": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2NATGateway9182C01D" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1Subnet536B997A" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableB2C5B500" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1RouteTableAssociation70C59FA6" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet1DefaultRouteBE02A9ED" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableA678073B" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPrivateSubnet2DefaultRoute060D2087" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIGWD7BA715C" + } + ], + "/aws-ecs-integ-lb-fargate/Vpc/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVPCGWBF912B6E" + } + ], + "/aws-ecs-integ-lb-fargate/FargateCluster/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateCluster7CCD5F93" + } + ], + "/aws-ecs-integ-lb-fargate/SecurityGroupNlb/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SecurityGroupNlbFA132873" + } + ], + "/aws-ecs-integ-lb-fargate/SecurityGroupService/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "SecurityGroupServiceDE1E5E6A" + } + ], + "/aws-ecs-integ-lb-fargate/NLBFargateService/LB/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "NLBFargateServiceLB659EC17C" + } + ], + "/aws-ecs-integ-lb-fargate/NLBFargateService/LB/PublicListener/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "NLBFargateServiceLBPublicListenerB0DCA73C" + } + ], + "/aws-ecs-integ-lb-fargate/NLBFargateService/LB/PublicListener/ECSGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "NLBFargateServiceLBPublicListenerECSGroupC469CAA2" + } + ], + "/aws-ecs-integ-lb-fargate/NLBFargateService/LoadBalancerDNS": [ + { + "type": "aws:cdk:logicalId", + "data": "NLBFargateServiceLoadBalancerDNSC2B2922F" + } + ], + "/aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/TaskRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "NLBFargateServiceTaskDefTaskRole6C88F40B" + } + ], + "/aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "NLBFargateServiceTaskDefB836FA89" + } + ], + "/aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/web/LogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "NLBFargateServiceTaskDefwebLogGroupC4A42FE2" + } + ], + "/aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/ExecutionRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "NLBFargateServiceTaskDefExecutionRoleF6D642D5" + } + ], + "/aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/ExecutionRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "NLBFargateServiceTaskDefExecutionRoleDefaultPolicy90080805" + } + ], + "/aws-ecs-integ-lb-fargate/NLBFargateService/Service/Service": [ + { + "type": "aws:cdk:logicalId", + "data": "NLBFargateServiceB92AC095" + } + ], + "/aws-ecs-integ-lb-fargate/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-ecs-integ-lb-fargate/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-ecs-integ-lb-fargate" + }, + "l3FargateTestDefaultTestDeployAssert3391A20B.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "l3FargateTestDefaultTestDeployAssert3391A20B.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "l3FargateTestDefaultTestDeployAssert3391A20B": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "l3FargateTestDefaultTestDeployAssert3391A20B.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "l3FargateTestDefaultTestDeployAssert3391A20B.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "l3FargateTestDefaultTestDeployAssert3391A20B.assets" + ], + "metadata": { + "/l3FargateTest/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/l3FargateTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "l3FargateTest/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/tree.json new file mode 100644 index 0000000000000..8e06bfa34093f --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.js.snapshot/tree.json @@ -0,0 +1,1304 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-ecs-integ-lb-fargate": { + "id": "aws-ecs-integ-lb-fargate", + "path": "aws-ecs-integ-lb-fargate", + "children": { + "Vpc": { + "id": "Vpc", + "path": "aws-ecs-integ-lb-fargate/Vpc", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/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-ecs-integ-lb-fargate/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" + } + }, + "PublicSubnet1": { + "id": "PublicSubnet1", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "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-ecs-integ-lb-fargate/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ-lb-fargate/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-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet1EIPD7E02669", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PublicSubnet2": { + "id": "PublicSubnet2", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "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-ecs-integ-lb-fargate/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ-lb-fargate/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-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "gatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + }, + "EIP": { + "id": "EIP", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/EIP", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::EIP", + "aws:cdk:cloudformation:props": { + "domain": "vpc", + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" + } + }, + "NATGateway": { + "id": "NATGateway", + "path": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2/NATGateway", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", + "aws:cdk:cloudformation:props": { + "allocationId": { + "Fn::GetAtt": [ + "VpcPublicSubnet2EIP3C605A87", + "AllocationId" + ] + }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-lb-fargate/Vpc/PublicSubnet2" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet1": { + "id": "PrivateSubnet1", + "path": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "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-ecs-integ-lb-fargate/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ-lb-fargate/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-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet1/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "PrivateSubnet2": { + "id": "PrivateSubnet2", + "path": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2", + "children": { + "Subnet": { + "id": "Subnet", + "path": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2/Subnet", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", + "aws:cdk:cloudformation:props": { + "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-ecs-integ-lb-fargate/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" + } + }, + "Acl": { + "id": "Acl", + "path": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2/Acl", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "RouteTable": { + "id": "RouteTable", + "path": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2/RouteTable", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" + } + }, + "RouteTableAssociation": { + "id": "RouteTableAssociation", + "path": "aws-ecs-integ-lb-fargate/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-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" + } + }, + "DefaultRoute": { + "id": "DefaultRoute", + "path": "aws-ecs-integ-lb-fargate/Vpc/PrivateSubnet2/DefaultRoute", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::Route", + "aws:cdk:cloudformation:props": { + "destinationCidrBlock": "0.0.0.0/0", + "natGatewayId": { + "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" + } + }, + "IGW": { + "id": "IGW", + "path": "aws-ecs-integ-lb-fargate/Vpc/IGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "Name", + "value": "aws-ecs-integ-lb-fargate/Vpc" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" + } + }, + "VPCGW": { + "id": "VPCGW", + "path": "aws-ecs-integ-lb-fargate/Vpc/VPCGW", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", + "aws:cdk:cloudformation:props": { + "internetGatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" + } + }, + "FargateCluster": { + "id": "FargateCluster", + "path": "aws-ecs-integ-lb-fargate/FargateCluster", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/FargateCluster/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::Cluster", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" + } + }, + "SecurityGroupNlb": { + "id": "SecurityGroupNlb", + "path": "aws-ecs-integ-lb-fargate/SecurityGroupNlb", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/SecurityGroupNlb/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "aws-ecs-integ-lb-fargate/SecurityGroupNlb", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "securityGroupIngress": [ + { + "cidrIp": "0.0.0.0/0", + "ipProtocol": "tcp", + "fromPort": 32768, + "toPort": 65535, + "description": "from 0.0.0.0/0:32768-65535" + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "SecurityGroupService": { + "id": "SecurityGroupService", + "path": "aws-ecs-integ-lb-fargate/SecurityGroupService", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/SecurityGroupService/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", + "aws:cdk:cloudformation:props": { + "groupDescription": "aws-ecs-integ-lb-fargate/SecurityGroupService", + "securityGroupEgress": [ + { + "cidrIp": "0.0.0.0/0", + "description": "Allow all outbound traffic by default", + "ipProtocol": "-1" + } + ], + "securityGroupIngress": [ + { + "sourceSecurityGroupId": { + "Fn::GetAtt": [ + "SecurityGroupNlbFA132873", + "GroupId" + ] + }, + "ipProtocol": "tcp", + "fromPort": 0, + "toPort": 65535, + "description": { + "Fn::Join": [ + "", + [ + "from ", + { + "Fn::GetAtt": [ + "SecurityGroupNlbFA132873", + "GroupId" + ] + }, + ":ALL PORTS" + ] + ] + } + } + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" + } + }, + "NLBFargateService": { + "id": "NLBFargateService", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService", + "children": { + "LB": { + "id": "LB", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/LB", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/LB/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::LoadBalancer", + "aws:cdk:cloudformation:props": { + "loadBalancerAttributes": [ + { + "key": "deletion_protection.enabled", + "value": "false" + } + ], + "scheme": "internet-facing", + "securityGroups": [ + { + "Fn::GetAtt": [ + "SecurityGroupNlbFA132873", + "GroupId" + ] + } + ], + "subnets": [ + { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, + { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + ], + "type": "network" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", + "version": "0.0.0" + } + }, + "PublicListener": { + "id": "PublicListener", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/LB/PublicListener", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/LB/PublicListener/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::Listener", + "aws:cdk:cloudformation:props": { + "defaultActions": [ + { + "type": "forward", + "targetGroupArn": { + "Ref": "NLBFargateServiceLBPublicListenerECSGroupC469CAA2" + } + } + ], + "loadBalancerArn": { + "Ref": "NLBFargateServiceLB659EC17C" + }, + "port": 80, + "protocol": "TCP" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", + "version": "0.0.0" + } + }, + "ECSGroup": { + "id": "ECSGroup", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/LB/PublicListener/ECSGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/LB/PublicListener/ECSGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::TargetGroup", + "aws:cdk:cloudformation:props": { + "port": 80, + "protocol": "TCP", + "targetType": "ip", + "vpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.NetworkTargetGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.NetworkListener", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.NetworkLoadBalancer", + "version": "0.0.0" + } + }, + "LoadBalancerDNS": { + "id": "LoadBalancerDNS", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/LoadBalancerDNS", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "TaskDef": { + "id": "TaskDef", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef", + "children": { + "TaskRole": { + "id": "TaskRole", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/TaskRole", + "children": { + "ImportTaskRole": { + "id": "ImportTaskRole", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/TaskRole/ImportTaskRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/TaskRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::TaskDefinition", + "aws:cdk:cloudformation:props": { + "containerDefinitions": [ + { + "essential": true, + "image": "amazon/amazon-ecs-sample", + "name": "web", + "portMappings": [ + { + "containerPort": 80, + "protocol": "tcp" + } + ], + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-group": { + "Ref": "NLBFargateServiceTaskDefwebLogGroupC4A42FE2" + }, + "awslogs-stream-prefix": "NLBFargateService", + "awslogs-region": { + "Ref": "AWS::Region" + } + } + } + } + ], + "cpu": "512", + "executionRoleArn": { + "Fn::GetAtt": [ + "NLBFargateServiceTaskDefExecutionRoleF6D642D5", + "Arn" + ] + }, + "family": "awsecsinteglbfargateNLBFargateServiceTaskDef1265FF34", + "memory": "1024", + "networkMode": "awsvpc", + "requiresCompatibilities": [ + "FARGATE" + ], + "taskRoleArn": { + "Fn::GetAtt": [ + "NLBFargateServiceTaskDefTaskRole6C88F40B", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" + } + }, + "web": { + "id": "web", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/web", + "children": { + "LogGroup": { + "id": "LogGroup", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/web/LogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/web/LogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": {} + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_logs.LogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" + } + }, + "ExecutionRole": { + "id": "ExecutionRole", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/ExecutionRole", + "children": { + "ImportExecutionRole": { + "id": "ImportExecutionRole", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/ExecutionRole/ImportExecutionRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/ExecutionRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "ecs-tasks.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/ExecutionRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/TaskDef/ExecutionRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "NLBFargateServiceTaskDefwebLogGroupC4A42FE2", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "NLBFargateServiceTaskDefExecutionRoleDefaultPolicy90080805", + "roles": [ + { + "Ref": "NLBFargateServiceTaskDefExecutionRoleF6D642D5" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", + "version": "0.0.0" + } + }, + "Service": { + "id": "Service", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/Service", + "children": { + "Service": { + "id": "Service", + "path": "aws-ecs-integ-lb-fargate/NLBFargateService/Service/Service", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::ECS::Service", + "aws:cdk:cloudformation:props": { + "cluster": { + "Ref": "FargateCluster7CCD5F93" + }, + "deploymentConfiguration": { + "maximumPercent": 200, + "minimumHealthyPercent": 50, + "alarms": { + "alarmNames": [], + "enable": false, + "rollback": false + } + }, + "enableEcsManagedTags": false, + "healthCheckGracePeriodSeconds": 60, + "launchType": "FARGATE", + "loadBalancers": [ + { + "targetGroupArn": { + "Ref": "NLBFargateServiceLBPublicListenerECSGroupC469CAA2" + }, + "containerName": "web", + "containerPort": 80 + } + ], + "networkConfiguration": { + "awsvpcConfiguration": { + "assignPublicIp": "DISABLED", + "subnets": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "securityGroups": [ + { + "Fn::GetAtt": [ + "SecurityGroupServiceDE1E5E6A", + "GroupId" + ] + } + ] + } + }, + "taskDefinition": { + "Ref": "NLBFargateServiceTaskDefB836FA89" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs.FargateService", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_ecs_patterns.NetworkLoadBalancedFargateService", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-ecs-integ-lb-fargate/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-ecs-integ-lb-fargate/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "l3FargateTest": { + "id": "l3FargateTest", + "path": "l3FargateTest", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "l3FargateTest/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "l3FargateTest/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "l3FargateTest/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "l3FargateTest/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "l3FargateTest/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.ts new file mode 100644 index 0000000000000..a88af6f0e0ee9 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/fargate/integ.nlb-sg.ts @@ -0,0 +1,40 @@ +import * as ec2 from 'aws-cdk-lib/aws-ec2'; +import * as ecs from 'aws-cdk-lib/aws-ecs'; +import * as cdk from 'aws-cdk-lib'; +import * as integ from '@aws-cdk/integ-tests-alpha'; +import * as ecsPatterns from 'aws-cdk-lib/aws-ecs-patterns'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'aws-ecs-integ-lb-fargate'); + +// Create VPC and cluster +const vpc = new ec2.Vpc(stack, 'Vpc', { maxAzs: 2, restrictDefaultSecurityGroup: false }); +const cluster = new ecs.Cluster(stack, 'FargateCluster', { vpc }); +const securityGroupNlb = new ec2.SecurityGroup(stack, 'SecurityGroupNlb', { + vpc, + allowAllOutbound: true, +}); +securityGroupNlb.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.tcpRange(32768, 65535)); +const securityGroupService = new ec2.SecurityGroup(stack, 'SecurityGroupService', { + vpc, + allowAllOutbound: true, +}); +securityGroupService.addIngressRule(ec2.Peer.securityGroupId(securityGroupNlb.securityGroupId), ec2.Port.allTcp()); + +// Create NLB service with security group +const networkLoadBalancedFargateService = new ecsPatterns.NetworkLoadBalancedFargateService(stack, 'NLBFargateService', { + cluster, + memoryLimitMiB: 1024, + cpu: 512, + taskImageOptions: { + image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'), + }, + securityGroups: [securityGroupService], +}); +networkLoadBalancedFargateService.loadBalancer.connections.addSecurityGroup(securityGroupNlb); + +new integ.IntegTest(app, 'l3FargateTest', { + testCases: [stack], +}); + +app.synth(); diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/README.md b/packages/aws-cdk-lib/aws-ecs-patterns/README.md index 6dda31ecccfaf..f927f78127524 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/README.md +++ b/packages/aws-cdk-lib/aws-ecs-patterns/README.md @@ -1072,4 +1072,19 @@ const networkLoadBalancedFargateService = new ecsPatterns.NetworkLoadBalancedFar image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'), }, }); -``` \ No newline at end of file +``` + +### Set securityGroups for NetworkLoadBalancedFargateService + +```ts +declare const vpc: ec2.Vpc; +declare const securityGroup: ec2.SecurityGroup; +const queueProcessingFargateService = new ecsPatterns.NetworkLoadBalancedFargateService(this, 'Service', { + vpc, + memoryLimitMiB: 512, + taskImageOptions: { + image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'), + }, + securityGroups: [securityGroup], +}); +``` diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.ts b/packages/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.ts index 993a17a92aed2..cf5b0389914c8 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.ts @@ -1,5 +1,5 @@ import { Construct } from 'constructs'; -import { SubnetSelection } from '../../../aws-ec2'; +import { ISecurityGroup, SubnetSelection } from '../../../aws-ec2'; import { FargateService, FargateTaskDefinition } from '../../../aws-ecs'; import { FeatureFlags } from '../../../core'; import * as cxapi from '../../../cx-api'; @@ -25,6 +25,12 @@ export interface NetworkLoadBalancedFargateServiceProps extends NetworkLoadBalan */ readonly taskSubnets?: SubnetSelection; + /** + * The security groups to associate with the service. If you do not specify a security group, a new security group is created. + * + * @default - A new security group is created. + */ + readonly securityGroups?: ISecurityGroup[]; } /** @@ -102,6 +108,7 @@ export class NetworkLoadBalancedFargateService extends NetworkLoadBalancedServic platformVersion: props.platformVersion, deploymentController: props.deploymentController, circuitBreaker: props.circuitBreaker, + securityGroups: props.securityGroups, vpcSubnets: props.taskSubnets, enableExecuteCommand: props.enableExecuteCommand, capacityProviderStrategies: props.capacityProviderStrategies, diff --git a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/load-balanced-fargate-service.test.ts b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/load-balanced-fargate-service.test.ts index 5092f257a96fb..18b6b929f76f6 100644 --- a/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/load-balanced-fargate-service.test.ts +++ b/packages/aws-cdk-lib/aws-ecs-patterns/test/fargate/load-balanced-fargate-service.test.ts @@ -2022,4 +2022,48 @@ describe('NetworkLoadBalancedFargateService', () => { }, }); }); + + test('specify security group', () => { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'Vpc'); + const cluster = new ecs.Cluster(stack, 'Cluster', { vpc, clusterName: 'MyCluster' }); + const securityGroup = new ec2.SecurityGroup(stack, 'SecurityGroup', { + allowAllOutbound: false, + description: 'Example', + securityGroupName: 'Rolly', + vpc, + }); + + // WHEN + new ecsPatterns.NetworkLoadBalancedFargateService(stack, 'Service', { + cluster, + taskImageOptions: { + image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'), + }, + securityGroups: [securityGroup], + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', { + LaunchType: 'FARGATE', + }); + + Template.fromStack(stack).hasResourceProperties('AWS::EC2::SecurityGroup', { + GroupDescription: 'Example', + GroupName: 'Rolly', + SecurityGroupEgress: [ + { + CidrIp: '255.255.255.255/32', + Description: 'Disallow all traffic', + FromPort: 252, + IpProtocol: 'icmp', + ToPort: 86, + }, + ], + VpcId: { + Ref: 'Vpc8378EB38', + }, + }); + }); }); From 4582ac5c9e2cd9c7de289be06682ecd5b813b26a Mon Sep 17 00:00:00 2001 From: Jimmy Gaussen Date: Wed, 13 Mar 2024 18:50:28 +0100 Subject: [PATCH 14/18] chore(msk-alpha): update KafkaVersion (#29440) ### Issue # (if applicable) Could not find any in the backlog ### Reason for this change Update the CDK listed Kafka versions to match the current availability, as well as add missing deprecated versions ### Description of changes * Added latest version * `3.6.0` also supports tiered storage, see [docs](https://docs.aws.amazon.com/msk/latest/developerguide/msk-tiered-storage.html#msk-tiered-storage-requirements). I replaced the prefix check with a list of supported versions, as I'm not sure if say every reason after 3.6.0 will support it, and the `.tiered` prefix isn't consistently applied anymore * Added two unlisted, deprecated versions, as they are still returned by the SDK. The goal is to remove any differences between the SDK and the CDK to ease future automation ### Description of how you validated changes I compared the current CDK versions to live SDK data, using the `kafka:ListKafkaVersions` API results. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --------- Co-authored-by: GZ --- packages/@aws-cdk/aws-msk-alpha/README.md | 5 +-- .../aws-msk-alpha/lib/cluster-version.ts | 35 ++++++++++++++++++- .../aws-msk-alpha/test/cluster.test.ts | 8 ++++- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/aws-msk-alpha/README.md b/packages/@aws-cdk/aws-msk-alpha/README.md index 81b74be3aa279..8155f8829a756 100644 --- a/packages/@aws-cdk/aws-msk-alpha/README.md +++ b/packages/@aws-cdk/aws-msk-alpha/README.md @@ -217,7 +217,8 @@ You can configure an MSK cluster storage mode using the `storageMode` property. Tiered storage is a low-cost storage tier for Amazon MSK that scales to virtually unlimited storage, making it cost-effective to build streaming data applications. -> Visit [Tiered storage](https://docs.aws.amazon.com/msk/latest/developerguide/msk-tiered-storage.html) for more details. +> Visit [Tiered storage](https://docs.aws.amazon.com/msk/latest/developerguide/msk-tiered-storage.html) +to see the list of compatible Kafka versions and for more details. ```ts declare const vpc: ec2.Vpc; @@ -225,7 +226,7 @@ declare const bucket: s3.IBucket; const cluster = new msk.Cluster(this, 'cluster', { clusterName: 'myCluster', - kafkaVersion: msk.KafkaVersion.V2_8_2_TIERED, + kafkaVersion: msk.KafkaVersion.V3_6_0, vpc, storageMode: msk.StorageMode.TIERED, }); diff --git a/packages/@aws-cdk/aws-msk-alpha/lib/cluster-version.ts b/packages/@aws-cdk/aws-msk-alpha/lib/cluster-version.ts index 405c0c6ee0ecc..b3c5277018b1c 100644 --- a/packages/@aws-cdk/aws-msk-alpha/lib/cluster-version.ts +++ b/packages/@aws-cdk/aws-msk-alpha/lib/cluster-version.ts @@ -11,6 +11,15 @@ export class KafkaVersion { */ public static readonly V1_1_1 = KafkaVersion.of('1.1.1'); + /** + * **Deprecated by Amazon MSK. You can't create a Kafka cluster with a deprecated version.** + * + * Kafka version 2.1.0 + * + * @deprecated use the latest runtime instead + */ + public static readonly V2_1_0 = KafkaVersion.of('2.1.0'); + /** * Kafka version 2.2.1 */ @@ -21,6 +30,15 @@ export class KafkaVersion { */ public static readonly V2_3_1 = KafkaVersion.of('2.3.1'); + /** + * **Deprecated by Amazon MSK. You can't create a Kafka cluster with a deprecated version.** + * + * Kafka version 2.4.1 + * + * @deprecated use the latest runtime instead + */ + public static readonly V2_4_1 = KafkaVersion.of('2.4.1'); + /** * Kafka version 2.4.1 */ @@ -111,6 +129,11 @@ export class KafkaVersion { */ public static readonly V3_5_1 = KafkaVersion.of('3.5.1'); + /** + * Kafka version 3.6.0 + */ + public static readonly V3_6_0 = KafkaVersion.of('3.6.0'); + /** * Custom cluster version * @param version custom version number @@ -119,6 +142,16 @@ export class KafkaVersion { return new KafkaVersion(version); } + /** + * List of Kafka versions that support tiered storage + * + * @see https://docs.aws.amazon.com/msk/latest/developerguide/msk-tiered-storage.html#msk-tiered-storage-requirements + */ + private static readonly TIERED_STORAGE_COMPATIBLE_VERSIONS = [ + KafkaVersion.V2_8_2_TIERED, + KafkaVersion.V3_6_0, + ].map(({ version }) => version); + /** * * @param version cluster version number @@ -129,6 +162,6 @@ export class KafkaVersion { * Checks if the cluster version supports tiered storage mode. */ public isTieredStorageCompatible() { - return this.version.endsWith('.tiered'); + return KafkaVersion.TIERED_STORAGE_COMPATIBLE_VERSIONS.includes(this.version); }; } diff --git a/packages/@aws-cdk/aws-msk-alpha/test/cluster.test.ts b/packages/@aws-cdk/aws-msk-alpha/test/cluster.test.ts index babbb235b40a3..7c4bd6a10f4ec 100644 --- a/packages/@aws-cdk/aws-msk-alpha/test/cluster.test.ts +++ b/packages/@aws-cdk/aws-msk-alpha/test/cluster.test.ts @@ -790,6 +790,12 @@ describe('MSK Cluster', () => { describe('created with storage mode', () => { describe('with tiered storage mode', () => { + test('version.isTieredStorageCompatible', () => { + expect(msk.KafkaVersion.V2_8_2_TIERED.isTieredStorageCompatible()).toBeTruthy(); + expect(msk.KafkaVersion.V3_5_1.isTieredStorageCompatible()).toBeFalsy(); + expect(msk.KafkaVersion.V3_6_0.isTieredStorageCompatible()).toBeTruthy(); + }); + test('create a cluster with tiered storage mode', () => { new msk.Cluster(stack, 'Cluster', { clusterName: 'cluster', @@ -797,7 +803,7 @@ describe('MSK Cluster', () => { kafkaVersion: msk.KafkaVersion.V2_8_2_TIERED, vpc, storageMode: msk.StorageMode.TIERED, - }), + }); Template.fromStack(stack).hasResourceProperties('AWS::MSK::Cluster', { StorageMode: 'TIERED', }); From 135b5208dce849f49b6f540f7199ece057a7ef22 Mon Sep 17 00:00:00 2001 From: Calvin Combs <66279577+comcalvi@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:20:12 -0700 Subject: [PATCH 15/18] feat(CLI): improved nested stack diff (#29172) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Issue # (if applicable) ### Reason for this change The existing nested stack diff places a fake property, `NestedTemplate`, in the templates to be diffed. This prevents displaying resource replacement information in the diff, like we do for top level stacks. This PR does *not* add changeset replacement information from changesets, but it does add replacement information from the spec. ### Description of changes Reworked nested stack diff to treat nested stacks as top level stacks. This improves the visual UX and sets us up for using changesets with nested stacks. #### Before Screenshot 2024-02-19 at 1 47 59 PM #### After Screenshot 2024-02-19 at 1 48 48 PM ### Description of how you validated changes Unit tests + manual tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../cloudformation-diff/lib/diff-template.ts | 6 +- .../cloudformation-diff/lib/format.ts | 8 +- packages/aws-cdk/lib/api/deployments.ts | 10 +- .../api/evaluate-cloudformation-template.ts | 34 +- .../aws-cdk/lib/api/hotswap-deployments.ts | 22 +- .../aws-cdk/lib/api/nested-stack-helpers.ts | 85 ++-- packages/aws-cdk/lib/cdk-toolkit.ts | 16 +- packages/aws-cdk/lib/diff.ts | 35 +- .../api/cloudformation-deployments.test.ts | 381 ++++++++++-------- .../api/hotswap/nested-stacks-hotswap.test.ts | 251 ++++++------ packages/aws-cdk/test/diff.test.ts | 357 +++++++++++++--- ...with-two-nested-stacks-stack.template.json | 7 +- ...mbda-two-stacks-stack.nested.template.json | 4 +- packages/aws-cdk/test/util.ts | 4 +- 14 files changed, 757 insertions(+), 463 deletions(-) diff --git a/packages/@aws-cdk/cloudformation-diff/lib/diff-template.ts b/packages/@aws-cdk/cloudformation-diff/lib/diff-template.ts index 1902d757f486d..284bb3a8d5f46 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/diff-template.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/diff-template.ts @@ -54,7 +54,7 @@ export function fullDiff( normalize(newTemplate); const theDiff = diffTemplate(currentTemplate, newTemplate); if (changeSet) { - filterFalsePositivies(theDiff, changeSet); + filterFalsePositives(theDiff, changeSet); addImportInformation(theDiff, changeSet); } if (isImport) { @@ -64,7 +64,7 @@ export function fullDiff( return theDiff; } -function diffTemplate( +export function diffTemplate( currentTemplate: { [key: string]: any }, newTemplate: { [key: string]: any }, ): types.TemplateDiff { @@ -235,7 +235,7 @@ function addImportInformation(diff: types.TemplateDiff, changeSet?: CloudFormati } } -function filterFalsePositivies(diff: types.TemplateDiff, changeSet: CloudFormation.DescribeChangeSetOutput) { +function filterFalsePositives(diff: types.TemplateDiff, changeSet: CloudFormation.DescribeChangeSetOutput) { const replacements = findResourceReplacements(changeSet); diff.resources.forEachDifference((logicalId: string, change: types.ResourceDifference) => { if (change.resourceType.includes('AWS::Serverless')) { diff --git a/packages/@aws-cdk/cloudformation-diff/lib/format.ts b/packages/@aws-cdk/cloudformation-diff/lib/format.ts index 7935f774fd468..724af468c2f45 100644 --- a/packages/@aws-cdk/cloudformation-diff/lib/format.ts +++ b/packages/@aws-cdk/cloudformation-diff/lib/format.ts @@ -30,7 +30,7 @@ export interface FormatStream extends NodeJS.WritableStream { export function formatDifferences( stream: FormatStream, templateDiff: TemplateDiff, - logicalToPathMap: { [logicalId: string]: string } = { }, + logicalToPathMap: { [logicalId: string]: string } = {}, context: number = 3) { const formatter = new Formatter(stream, logicalToPathMap, templateDiff, context); @@ -59,7 +59,7 @@ export function formatDifferences( export function formatSecurityChanges( stream: NodeJS.WritableStream, templateDiff: TemplateDiff, - logicalToPathMap: {[logicalId: string]: string} = {}, + logicalToPathMap: { [logicalId: string]: string } = {}, context?: number) { const formatter = new Formatter(stream, logicalToPathMap, templateDiff, context); @@ -254,7 +254,7 @@ class Formatter { const oldStr = JSON.stringify(oldObject, null, 2); const newStr = JSON.stringify(newObject, null, 2); const diff = _diffStrings(oldStr, newStr, this.context); - for (let i = 0 ; i < diff.length ; i++) { + for (let i = 0; i < diff.length; i++) { this.print('%s %s %s', linePrefix, i === 0 ? '└─' : ' ', diff[i]); } } else { @@ -466,7 +466,7 @@ function _diffStrings(oldStr: string, newStr: string, context: number): string[] function _findIndent(lines: string[]): number { let indent = Number.MAX_SAFE_INTEGER; for (const line of lines) { - for (let i = 1 ; i < line.length ; i++) { + for (let i = 1; i < line.length; i++) { if (line.charAt(i) !== ' ') { indent = indent > i - 1 ? i - 1 : indent; break; diff --git a/packages/aws-cdk/lib/api/deployments.ts b/packages/aws-cdk/lib/api/deployments.ts index 925cdebd45e15..b7bea90c56c28 100644 --- a/packages/aws-cdk/lib/api/deployments.ts +++ b/packages/aws-cdk/lib/api/deployments.ts @@ -7,7 +7,7 @@ import { CredentialsOptions, SdkForEnvironment, SdkProvider } from './aws-auth/s import { deployStack, DeployStackResult, destroyStack, DeploymentMethod } from './deploy-stack'; import { EnvironmentResources, EnvironmentResourcesRegistry } from './environment-resources'; import { HotswapMode } from './hotswap/common'; -import { loadCurrentTemplateWithNestedStacks, loadCurrentTemplate, flattenNestedStackNames, TemplateWithNestedStackCount } from './nested-stack-helpers'; +import { loadCurrentTemplateWithNestedStacks, loadCurrentTemplate, RootTemplateWithNestedStacks } from './nested-stack-helpers'; import { CloudFormationStack, Template, ResourcesToImport, ResourceIdentifierSummaries } from './util/cloudformation'; import { StackActivityProgress } from './util/cloudformation/stack-activity-monitor'; import { replaceEnvPlaceholders } from './util/placeholders'; @@ -327,13 +327,9 @@ export class Deployments { public async readCurrentTemplateWithNestedStacks( rootStackArtifact: cxapi.CloudFormationStackArtifact, retrieveProcessedTemplate: boolean = false, - ): Promise { + ): Promise { const sdk = (await this.prepareSdkWithLookupOrDeployRole(rootStackArtifact)).stackSdk; - const templateWithNestedStacks = await loadCurrentTemplateWithNestedStacks(rootStackArtifact, sdk, retrieveProcessedTemplate); - return { - deployedTemplate: templateWithNestedStacks.deployedTemplate, - nestedStackCount: flattenNestedStackNames(templateWithNestedStacks.nestedStackNames).length, - }; + return loadCurrentTemplateWithNestedStacks(rootStackArtifact, sdk, retrieveProcessedTemplate); } public async readCurrentTemplate(stackArtifact: cxapi.CloudFormationStackArtifact): Promise