diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.ts index 36b7a58922832..76e825d39b1f9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.ts @@ -1,8 +1,10 @@ import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import * as cdk from 'aws-cdk-lib'; import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; const app = new cdk.App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new cdk.Stack(app, 'aws-cdk-dynamodb-global-replicas-provisioned'); const table = new dynamodb.Table(stack, 'Table', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.ts index 20ec8ffc316dd..0105430f05043 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.ts @@ -1,6 +1,7 @@ import { App, RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib'; import { Construct } from 'constructs'; import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; class TestStack extends Stack { @@ -30,6 +31,7 @@ class TestStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new TestStack(app, 'cdk-dynamodb-global-20191121', { env: { region: 'eu-west-1' } }); new IntegTest(app, 'cdk-dynamodb-global-20191121-test', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.alb-controller.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.alb-controller.ts index 4eee7a4a9e6d5..13ec421eb91b3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.alb-controller.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.alb-controller.ts @@ -7,6 +7,7 @@ import * as kplus from 'cdk8s-plus-27'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import { Pinger } from './pinger/pinger'; import * as eks from 'aws-cdk-lib/aws-eks'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class EksClusterAlbControllerStack extends Stack { @@ -69,6 +70,8 @@ class EksClusterAlbControllerStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); + const stack = new EksClusterAlbControllerStack(app, 'aws-cdk-eks-cluster-alb-controller'); new integ.IntegTest(app, 'aws-cdk-cluster-alb-controller-integ', { testCases: [stack], diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-bottlerocket-ng.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-bottlerocket-ng.ts index 01d769a655a03..5e4065b6d309f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-bottlerocket-ng.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-bottlerocket-ng.ts @@ -6,6 +6,7 @@ import * as integ from '@aws-cdk/integ-tests-alpha'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import * as eks from 'aws-cdk-lib/aws-eks'; import { NodegroupAmiType } from 'aws-cdk-lib/aws-eks'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class EksClusterStack extends Stack { @@ -41,6 +42,7 @@ class EksClusterStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new EksClusterStack(app, 'aws-cdk-eks-cluster-bottlerocket-ng-test'); new integ.IntegTest(app, 'aws-cdk-eks-cluster-bottlerocket-ng', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-handlers-vpc.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-handlers-vpc.ts index dda047d96887b..80d99c7b2bb53 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-handlers-vpc.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-handlers-vpc.ts @@ -3,7 +3,7 @@ import { App, Stack } from 'aws-cdk-lib'; import * as integ from '@aws-cdk/integ-tests-alpha'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import * as eks from 'aws-cdk-lib/aws-eks'; -import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api'; +import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class EksAllHandlersInVpcStack extends Stack { @@ -11,6 +11,7 @@ class EksAllHandlersInVpcStack extends Stack { super(scope, id); this.node.setContext(EC2_RESTRICT_DEFAULT_SECURITY_GROUP, false); + this.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); new eks.Cluster(this, 'EksAllHandlersInVpcStack', { ...getClusterVersionConfig(this), placeClusterHandlerInVpc: true, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-imported.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-imported.ts index f96604308e1b1..1d9db703bb114 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-imported.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-imported.ts @@ -11,6 +11,7 @@ import * as hello from './hello-k8s'; import * as integ from '@aws-cdk/integ-tests-alpha'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import * as eks from 'aws-cdk-lib/aws-eks'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; import * as cdk8s from 'cdk8s'; import * as kplus from 'cdk8s-plus-27'; import * as constructs from 'constructs'; @@ -207,6 +208,8 @@ class EksClusterStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); + const stack = new EksClusterStack(app, 'aws-cdk-eks-import-cluster-test'); new integ.IntegTest(app, 'aws-cdk-eks-import-cluster', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-ipv6.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-ipv6.ts index 405c3f7da53a1..e1919232bd46d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-ipv6.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-ipv6.ts @@ -12,6 +12,7 @@ import * as constructs from 'constructs'; import * as hello from './hello-k8s'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import * as eks from 'aws-cdk-lib/aws-eks'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class EksClusterStack extends Stack { @@ -358,6 +359,7 @@ const supportedRegions = [ ]; const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); // since the EKS optimized AMI is hard-coded here based on the region, // we need to actually pass in a specific region. diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-private-endpoint.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-private-endpoint.ts index b81444766badc..60b68801ca8fd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-private-endpoint.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster-private-endpoint.ts @@ -5,6 +5,7 @@ import { App, Stack } from 'aws-cdk-lib'; import * as integ from '@aws-cdk/integ-tests-alpha'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import * as eks from 'aws-cdk-lib/aws-eks'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class EksClusterStack extends Stack { constructor(scope: App, id: string) { @@ -43,6 +44,7 @@ class EksClusterStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new EksClusterStack(app, 'aws-cdk-eks-cluster-private-endpoint-test'); new integ.IntegTest(app, 'aws-cdk-eks-cluster-private-endpoint', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.ts index 68f576ab661b7..099d2aa8f4b24 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-cluster.ts @@ -12,6 +12,7 @@ import * as constructs from 'constructs'; import * as hello from './hello-k8s'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import * as eks from 'aws-cdk-lib/aws-eks'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class EksClusterStack extends Stack { @@ -334,6 +335,7 @@ const supportedRegions = [ ]; const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); // since the EKS optimized AMI is hard-coded here based on the region, // we need to actually pass in a specific region. diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-helm-asset.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-helm-asset.ts index 38ec4c01db800..c53a7ea002e79 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-helm-asset.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-helm-asset.ts @@ -7,6 +7,7 @@ import { App, Stack } from 'aws-cdk-lib'; import * as integ from '@aws-cdk/integ-tests-alpha'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import * as eks from 'aws-cdk-lib/aws-eks'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class EksClusterStack extends Stack { private cluster: eks.Cluster; @@ -100,6 +101,7 @@ class EksClusterStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new EksClusterStack(app, 'aws-cdk-eks-helm-test'); new integ.IntegTest(app, 'aws-cdk-eks-helm', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-inference-nodegroup.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-inference-nodegroup.ts index 77e0631498528..bf4ce97f6e668 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-inference-nodegroup.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-inference-nodegroup.ts @@ -4,6 +4,7 @@ import { App, Stack } from 'aws-cdk-lib'; import * as integ from '@aws-cdk/integ-tests-alpha'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import * as eks from 'aws-cdk-lib/aws-eks'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class EksClusterInferenceStack extends Stack { @@ -32,6 +33,7 @@ class EksClusterInferenceStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new EksClusterInferenceStack(app, 'aws-cdk-eks-cluster-inference-nodegroup'); new integ.IntegTest(app, 'aws-cdk-eks-cluster-interence-nodegroup-integ', { testCases: [stack], diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-inference.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-inference.ts index 2815bda0ff9fe..1176b4baabb07 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-inference.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-inference.ts @@ -4,6 +4,7 @@ import { App, Stack } from 'aws-cdk-lib'; import * as integ from '@aws-cdk/integ-tests-alpha'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import * as eks from 'aws-cdk-lib/aws-eks'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class EksClusterInferenceStack extends Stack { @@ -34,6 +35,7 @@ class EksClusterInferenceStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new EksClusterInferenceStack(app, 'aws-cdk-eks-cluster-inference'); new integ.IntegTest(app, 'aws-cdk-eks-cluster-interence-integ', { testCases: [stack], diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-service-account-sdk-call.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-service-account-sdk-call.ts index 071152c088fa7..78388e4b377f5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-service-account-sdk-call.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-service-account-sdk-call.ts @@ -8,9 +8,11 @@ import * as cdk8s from 'cdk8s'; import * as kplus from 'cdk8s-plus-27'; import { BucketPinger } from './bucket-pinger/bucket-pinger'; import * as eks from 'aws-cdk-lib/aws-eks'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new Stack(app, 'aws-eks-service-account-sdk-calls-test'); // this bucket gets created by a kubernetes pod. diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-windows-ng.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-windows-ng.ts index e9ced9db0f43d..5d272d9a1aa77 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-windows-ng.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.eks-windows-ng.ts @@ -6,7 +6,7 @@ import * as integ from '@aws-cdk/integ-tests-alpha'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import * as eks from 'aws-cdk-lib/aws-eks'; import { NodegroupAmiType, TaintEffect } from 'aws-cdk-lib/aws-eks'; -import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api'; +import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class EksClusterStack extends Stack { @@ -50,6 +50,7 @@ class EksClusterStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new EksClusterStack(app, 'aws-cdk-eks-cluster-windows-ng-test'); new integ.IntegTest(app, 'aws-cdk-eks-cluster-windows-ng', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.fargate-cluster.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.fargate-cluster.ts index 9293ae7b74131..63bb3a9c38f66 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.fargate-cluster.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-eks/test/integ.fargate-cluster.ts @@ -3,7 +3,7 @@ import { App, Stack } from 'aws-cdk-lib'; import * as integ from '@aws-cdk/integ-tests-alpha'; import { getClusterVersionConfig } from './integ-tests-kubernetes-version'; import * as eks from 'aws-cdk-lib/aws-eks'; -import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api'; +import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class EksFargateClusterStack extends Stack { @@ -19,6 +19,7 @@ class EksFargateClusterStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new EksFargateClusterStack(app, 'aws-cdk-eks-fargate-cluster-test'); new integ.IntegTest(app, 'aws-cdk-eks-fargate-cluster', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.ts index ad7bbcc529eea..eab2c6d1e8148 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.ts @@ -7,6 +7,7 @@ import * as cr from 'aws-cdk-lib/custom-resources'; import { Construct } from 'constructs'; import * as rds from 'aws-cdk-lib/aws-rds'; import { ClusterInstance } from 'aws-cdk-lib/aws-rds'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import { STANDARD_NODEJS_RUNTIME } from '../../config'; import { LogLevel } from 'aws-cdk-lib/aws-stepfunctions'; @@ -128,6 +129,8 @@ class Snapshoter extends Construct { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); + const stack = new TestStack(app, 'cdk-integ-cluster-snapshot'); new IntegTest(app, 'ClusterSnapshotInteg', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/eks/integ.call.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/eks/integ.call.ts index 92294776412dd..47e4c06d60202 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/eks/integ.call.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/eks/integ.call.ts @@ -4,7 +4,7 @@ import * as sfn from 'aws-cdk-lib/aws-stepfunctions'; import * as cdk from 'aws-cdk-lib'; import * as integ from '@aws-cdk/integ-tests-alpha'; import { EksCall, HttpMethods } from 'aws-cdk-lib/aws-stepfunctions-tasks'; -import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api'; +import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; /* * Create a state machine with a task state to use the Kubernetes API to read Kubernetes resource objects @@ -20,6 +20,7 @@ import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api'; const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-stepfunctions-tasks-eks-call-integ-test'); +stack.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); stack.node.setContext(EC2_RESTRICT_DEFAULT_SECURITY_GROUP, false); const cluster = new eks.Cluster(stack, 'EksCluster', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.ts index a2bd9c4d67566..e14ad5d804fbd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.job-submission-workflow.ts @@ -8,7 +8,7 @@ import { Classification, VirtualClusterInput, EksClusterInput, EmrContainersDeleteVirtualCluster, EmrContainersCreateVirtualCluster, EmrContainersStartJobRun, ReleaseLabel, } from 'aws-cdk-lib/aws-stepfunctions-tasks'; -import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api'; +import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; /** * Stack verification steps: @@ -24,6 +24,7 @@ import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api'; const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-stepfunctions-tasks-emr-containers-all-services-test'); stack.node.setContext(EC2_RESTRICT_DEFAULT_SECURITY_GROUP, false); +stack.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const eksCluster = new eks.Cluster(stack, 'integration-test-eks-cluster', { version: eks.KubernetesVersion.V1_22, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.ts index c476587b0f15a..65502023e958f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.ts @@ -7,7 +7,7 @@ import * as cdk from 'aws-cdk-lib'; import { Aws } from 'aws-cdk-lib'; import * as integ from '@aws-cdk/integ-tests-alpha'; import { EmrContainersStartJobRun, ReleaseLabel, VirtualClusterInput } from 'aws-cdk-lib/aws-stepfunctions-tasks'; -import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api'; +import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP, WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; /** * Stack verification steps: @@ -20,6 +20,7 @@ import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api'; const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-stepfunctions-tasks-emr-containers-start-job-run'); stack.node.setContext(EC2_RESTRICT_DEFAULT_SECURITY_GROUP, false); +stack.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const eksCluster = new eks.Cluster(stack, 'integration-test-eks-cluster', { version: eks.KubernetesVersion.V1_22, diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/IntegProviderWithWaiterStateMachineDefaultTestDeployAssert2D0F0427.assets.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/IntegProviderWithWaiterStateMachineDefaultTestDeployAssert2D0F0427.assets.json index bcfd8b9c68f74..bf27a4bd0715e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/IntegProviderWithWaiterStateMachineDefaultTestDeployAssert2D0F0427.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/IntegProviderWithWaiterStateMachineDefaultTestDeployAssert2D0F0427.assets.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "36.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/cdk.out index c5cb2e5de6344..1f0068d32659a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ-provider-with-waiter-state-machine.assets.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ-provider-with-waiter-state-machine.assets.json index 83bf1af523134..b616fa67738ed 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ-provider-with-waiter-state-machine.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ-provider-with-waiter-state-machine.assets.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "36.0.0", "files": { "4554b47be6f57b68c6c7a7391dcc73894866d2377fe174883351e7639097f292": { "source": { @@ -27,7 +27,7 @@ } } }, - "9f2dc8213110bb8380686e1a0cb206e2dccd079bad9ead40b7c56cd9fbf3161e": { + "f846c7dce86a836c27a5ff81d868b42f46e94502cd6f0859944c4d9e48751e33": { "source": { "path": "integ-provider-with-waiter-state-machine.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9f2dc8213110bb8380686e1a0cb206e2dccd079bad9ead40b7c56cd9fbf3161e.json", + "objectKey": "f846c7dce86a836c27a5ff81d868b42f46e94502cd6f0859944c4d9e48751e33.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/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ-provider-with-waiter-state-machine.template.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ-provider-with-waiter-state-machine.template.json index b5b9d3ea3b988..f8920f09d9ca3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ-provider-with-waiter-state-machine.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ-provider-with-waiter-state-machine.template.json @@ -1328,6 +1328,824 @@ "MyProviderwaiterstatemachineRoleDefaultPolicy5EE07C3D", "MyProviderwaiterstatemachineRole6453DD81" ] + }, + "OnEventWithDefaultLogServiceRole0B11B3D5": { + "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" + ] + ] + } + ] + } + }, + "OnEventWithDefaultLog5CE2EFB8": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "foo" + }, + "Handler": "index.onEvent", + "Role": { + "Fn::GetAtt": [ + "OnEventWithDefaultLogServiceRole0B11B3D5", + "Arn" + ] + }, + "Runtime": "nodejs18.x" + }, + "DependsOn": [ + "OnEventWithDefaultLogServiceRole0B11B3D5" + ] + }, + "IsCompleteWithDefaultLogServiceRole5D4A0813": { + "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" + ] + ] + } + ] + } + }, + "IsCompleteWithDefaultLog5A9119E0": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "foo" + }, + "Handler": "index.isComplete", + "Role": { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLogServiceRole5D4A0813", + "Arn" + ] + }, + "Runtime": "nodejs18.x" + }, + "DependsOn": [ + "IsCompleteWithDefaultLogServiceRole5D4A0813" + ] + }, + "MyProviderWithDefaultLogframeworkonEventServiceRole2AE4154C": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + } + ] + }, + "DependsOn": [ + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + ] + }, + "MyProviderWithDefaultLogframeworkonEventServiceRoleDefaultPolicyB8788AD8": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + }, + { + "Action": "states:StartExecution", + "Effect": "Allow", + "Resource": { + "Ref": "MyProviderWithDefaultLogwaiterstatemachineFA25B8A4" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyProviderWithDefaultLogframeworkonEventServiceRoleDefaultPolicyB8788AD8", + "Roles": [ + { + "Ref": "MyProviderWithDefaultLogframeworkonEventServiceRole2AE4154C" + } + ] + }, + "DependsOn": [ + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + ] + }, + "MyProviderWithDefaultLogframeworkonEventACFEA06F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "8e06cc8057c9c50dcd656ff09f233c37bb22f550f4bef763c9f9916df0e62484.zip" + }, + "Description": "AWS CDK resource provider framework - onEvent (integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + "USER_IS_COMPLETE_FUNCTION_ARN": { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + "WAITER_STATE_MACHINE_ARN": { + "Ref": "MyProviderWithDefaultLogwaiterstatemachineFA25B8A4" + } + } + }, + "Handler": "framework.onEvent", + "Role": { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkonEventServiceRole2AE4154C", + "Arn" + ] + }, + "Runtime": "nodejs18.x", + "Timeout": 900, + "VpcConfig": { + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "SecurityGroupDD263621", + "GroupId" + ] + } + ], + "SubnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + } + }, + "DependsOn": [ + "MyProviderWithDefaultLogframeworkonEventServiceRoleDefaultPolicyB8788AD8", + "MyProviderWithDefaultLogframeworkonEventServiceRole2AE4154C", + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + ] + }, + "MyProviderWithDefaultLogframeworkisCompleteServiceRole690A3970": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + } + ] + }, + "DependsOn": [ + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + ] + }, + "MyProviderWithDefaultLogframeworkisCompleteServiceRoleDefaultPolicy4BF8E112": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyProviderWithDefaultLogframeworkisCompleteServiceRoleDefaultPolicy4BF8E112", + "Roles": [ + { + "Ref": "MyProviderWithDefaultLogframeworkisCompleteServiceRole690A3970" + } + ] + }, + "DependsOn": [ + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + ] + }, + "MyProviderWithDefaultLogframeworkisCompleteC86EC850": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "8e06cc8057c9c50dcd656ff09f233c37bb22f550f4bef763c9f9916df0e62484.zip" + }, + "Description": "AWS CDK resource provider framework - isComplete (integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + "USER_IS_COMPLETE_FUNCTION_ARN": { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + } + } + }, + "Handler": "framework.isComplete", + "Role": { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkisCompleteServiceRole690A3970", + "Arn" + ] + }, + "Runtime": "nodejs18.x", + "Timeout": 900, + "VpcConfig": { + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "SecurityGroupDD263621", + "GroupId" + ] + } + ], + "SubnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + } + }, + "DependsOn": [ + "MyProviderWithDefaultLogframeworkisCompleteServiceRoleDefaultPolicy4BF8E112", + "MyProviderWithDefaultLogframeworkisCompleteServiceRole690A3970", + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + ] + }, + "MyProviderWithDefaultLogframeworkonTimeoutServiceRole121D30AD": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + } + ] + }, + "DependsOn": [ + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + ] + }, + "MyProviderWithDefaultLogframeworkonTimeoutServiceRoleDefaultPolicyBA7DB06B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyProviderWithDefaultLogframeworkonTimeoutServiceRoleDefaultPolicyBA7DB06B", + "Roles": [ + { + "Ref": "MyProviderWithDefaultLogframeworkonTimeoutServiceRole121D30AD" + } + ] + }, + "DependsOn": [ + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + ] + }, + "MyProviderWithDefaultLogframeworkonTimeoutAF0F8F0D": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "8e06cc8057c9c50dcd656ff09f233c37bb22f550f4bef763c9f9916df0e62484.zip" + }, + "Description": "AWS CDK resource provider framework - onTimeout (integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog)", + "Environment": { + "Variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + "USER_IS_COMPLETE_FUNCTION_ARN": { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + } + } + }, + "Handler": "framework.onTimeout", + "Role": { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkonTimeoutServiceRole121D30AD", + "Arn" + ] + }, + "Runtime": "nodejs18.x", + "Timeout": 900, + "VpcConfig": { + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "SecurityGroupDD263621", + "GroupId" + ] + } + ], + "SubnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ] + } + }, + "DependsOn": [ + "MyProviderWithDefaultLogframeworkonTimeoutServiceRoleDefaultPolicyBA7DB06B", + "MyProviderWithDefaultLogframeworkonTimeoutServiceRole121D30AD", + "VpcPrivateSubnet1DefaultRouteBE02A9ED", + "VpcPrivateSubnet1RouteTableAssociation70C59FA6", + "VpcPrivateSubnet2DefaultRoute060D2087", + "VpcPrivateSubnet2RouteTableAssociationA89CAD56" + ] + }, + "MyProviderWithDefaultLogwaiterstatemachineRole5E8C52CD": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "MyProviderWithDefaultLogwaiterstatemachineRoleDefaultPolicyE520C138": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkisCompleteC86EC850", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkonTimeoutAF0F8F0D", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkisCompleteC86EC850", + "Arn" + ] + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkonTimeoutAF0F8F0D", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + }, + { + "Action": [ + "logs:CreateLogDelivery", + "logs:CreateLogStream", + "logs:DeleteLogDelivery", + "logs:DescribeLogGroups", + "logs:DescribeResourcePolicies", + "logs:GetLogDelivery", + "logs:ListLogDeliveries", + "logs:PutLogEvents", + "logs:PutResourcePolicy", + "logs:UpdateLogDelivery" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyProviderWithDefaultLogwaiterstatemachineRoleDefaultPolicyE520C138", + "Roles": [ + { + "Ref": "MyProviderWithDefaultLogwaiterstatemachineRole5E8C52CD" + } + ] + } + }, + "MyProviderWithDefaultLogwaiterstatemachineLogGroup5907E67B": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "LogGroupName": { + "Fn::Join": [ + "", + [ + "/aws/vendedlogs/states/waiter-state-machine-", + { + "Ref": "MyProviderWithDefaultLogframeworkisCompleteC86EC850" + }, + "-c8755c6a4f7af107037ba386c1af047796ca4678a8" + ] + ] + }, + "RetentionInDays": 731 + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "MyProviderWithDefaultLogwaiterstatemachineFA25B8A4": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":5,\"MaxAttempts\":360,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkisCompleteC86EC850", + "Arn" + ] + }, + "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkonTimeoutAF0F8F0D", + "Arn" + ] + }, + "\"}}}" + ] + ] + }, + "LoggingConfiguration": { + "Destinations": [ + { + "CloudWatchLogsLogGroup": { + "LogGroupArn": { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogwaiterstatemachineLogGroup5907E67B", + "Arn" + ] + } + } + } + ], + "IncludeExecutionData": true, + "Level": "ALL" + }, + "RoleArn": { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogwaiterstatemachineRole5E8C52CD", + "Arn" + ] + } + }, + "DependsOn": [ + "MyProviderWithDefaultLogwaiterstatemachineRoleDefaultPolicyE520C138", + "MyProviderWithDefaultLogwaiterstatemachineRole5E8C52CD" + ] } }, "Parameters": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ.json index 798e6a7ade139..31e07c3ee5fc0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "36.0.0", "testCases": { "IntegProviderWithWaiterStateMachine/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/manifest.json index 9f987072b3493..ccb36ad429810 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "36.0.0", "artifacts": { "integ-provider-with-waiter-state-machine.assets": { "type": "cdk:asset-manifest", @@ -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}/9f2dc8213110bb8380686e1a0cb206e2dccd079bad9ead40b7c56cd9fbf3161e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f846c7dce86a836c27a5ff81d868b42f46e94502cd6f0859944c4d9e48751e33.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -298,6 +298,111 @@ "data": "MyProviderwaiterstatemachineC1FBB9F9" } ], + "/integ-provider-with-waiter-state-machine/OnEventWithDefaultLog/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OnEventWithDefaultLogServiceRole0B11B3D5" + } + ], + "/integ-provider-with-waiter-state-machine/OnEventWithDefaultLog/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OnEventWithDefaultLog5CE2EFB8" + } + ], + "/integ-provider-with-waiter-state-machine/IsCompleteWithDefaultLog/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "IsCompleteWithDefaultLogServiceRole5D4A0813" + } + ], + "/integ-provider-with-waiter-state-machine/IsCompleteWithDefaultLog/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "IsCompleteWithDefaultLog5A9119E0" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogframeworkonEventServiceRole2AE4154C" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogframeworkonEventServiceRoleDefaultPolicyB8788AD8" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogframeworkonEventACFEA06F" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogframeworkisCompleteServiceRole690A3970" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogframeworkisCompleteServiceRoleDefaultPolicy4BF8E112" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogframeworkisCompleteC86EC850" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogframeworkonTimeoutServiceRole121D30AD" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/ServiceRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogframeworkonTimeoutServiceRoleDefaultPolicyBA7DB06B" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogframeworkonTimeoutAF0F8F0D" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogwaiterstatemachineRole5E8C52CD" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine/Role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogwaiterstatemachineRoleDefaultPolicyE520C138" + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine/LogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogwaiterstatemachineLogGroup5907E67B", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" + ] + } + ], + "/integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyProviderWithDefaultLogwaiterstatemachineFA25B8A4" + } + ], "/integ-provider-with-waiter-state-machine/BootstrapVersion": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/tree.json index 65ec858b0d26a..da6e395044085 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", "path": "integ-provider-with-waiter-state-machine/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", "path": "integ-provider-with-waiter-state-machine/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", "path": "integ-provider-with-waiter-state-machine/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Acl": { "id": "Acl", "path": "integ-provider-with-waiter-state-machine/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "VPCGW": { @@ -641,8 +641,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -653,20 +653,20 @@ "id": "Default", "path": "integ-provider-with-waiter-state-machine/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -677,30 +677,30 @@ "id": "Staging", "path": "integ-provider-with-waiter-state-machine/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Role": { "id": "Role", "path": "integ-provider-with-waiter-state-machine/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Handler": { "id": "Handler", "path": "integ-provider-with-waiter-state-machine/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { - "fqn": "aws-cdk-lib.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.CustomResourceProvider", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "SecurityGroup": { @@ -727,14 +727,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "LogGroup": { @@ -751,14 +751,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "OnEvent": { @@ -773,8 +773,8 @@ "id": "ImportServiceRole", "path": "integ-provider-with-waiter-state-machine/OnEvent/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -812,14 +812,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -842,14 +842,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "IsComplete": { @@ -864,8 +864,8 @@ "id": "ImportServiceRole", "path": "integ-provider-with-waiter-state-machine/IsComplete/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -903,14 +903,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -933,14 +933,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "MyProvider": { @@ -959,8 +959,8 @@ "id": "ImportServiceRole", "path": "integ-provider-with-waiter-state-machine/MyProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -1010,8 +1010,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultPolicy": { @@ -1091,20 +1091,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Code": { @@ -1115,22 +1115,22 @@ "id": "Stage", "path": "integ-provider-with-waiter-state-machine/MyProvider/framework-onEvent/Code/Stage", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "AssetBucket": { "id": "AssetBucket", "path": "integ-provider-with-waiter-state-machine/MyProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -1195,14 +1195,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "framework-isComplete": { @@ -1217,8 +1217,8 @@ "id": "ImportServiceRole", "path": "integ-provider-with-waiter-state-machine/MyProvider/framework-isComplete/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -1268,8 +1268,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultPolicy": { @@ -1342,20 +1342,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Code": { @@ -1366,22 +1366,22 @@ "id": "Stage", "path": "integ-provider-with-waiter-state-machine/MyProvider/framework-isComplete/Code/Stage", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "AssetBucket": { "id": "AssetBucket", "path": "integ-provider-with-waiter-state-machine/MyProvider/framework-isComplete/Code/AssetBucket", "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -1443,14 +1443,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "framework-onTimeout": { @@ -1465,8 +1465,8 @@ "id": "ImportServiceRole", "path": "integ-provider-with-waiter-state-machine/MyProvider/framework-onTimeout/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -1516,8 +1516,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultPolicy": { @@ -1590,20 +1590,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Code": { @@ -1614,22 +1614,22 @@ "id": "Stage", "path": "integ-provider-with-waiter-state-machine/MyProvider/framework-onTimeout/Code/Stage", "constructInfo": { - "fqn": "aws-cdk-lib.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "AssetBucket": { "id": "AssetBucket", "path": "integ-provider-with-waiter-state-machine/MyProvider/framework-onTimeout/Code/AssetBucket", "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -1691,14 +1691,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "waiter-state-machine": { @@ -1713,8 +1713,8 @@ "id": "ImportRole", "path": "integ-provider-with-waiter-state-machine/MyProvider/waiter-state-machine/Role/ImportRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -1738,8 +1738,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "DefaultPolicy": { @@ -1828,20 +1828,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -1897,84 +1897,1272 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.custom_resources.WaiterStateMachine", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "0.0.0" - } - }, - "BootstrapVersion": { - "id": "BootstrapVersion", - "path": "integ-provider-with-waiter-state-machine/BootstrapVersion", - "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, - "CheckBootstrapVersion": { - "id": "CheckBootstrapVersion", - "path": "integ-provider-with-waiter-state-machine/CheckBootstrapVersion", - "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" - } - }, - "IntegProviderWithWaiterStateMachine": { - "id": "IntegProviderWithWaiterStateMachine", - "path": "IntegProviderWithWaiterStateMachine", - "children": { - "DefaultTest": { - "id": "DefaultTest", - "path": "IntegProviderWithWaiterStateMachine/DefaultTest", + "OnEventWithDefaultLog": { + "id": "OnEventWithDefaultLog", + "path": "integ-provider-with-waiter-state-machine/OnEventWithDefaultLog", "children": { - "Default": { - "id": "Default", - "path": "IntegProviderWithWaiterStateMachine/DefaultTest/Default", + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-provider-with-waiter-state-machine/OnEventWithDefaultLog/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-provider-with-waiter-state-machine/OnEventWithDefaultLog/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/OnEventWithDefaultLog/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": "constructs.Construct", + "version": "10.3.0" + } + } + }, "constructInfo": { "fqn": "constructs.Construct", "version": "10.3.0" } }, - "DeployAssert": { - "id": "DeployAssert", - "path": "IntegProviderWithWaiterStateMachine/DefaultTest/DeployAssert", + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/OnEventWithDefaultLog/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Function", + "aws:cdk:cloudformation:props": { + "code": { + "zipFile": "foo" + }, + "handler": "index.onEvent", + "role": { + "Fn::GetAtt": [ + "OnEventWithDefaultLogServiceRole0B11B3D5", + "Arn" + ] + }, + "runtime": "nodejs18.x" + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "IsCompleteWithDefaultLog": { + "id": "IsCompleteWithDefaultLog", + "path": "integ-provider-with-waiter-state-machine/IsCompleteWithDefaultLog", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-provider-with-waiter-state-machine/IsCompleteWithDefaultLog/ServiceRole", "children": { - "BootstrapVersion": { - "id": "BootstrapVersion", - "path": "IntegProviderWithWaiterStateMachine/DefaultTest/DeployAssert/BootstrapVersion", + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-provider-with-waiter-state-machine/IsCompleteWithDefaultLog/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, - "CheckBootstrapVersion": { - "id": "CheckBootstrapVersion", - "path": "IntegProviderWithWaiterStateMachine/DefaultTest/DeployAssert/CheckBootstrapVersion", + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/IsCompleteWithDefaultLog/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.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/IsCompleteWithDefaultLog/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Function", + "aws:cdk:cloudformation:props": { + "code": { + "zipFile": "foo" + }, + "handler": "index.isComplete", + "role": { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLogServiceRole5D4A0813", + "Arn" + ] + }, + "runtime": "nodejs18.x" + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "MyProviderWithDefaultLog": { + "id": "MyProviderWithDefaultLog", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog", + "children": { + "framework-onEvent": { + "id": "framework-onEvent", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/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" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + }, + { + "Action": "states:StartExecution", + "Effect": "Allow", + "Resource": { + "Ref": "MyProviderWithDefaultLogwaiterstatemachineFA25B8A4" + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyProviderWithDefaultLogframeworkonEventServiceRoleDefaultPolicyB8788AD8", + "roles": [ + { + "Ref": "MyProviderWithDefaultLogframeworkonEventServiceRole2AE4154C" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Code": { + "id": "Code", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/Code/Stage", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/Code/AssetBucket", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onEvent/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": "8e06cc8057c9c50dcd656ff09f233c37bb22f550f4bef763c9f9916df0e62484.zip" + }, + "description": "AWS CDK resource provider framework - onEvent (integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog)", + "environment": { + "variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + "USER_IS_COMPLETE_FUNCTION_ARN": { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + "WAITER_STATE_MACHINE_ARN": { + "Ref": "MyProviderWithDefaultLogwaiterstatemachineFA25B8A4" + } + } + }, + "handler": "framework.onEvent", + "role": { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkonEventServiceRole2AE4154C", + "Arn" + ] + }, + "runtime": "nodejs18.x", + "timeout": 900, + "vpcConfig": { + "subnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "securityGroupIds": [ + { + "Fn::GetAtt": [ + "SecurityGroupDD263621", + "GroupId" + ] + } + ] + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "framework-isComplete": { + "id": "framework-isComplete", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/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" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyProviderWithDefaultLogframeworkisCompleteServiceRoleDefaultPolicy4BF8E112", + "roles": [ + { + "Ref": "MyProviderWithDefaultLogframeworkisCompleteServiceRole690A3970" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Code": { + "id": "Code", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/Code/Stage", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/Code/AssetBucket", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-isComplete/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": "8e06cc8057c9c50dcd656ff09f233c37bb22f550f4bef763c9f9916df0e62484.zip" + }, + "description": "AWS CDK resource provider framework - isComplete (integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog)", + "environment": { + "variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + "USER_IS_COMPLETE_FUNCTION_ARN": { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + } + } + }, + "handler": "framework.isComplete", + "role": { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkisCompleteServiceRole690A3970", + "Arn" + ] + }, + "runtime": "nodejs18.x", + "timeout": 900, + "vpcConfig": { + "subnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "securityGroupIds": [ + { + "Fn::GetAtt": [ + "SecurityGroupDD263621", + "GroupId" + ] + } + ] + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "framework-onTimeout": { + "id": "framework-onTimeout", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/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" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyProviderWithDefaultLogframeworkonTimeoutServiceRoleDefaultPolicyBA7DB06B", + "roles": [ + { + "Ref": "MyProviderWithDefaultLogframeworkonTimeoutServiceRole121D30AD" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Code": { + "id": "Code", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/Code", + "children": { + "Stage": { + "id": "Stage", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/Code/Stage", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "AssetBucket": { + "id": "AssetBucket", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/Code/AssetBucket", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/framework-onTimeout/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": "8e06cc8057c9c50dcd656ff09f233c37bb22f550f4bef763c9f9916df0e62484.zip" + }, + "description": "AWS CDK resource provider framework - onTimeout (integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog)", + "environment": { + "variables": { + "USER_ON_EVENT_FUNCTION_ARN": { + "Fn::GetAtt": [ + "OnEventWithDefaultLog5CE2EFB8", + "Arn" + ] + }, + "USER_IS_COMPLETE_FUNCTION_ARN": { + "Fn::GetAtt": [ + "IsCompleteWithDefaultLog5A9119E0", + "Arn" + ] + } + } + }, + "handler": "framework.onTimeout", + "role": { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkonTimeoutServiceRole121D30AD", + "Arn" + ] + }, + "runtime": "nodejs18.x", + "timeout": 900, + "vpcConfig": { + "subnetIds": [ + { + "Ref": "VpcPrivateSubnet1Subnet536B997A" + }, + { + "Ref": "VpcPrivateSubnet2Subnet3788AAA1" + } + ], + "securityGroupIds": [ + { + "Fn::GetAtt": [ + "SecurityGroupDD263621", + "GroupId" + ] + } + ] + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "waiter-state-machine": { + "id": "waiter-state-machine", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine", + "children": { + "Role": { + "id": "Role", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine/Role/ImportRole", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-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": "constructs.Construct", + "version": "10.3.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine/Role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine/Role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkisCompleteC86EC850", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkonTimeoutAF0F8F0D", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkisCompleteC86EC850", + "Arn" + ] + }, + ":*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkonTimeoutAF0F8F0D", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + }, + { + "Action": [ + "logs:CreateLogDelivery", + "logs:CreateLogStream", + "logs:DeleteLogDelivery", + "logs:DescribeLogGroups", + "logs:DescribeResourcePolicies", + "logs:GetLogDelivery", + "logs:ListLogDeliveries", + "logs:PutLogEvents", + "logs:PutResourcePolicy", + "logs:UpdateLogDelivery" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyProviderWithDefaultLogwaiterstatemachineRoleDefaultPolicyE520C138", + "roles": [ + { + "Ref": "MyProviderWithDefaultLogwaiterstatemachineRole5E8C52CD" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "LogGroup": { + "id": "LogGroup", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine/LogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine/LogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": { + "logGroupName": { + "Fn::Join": [ + "", + [ + "/aws/vendedlogs/states/waiter-state-machine-", + { + "Ref": "MyProviderWithDefaultLogframeworkisCompleteC86EC850" + }, + "-c8755c6a4f7af107037ba386c1af047796ca4678a8" + ] + ] + }, + "retentionInDays": 731 + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-provider-with-waiter-state-machine/MyProviderWithDefaultLog/waiter-state-machine/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::StepFunctions::StateMachine", + "aws:cdk:cloudformation:props": { + "definitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":5,\"MaxAttempts\":360,\"BackoffRate\":1}],\"Catch\":[{\"ErrorEquals\":[\"States.ALL\"],\"Next\":\"framework-onTimeout-task\"}],\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkisCompleteC86EC850", + "Arn" + ] + }, + "\"},\"framework-onTimeout-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogframeworkonTimeoutAF0F8F0D", + "Arn" + ] + }, + "\"}}}" + ] + ] + }, + "loggingConfiguration": { + "destinations": [ + { + "cloudWatchLogsLogGroup": { + "logGroupArn": { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogwaiterstatemachineLogGroup5907E67B", + "Arn" + ] + } + } + } + ], + "includeExecutionData": true, + "level": "ALL" + }, + "roleArn": { + "Fn::GetAtt": [ + "MyProviderWithDefaultLogwaiterstatemachineRole5E8C52CD", + "Arn" + ] + } + } + }, + "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": "integ-provider-with-waiter-state-machine/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-provider-with-waiter-state-machine/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "IntegProviderWithWaiterStateMachine": { + "id": "IntegProviderWithWaiterStateMachine", + "path": "IntegProviderWithWaiterStateMachine", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "IntegProviderWithWaiterStateMachine/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "IntegProviderWithWaiterStateMachine/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "IntegProviderWithWaiterStateMachine/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "IntegProviderWithWaiterStateMachine/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "IntegProviderWithWaiterStateMachine/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, @@ -1999,8 +3187,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.ts b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.ts index 368cc66c4ca11..e5381fff99fc6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider-with-waiter-state-machine.ts @@ -7,6 +7,7 @@ import { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda'; import { Provider } from 'aws-cdk-lib/custom-resources'; import { LogLevel } from 'aws-cdk-lib/aws-stepfunctions'; import { LogGroup } from 'aws-cdk-lib/aws-logs'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; class TestStack extends Stack { constructor(scope: Construct, id: string) { @@ -37,10 +38,30 @@ class TestStack extends Stack { level: LogLevel.ALL, }, }); + new Provider(this, 'MyProviderWithDefaultLog', { + onEventHandler: new Function(this, 'OnEventWithDefaultLog', { + code: Code.fromInline('foo'), + handler: 'index.onEvent', + runtime: Runtime.NODEJS_LATEST, + }), + isCompleteHandler: new Function(this, 'IsCompleteWithDefaultLog', { + code: Code.fromInline('foo'), + handler: 'index.isComplete', + runtime: Runtime.NODEJS_LATEST, + }), + vpc: vpc, + vpcSubnets: { subnetType: SubnetType.PRIVATE_WITH_EGRESS }, + securityGroups: [securityGroup], + waiterStateMachineLogOptions: { + includeExecutionData: true, + level: LogLevel.ALL, + }, + }); } } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, true); const stack = new TestStack(app, 'integ-provider-with-waiter-state-machine'); new integ.IntegTest(app, 'IntegProviderWithWaiterStateMachine', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider.ts b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider.ts index 13cac79236ee3..0bf64073f460c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/provider-framework/integ.provider.ts @@ -1,6 +1,7 @@ /// !cdk-integ * import * as s3 from 'aws-cdk-lib/aws-s3'; import { App, CfnOutput, Stack } from 'aws-cdk-lib'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; import * as integ from '@aws-cdk/integ-tests-alpha'; import { Construct, Node } from 'constructs'; import { S3Assert } from './integration-test-fixtures/s3-assert'; @@ -46,6 +47,7 @@ class TestStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new TestStack(app, 'integ-provider-framework'); new integ.IntegTest(app, 'IntegProviderFrameworkTest', { diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.ts b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.ts index 73d2923233e4b..db8c3feb0860c 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.ts +++ b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.ts @@ -3,6 +3,7 @@ import { App, Stack, StackProps } from 'aws-cdk-lib'; import { Construct } from 'constructs'; import * as amplify from '../lib'; import { Asset } from 'aws-cdk-lib/aws-s3-assets'; +import { WAITER_STATE_MACHINE_LOG_GROUP_NAME } from 'aws-cdk-lib/cx-api'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; class TestStack extends Stack { @@ -19,6 +20,7 @@ class TestStack extends Stack { } const app = new App(); +app.node.setContext(WAITER_STATE_MACHINE_LOG_GROUP_NAME, false); const stack = new TestStack(app, 'cdk-amplify-app-asset-deployment'); // Deploying the stack is sufficient to test the custom resources diff --git a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md index 95817e6176cb4..6b4dcd418ab8b 100644 --- a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md +++ b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md @@ -63,6 +63,7 @@ Flags come in three types: | [@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters](#aws-cdkaws-rdsauroraclusterchangescopeofinstanceparametergroupwitheachparameters) | When enabled, a scope of InstanceParameterGroup for AuroraClusterInstance with each parameters will change. | 2.97.0 | (fix) | | [@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials](#aws-cdkaws-rdspreventrenderingdeprecatedcredentials) | When enabled, creating an RDS database cluster from a snapshot will only render credentials for snapshot credentials. | 2.98.0 | (fix) | | [@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/custom-resources:changeDefaultLogGroupNameForWaiterStateMachineInCompleteHandler](#aws-cdkcustom-resourceschangedefaultloggroupnameforwaiterstatemachineincompletehandler) | When enabled, the log group name for waiter state machine in CompleteHandler will start with `/aws/vendedlogs/states/`. | V2NEXT | (fix) | @@ -116,7 +117,8 @@ The following json shows the current recommended set of flags, as `cdk init` wou "@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": true, "@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": true, "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true, - "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true + "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true, + "@aws-cdk/custom-resources:changeDefaultLogGroupNameForWaiterStateMachineInCompleteHandler": true } } ``` @@ -1193,4 +1195,18 @@ However, with the activation of this feature flag, the default branch is updated | 2.103.1 | `false` | `true` | +### @aws-cdk/custom-resources:changeDefaultLogGroupNameForWaiterStateMachineInCompleteHandler + +*When enabled, the log group name for waiter state machine in CompleteHandler will start with `/aws/vendedlogs/states/`.* (fix) + +If this is set, the log group name of a generated log group in `WaiterStateMachine` construct which is +created by `Provider` construct with `CompleteHandler` will start with `/aws/vendedlogs/states/`. + + +| Since | Default | Recommended | +| ----- | ----- | ----- | +| (not in v1) | | | +| V2NEXT | `false` | `true` | + + diff --git a/packages/aws-cdk-lib/custom-resources/lib/provider-framework/waiter-state-machine.ts b/packages/aws-cdk-lib/custom-resources/lib/provider-framework/waiter-state-machine.ts index b49557c1aa61c..02e5853535760 100644 --- a/packages/aws-cdk-lib/custom-resources/lib/provider-framework/waiter-state-machine.ts +++ b/packages/aws-cdk-lib/custom-resources/lib/provider-framework/waiter-state-machine.ts @@ -3,7 +3,8 @@ import { Grant, IGrantable, PolicyStatement, Role, ServicePrincipal } from '../. import { IFunction } from '../../../aws-lambda'; import { ILogGroup, LogGroup } from '../../../aws-logs'; import { CfnStateMachine, LogLevel } from '../../../aws-stepfunctions'; -import { Duration, Stack } from '../../../core'; +import { Duration, FeatureFlags, Stack } from '../../../core'; +import * as cxapi from '../../../cx-api'; /** * Log Options for the state machine. @@ -88,6 +89,7 @@ export class WaiterStateMachine extends Construct { * The ARN of the state machine. */ public readonly stateMachineArn: string; + private readonly isCompleteHandler: IFunction; constructor(scope: Construct, id: string, props: WaiterStateMachineProps) { super(scope, id); @@ -124,6 +126,7 @@ export class WaiterStateMachine extends Construct { }, }); + this.isCompleteHandler = props.isCompleteHandler; const resource = new CfnStateMachine(this, 'Resource', { definitionString: definition, roleArn: role.roleArn, @@ -172,7 +175,13 @@ export class WaiterStateMachine extends Construct { resources: ['*'], })); - const logGroup = logOptions?.destination ?? new LogGroup(this, 'LogGroup'); + const logGroupName = + FeatureFlags.of(this).isEnabled(cxapi.WAITER_STATE_MACHINE_LOG_GROUP_NAME) + ? `/aws/vendedlogs/states/waiter-state-machine-${this.isCompleteHandler.functionName}-${this.node.addr}` + : undefined; + const logGroup = logOptions?.destination ?? new LogGroup(this, 'LogGroup', { + logGroupName, + }); return { destinations: [{ diff --git a/packages/aws-cdk-lib/custom-resources/test/provider-framework/waiter-state-machine.test.ts b/packages/aws-cdk-lib/custom-resources/test/provider-framework/waiter-state-machine.test.ts index 908ef11675f5d..11f5f18d0e734 100644 --- a/packages/aws-cdk-lib/custom-resources/test/provider-framework/waiter-state-machine.test.ts +++ b/packages/aws-cdk-lib/custom-resources/test/provider-framework/waiter-state-machine.test.ts @@ -260,4 +260,50 @@ describe('state machine', () => { }); Template.fromStack(stack).resourceCountIs('AWS::Logs::LogGroup', 1); }); + + test('log group name is specified if the feature flag is set', () => { + // GIVEN + const stack = new Stack(); + Node.of(stack).setContext('@aws-cdk/core:target-partitions', ['aws', 'aws-cn']); + Node.of(stack).setContext('@aws-cdk/custom-resources:changeDefaultLogGroupNameForWaiterStateMachineInCompleteHandler', true); + + const isCompleteHandler = new lambdaFn(stack, 'isComplete', { + code: Code.fromInline('foo'), + runtime: lambda.Runtime.NODEJS_LATEST, + handler: 'index.handler', + }); + const timeoutHandler = new lambdaFn(stack, 'isTimeout', { + code: Code.fromInline('foo'), + runtime: lambda.Runtime.NODEJS_LATEST, + handler: 'index.handler', + }); + const interval = Duration.hours(2); + const maxAttempts = 2; + const backoffRate = 5; + + // WHEN + new WaiterStateMachine(stack, 'statemachine', { + isCompleteHandler, + timeoutHandler, + backoffRate, + interval, + maxAttempts, + }); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::Logs::LogGroup', { + LogGroupName: { + 'Fn::Join': [ + '', + [ + '/aws/vendedlogs/states/waiter-state-machine-', + { + Ref: 'isCompleteBBB74F92', + }, + '-c892b744a2306a661f17f50ce17de4b606ce3fc700', + ], + ], + }, + }); + }); }); diff --git a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md index 95817e6176cb4..6b4dcd418ab8b 100644 --- a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +++ b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md @@ -63,6 +63,7 @@ Flags come in three types: | [@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters](#aws-cdkaws-rdsauroraclusterchangescopeofinstanceparametergroupwitheachparameters) | When enabled, a scope of InstanceParameterGroup for AuroraClusterInstance with each parameters will change. | 2.97.0 | (fix) | | [@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials](#aws-cdkaws-rdspreventrenderingdeprecatedcredentials) | When enabled, creating an RDS database cluster from a snapshot will only render credentials for snapshot credentials. | 2.98.0 | (fix) | | [@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/custom-resources:changeDefaultLogGroupNameForWaiterStateMachineInCompleteHandler](#aws-cdkcustom-resourceschangedefaultloggroupnameforwaiterstatemachineincompletehandler) | When enabled, the log group name for waiter state machine in CompleteHandler will start with `/aws/vendedlogs/states/`. | V2NEXT | (fix) | @@ -116,7 +117,8 @@ The following json shows the current recommended set of flags, as `cdk init` wou "@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": true, "@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": true, "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true, - "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true + "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true, + "@aws-cdk/custom-resources:changeDefaultLogGroupNameForWaiterStateMachineInCompleteHandler": true } } ``` @@ -1193,4 +1195,18 @@ However, with the activation of this feature flag, the default branch is updated | 2.103.1 | `false` | `true` | +### @aws-cdk/custom-resources:changeDefaultLogGroupNameForWaiterStateMachineInCompleteHandler + +*When enabled, the log group name for waiter state machine in CompleteHandler will start with `/aws/vendedlogs/states/`.* (fix) + +If this is set, the log group name of a generated log group in `WaiterStateMachine` construct which is +created by `Provider` construct with `CompleteHandler` will start with `/aws/vendedlogs/states/`. + + +| Since | Default | Recommended | +| ----- | ----- | ----- | +| (not in v1) | | | +| V2NEXT | `false` | `true` | + + diff --git a/packages/aws-cdk-lib/cx-api/README.md b/packages/aws-cdk-lib/cx-api/README.md index f25b78a5e6a26..a42d76afd23e4 100644 --- a/packages/aws-cdk-lib/cx-api/README.md +++ b/packages/aws-cdk-lib/cx-api/README.md @@ -241,3 +241,20 @@ _cdk.json_ } } ``` + +* `@aws-cdk/custom-resources:changeDefaultLogGroupNameForWaiterStateMachineInCompleteHandler` + +When enabled, the log group name for waiter state machine in CompleteHandler will start with `/aws/vendedlogs/states/`. + +If this is set, the log group name of a generated log group in `WaiterStateMachine` construct which is +created by `Provider` construct with `CompleteHandler` will start with `/aws/vendedlogs/states/`. + +_cdk.json_ + +```json +{ + "context": { + "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true + } +} +``` diff --git a/packages/aws-cdk-lib/cx-api/lib/features.ts b/packages/aws-cdk-lib/cx-api/lib/features.ts index b164badc1f9ba..d98b97da48bdc 100644 --- a/packages/aws-cdk-lib/cx-api/lib/features.ts +++ b/packages/aws-cdk-lib/cx-api/lib/features.ts @@ -97,6 +97,7 @@ export const RDS_PREVENT_RENDERING_DEPRECATED_CREDENTIALS = '@aws-cdk/aws-rds:pr export const AURORA_CLUSTER_CHANGE_SCOPE_OF_INSTANCE_PARAMETER_GROUP_WITH_EACH_PARAMETERS = '@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters'; export const APPSYNC_ENABLE_USE_ARN_IDENTIFIER_SOURCE_API_ASSOCIATION = '@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier'; export const CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME = '@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource'; +export const WAITER_STATE_MACHINE_LOG_GROUP_NAME = '@aws-cdk/custom-resources:changeDefaultLogGroupNameForWaiterStateMachineInCompleteHandler'; export const FLAGS: Record = { ////////////////////////////////////////////////////////////////////// @@ -976,6 +977,18 @@ export const FLAGS: Record = { introducedIn: { v2: '2.103.1' }, recommendedValue: true, }, + + ////////////////////////////////////////////////////////////////////// + [WAITER_STATE_MACHINE_LOG_GROUP_NAME]: { + type: FlagType.BugFix, + summary: 'When enabled, the log group name for waiter state machine in CompleteHandler will start with `/aws/vendedlogs/states/`.', + detailsMd: ` + If this is set, the log group name of a generated log group in \`WaiterStateMachine\` construct which is + created by \`Provider\` construct with \`CompleteHandler\` will start with \`/aws/vendedlogs/states/\`. + `, + introducedIn: { v2: 'V2NEXT' }, + recommendedValue: true, + }, }; const CURRENT_MV = 'v2';