Skip to content

Commit

Permalink
feat(stepfunctions): removal policy for state machines (#24105)
Browse files Browse the repository at this point in the history
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*
  • Loading branch information
jogold committed Feb 20, 2023
1 parent ee36150 commit 5f33a26
Show file tree
Hide file tree
Showing 346 changed files with 3,395 additions and 1,164 deletions.
@@ -1,15 +1,15 @@
{
"version": "21.0.0",
"version": "30.0.0",
"files": {
"06411bc9644c9af466e4101cc159122b7c5422ecbd496553c2a2ef821687361c": {
"de2c198bbb6588ccbe00d0f0794f7217c429e3d7e3c5b4326e3b085b0d697753": {
"source": {
"path": "StepFunctionsRestApiDeploymentStack.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "06411bc9644c9af466e4101cc159122b7c5422ecbd496553c2a2ef821687361c.json",
"objectKey": "de2c198bbb6588ccbe00d0f0794f7217c429e3d7e3c5b4326e3b085b0d697753.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Expand Up @@ -31,7 +31,9 @@
},
"DependsOn": [
"StateMachineRoleB840431D"
]
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"StepFunctionsRestApiC6E3E883": {
"Type": "AWS::ApiGateway::RestApi",
Expand Down
@@ -1 +1 @@
{"version":"21.0.0"}
{"version":"30.0.0"}
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "30.0.0",
"testCases": {
"step-functions-restapi/DefaultTest": {
"stacks": [
Expand Down
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "30.0.0",
"artifacts": {
"StepFunctionsRestApiDeploymentStack.assets": {
"type": "cdk:asset-manifest",
Expand All @@ -17,7 +17,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}/06411bc9644c9af466e4101cc159122b7c5422ecbd496553c2a2ef821687361c.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/de2c198bbb6588ccbe00d0f0794f7217c429e3d7e3c5b4326e3b085b0d697753.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "30.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
Expand Down
Expand Up @@ -24,6 +24,14 @@
"id": "Role",
"path": "StepFunctionsRestApiDeploymentStack/StateMachine/Role",
"children": {
"ImportRole": {
"id": "ImportRole",
"path": "StepFunctionsRestApiDeploymentStack/StateMachine/Role/ImportRole",
"constructInfo": {
"fqn": "@aws-cdk/core.Resource",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "StepFunctionsRestApiDeploymentStack/StateMachine/Role/Resource",
Expand Down Expand Up @@ -104,6 +112,14 @@
"id": "CloudWatchRole",
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/CloudWatchRole",
"children": {
"ImportCloudWatchRole": {
"id": "ImportCloudWatchRole",
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/CloudWatchRole/ImportCloudWatchRole",
"constructInfo": {
"fqn": "@aws-cdk/core.Resource",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/CloudWatchRole/Resource",
Expand Down Expand Up @@ -180,6 +196,14 @@
"id": "StartSyncExecutionRole",
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/Default/ANY/StartSyncExecutionRole",
"children": {
"ImportStartSyncExecutionRole": {
"id": "ImportStartSyncExecutionRole",
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/Default/ANY/StartSyncExecutionRole/ImportStartSyncExecutionRole",
"constructInfo": {
"fqn": "@aws-cdk/core.Resource",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "StepFunctionsRestApiDeploymentStack/StepFunctionsRestApi/Default/ANY/StartSyncExecutionRole/Resource",
Expand Down Expand Up @@ -476,7 +500,7 @@
"path": "step-functions-restapi/DefaultTest/Default",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.140"
"version": "10.1.237"
}
},
"DeployAssert": {
Expand Down Expand Up @@ -522,7 +546,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.140"
"version": "10.1.237"
}
}
},
Expand Down
@@ -1,15 +1,15 @@
{
"version": "21.0.0",
"version": "30.0.0",
"files": {
"3d5f0e79e533ad63e029ee86782cdc022e8faa5575d2e96d5a6bc3d7f5734e54": {
"9c2191cf64f5d0c7288c4daeb90518584cb5076983557a2d930df85cbf8b1e4d": {
"source": {
"path": "aws-cdk-codepipeline-stepfunctions.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "3d5f0e79e533ad63e029ee86782cdc022e8faa5575d2e96d5a6bc3d7f5734e54.json",
"objectKey": "9c2191cf64f5d0c7288c4daeb90518584cb5076983557a2d930df85cbf8b1e4d.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Expand Up @@ -30,7 +30,9 @@
},
"DependsOn": [
"SimpleStateMachineRole0CBC135A"
]
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"MyPipelineArtifactsBucketEncryptionKey8BF0A7F3": {
"Type": "AWS::KMS::Key",
Expand Down
@@ -1 +1 @@
{"version":"21.0.0"}
{"version":"30.0.0"}
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "30.0.0",
"testCases": {
"integ.pipeline-stepfunctions": {
"stacks": [
Expand Down
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "30.0.0",
"artifacts": {
"aws-cdk-codepipeline-stepfunctions.assets": {
"type": "cdk:asset-manifest",
Expand All @@ -17,7 +17,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}/3d5f0e79e533ad63e029ee86782cdc022e8faa5575d2e96d5a6bc3d7f5734e54.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9c2191cf64f5d0c7288c4daeb90518584cb5076983557a2d930df85cbf8b1e4d.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
Expand Up @@ -24,6 +24,14 @@
"id": "Role",
"path": "aws-cdk-codepipeline-stepfunctions/SimpleStateMachine/Role",
"children": {
"ImportRole": {
"id": "ImportRole",
"path": "aws-cdk-codepipeline-stepfunctions/SimpleStateMachine/Role/ImportRole",
"constructInfo": {
"fqn": "@aws-cdk/core.Resource",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "aws-cdk-codepipeline-stepfunctions/SimpleStateMachine/Role/Resource",
Expand Down Expand Up @@ -279,6 +287,14 @@
"id": "Role",
"path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Role",
"children": {
"ImportRole": {
"id": "ImportRole",
"path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Role/ImportRole",
"constructInfo": {
"fqn": "@aws-cdk/core.Resource",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Role/Resource",
Expand Down Expand Up @@ -524,6 +540,14 @@
"id": "CodePipelineActionRole",
"path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Source/Source/CodePipelineActionRole",
"children": {
"ImportCodePipelineActionRole": {
"id": "ImportCodePipelineActionRole",
"path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Source/Source/CodePipelineActionRole/ImportCodePipelineActionRole",
"constructInfo": {
"fqn": "@aws-cdk/core.Resource",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Source/Source/CodePipelineActionRole/Resource",
Expand Down Expand Up @@ -686,13 +710,13 @@
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.140"
"version": "10.1.237"
}
}
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.140"
"version": "10.1.237"
}
},
"Invoke": {
Expand All @@ -707,6 +731,14 @@
"id": "CodePipelineActionRole",
"path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Invoke/Invoke/CodePipelineActionRole",
"children": {
"ImportCodePipelineActionRole": {
"id": "ImportCodePipelineActionRole",
"path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Invoke/Invoke/CodePipelineActionRole/ImportCodePipelineActionRole",
"constructInfo": {
"fqn": "@aws-cdk/core.Resource",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "aws-cdk-codepipeline-stepfunctions/MyPipeline/Invoke/Invoke/CodePipelineActionRole/Resource",
Expand Down Expand Up @@ -838,13 +870,13 @@
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.140"
"version": "10.1.237"
}
}
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.140"
"version": "10.1.237"
}
}
},
Expand Down Expand Up @@ -902,7 +934,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.140"
"version": "10.1.237"
}
}
},
Expand Down
@@ -1,15 +1,15 @@
{
"version": "21.0.0",
"version": "30.0.0",
"files": {
"98e2d07ff30129aa5321a49eb6aaafeef6fb87a7222cd36d85edd66ee13cf8c4": {
"27b3ee7de550afbdc0e7b81a044c44d3a5739fd50df908417bc07f296a47b34b": {
"source": {
"path": "CallHttpApiInteg.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "98e2d07ff30129aa5321a49eb6aaafeef6fb87a7222cd36d85edd66ee13cf8c4.json",
"objectKey": "27b3ee7de550afbdc0e7b81a044c44d3a5739fd50df908417bc07f296a47b34b.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Expand Up @@ -239,7 +239,9 @@
"DependsOn": [
"StateMachineRoleDefaultPolicyDF1E6607",
"StateMachineRoleB840431D"
]
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Outputs": {
Expand Down
@@ -1 +1 @@
{"version":"21.0.0"}
{"version":"30.0.0"}
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "30.0.0",
"testCases": {
"integ.call-http-api": {
"stacks": [
Expand Down
@@ -1,5 +1,5 @@
{
"version": "21.0.0",
"version": "30.0.0",
"artifacts": {
"CallHttpApiInteg.assets": {
"type": "cdk:asset-manifest",
Expand All @@ -17,7 +17,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}/98e2d07ff30129aa5321a49eb6aaafeef6fb87a7222cd36d85edd66ee13cf8c4.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/27b3ee7de550afbdc0e7b81a044c44d3a5739fd50df908417bc07f296a47b34b.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
Expand Up @@ -187,6 +187,14 @@
"id": "ServiceRole",
"path": "CallHttpApiInteg/HelloHandler/ServiceRole",
"children": {
"ImportServiceRole": {
"id": "ImportServiceRole",
"path": "CallHttpApiInteg/HelloHandler/ServiceRole/ImportServiceRole",
"constructInfo": {
"fqn": "@aws-cdk/core.Resource",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "CallHttpApiInteg/HelloHandler/ServiceRole/Resource",
Expand Down Expand Up @@ -278,6 +286,14 @@
"id": "Role",
"path": "CallHttpApiInteg/StateMachine/Role",
"children": {
"ImportRole": {
"id": "ImportRole",
"path": "CallHttpApiInteg/StateMachine/Role/ImportRole",
"constructInfo": {
"fqn": "@aws-cdk/core.Resource",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "CallHttpApiInteg/StateMachine/Role/Resource",
Expand Down Expand Up @@ -455,7 +471,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.140"
"version": "10.1.237"
}
}
},
Expand Down

0 comments on commit 5f33a26

Please sign in to comment.