Skip to content

Commit 5f33a26

Browse files
authored
feat(stepfunctions): removal policy for state machines (#24105)
Add the `removalPolicy` prop to `StateMachine`. The execution history can be considered as stateful. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent ee36150 commit 5f33a26

File tree

346 files changed

+3395
-1164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

346 files changed

+3395
-1164
lines changed

packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/StepFunctionsRestApiDeploymentStack.assets.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"version": "21.0.0",
2+
"version": "30.0.0",
33
"files": {
4-
"06411bc9644c9af466e4101cc159122b7c5422ecbd496553c2a2ef821687361c": {
4+
"de2c198bbb6588ccbe00d0f0794f7217c429e3d7e3c5b4326e3b085b0d697753": {
55
"source": {
66
"path": "StepFunctionsRestApiDeploymentStack.template.json",
77
"packaging": "file"
88
},
99
"destinations": {
1010
"current_account-current_region": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12-
"objectKey": "06411bc9644c9af466e4101cc159122b7c5422ecbd496553c2a2ef821687361c.json",
12+
"objectKey": "de2c198bbb6588ccbe00d0f0794f7217c429e3d7e3c5b4326e3b085b0d697753.json",
1313
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1414
}
1515
}

packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/StepFunctionsRestApiDeploymentStack.template.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
},
3232
"DependsOn": [
3333
"StateMachineRoleB840431D"
34-
]
34+
],
35+
"UpdateReplacePolicy": "Delete",
36+
"DeletionPolicy": "Delete"
3537
},
3638
"StepFunctionsRestApiC6E3E883": {
3739
"Type": "AWS::ApiGateway::RestApi",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"21.0.0"}
1+
{"version":"30.0.0"}

packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/integ.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "21.0.0",
2+
"version": "30.0.0",
33
"testCases": {
44
"step-functions-restapi/DefaultTest": {
55
"stacks": [

packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "21.0.0",
2+
"version": "30.0.0",
33
"artifacts": {
44
"StepFunctionsRestApiDeploymentStack.assets": {
55
"type": "cdk:asset-manifest",
@@ -17,7 +17,7 @@
1717
"validateOnSynth": false,
1818
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
1919
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
20-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06411bc9644c9af466e4101cc159122b7c5422ecbd496553c2a2ef821687361c.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/de2c198bbb6588ccbe00d0f0794f7217c429e3d7e3c5b4326e3b085b0d697753.json",
2121
"requiresBootstrapStackVersion": 6,
2222
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2323
"additionalDependencies": [

packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/stepfunctionsrestapiDefaultTestDeployAssert53C3797F.assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "21.0.0",
2+
"version": "30.0.0",
33
"files": {
44
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
55
"source": {

packages/@aws-cdk/aws-apigateway/test/integ.stepfunctions-api.js.snapshot/tree.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
"id": "Role",
2525
"path": "StepFunctionsRestApiDeploymentStack/StateMachine/Role",
2626
"children": {
27+
"ImportRole": {
28+
"id": "ImportRole",
29+
"path": "StepFunctionsRestApiDeploymentStack/StateMachine/Role/ImportRole",
30+
"constructInfo": {
31+
"fqn": "@aws-cdk/core.Resource",
32+
"version": "0.0.0"
33+
}
34+
},
2735
"Resource": {
2836
"id": "Resource",
2937
"path": "StepFunctionsRestApiDeploymentStack/StateMachine/Role/Resource",
@@ -104,6 +112,14 @@
104112
"id": "CloudWatchRole",
105113
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/CloudWatchRole",
106114
"children": {
115+
"ImportCloudWatchRole": {
116+
"id": "ImportCloudWatchRole",
117+
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/CloudWatchRole/ImportCloudWatchRole",
118+
"constructInfo": {
119+
"fqn": "@aws-cdk/core.Resource",
120+
"version": "0.0.0"
121+
}
122+
},
107123
"Resource": {
108124
"id": "Resource",
109125
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/CloudWatchRole/Resource",
@@ -180,6 +196,14 @@
180196
"id": "StartSyncExecutionRole",
181197
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/Default/ANY/StartSyncExecutionRole",
182198
"children": {
199+
"ImportStartSyncExecutionRole": {
200+
"id": "ImportStartSyncExecutionRole",
201+
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/Default/ANY/StartSyncExecutionRole/ImportStartSyncExecutionRole",
202+
"constructInfo": {
203+
"fqn": "@aws-cdk/core.Resource",
204+
"version": "0.0.0"
205+
}
206+
},
183207
"Resource": {
184208
"id": "Resource",
185209
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/Default/ANY/StartSyncExecutionRole/Resource",
@@ -476,7 +500,7 @@
476500
"path": "step-functions-restapi/DefaultTest/Default",
477501
"constructInfo": {
478502
"fqn": "constructs.Construct",
479-
"version": "10.1.140"
503+
"version": "10.1.237"
480504
}
481505
},
482506
"DeployAssert": {
@@ -522,7 +546,7 @@
522546
"path": "Tree",
523547
"constructInfo": {
524548
"fqn": "constructs.Construct",
525-
"version": "10.1.140"
549+
"version": "10.1.237"
526550
}
527551
}
528552
},

packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/aws-cdk-codepipeline-stepfunctions.assets.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"version": "21.0.0",
2+
"version": "30.0.0",
33
"files": {
4-
"3d5f0e79e533ad63e029ee86782cdc022e8faa5575d2e96d5a6bc3d7f5734e54": {
4+
"9c2191cf64f5d0c7288c4daeb90518584cb5076983557a2d930df85cbf8b1e4d": {
55
"source": {
66
"path": "aws-cdk-codepipeline-stepfunctions.template.json",
77
"packaging": "file"
88
},
99
"destinations": {
1010
"current_account-current_region": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12-
"objectKey": "3d5f0e79e533ad63e029ee86782cdc022e8faa5575d2e96d5a6bc3d7f5734e54.json",
12+
"objectKey": "9c2191cf64f5d0c7288c4daeb90518584cb5076983557a2d930df85cbf8b1e4d.json",
1313
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1414
}
1515
}

packages/@aws-cdk/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js.snapshot/aws-cdk-codepipeline-stepfunctions.template.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
},
3131
"DependsOn": [
3232
"SimpleStateMachineRole0CBC135A"
33-
]
33+
],
34+
"UpdateReplacePolicy": "Delete",
35+
"DeletionPolicy": "Delete"
3436
},
3537
"MyPipelineArtifactsBucketEncryptionKey8BF0A7F3": {
3638
"Type": "AWS::KMS::Key",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"21.0.0"}
1+
{"version":"30.0.0"}

0 commit comments

Comments
 (0)