Skip to content

Commit e839d45

Browse files
authored
fix(stepfunctions-tasks): associateWithParent when using JSONata (#33972)
### Issue # (if applicable) Closes #33850 ### Description of changes AWS_STEP_FUNCTIONS_STARTED_BY_EXECUTION_ID use correct value for specific query language ### Description of how you validated changes Unit + Integ ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 95c06e2 commit e839d45

File tree

12 files changed

+31744
-1
lines changed

12 files changed

+31744
-1
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution-jsonata.js.snapshot/asset.97484721f29e34bf38d7a459804dd2d2a8dea6f8c27d7531e215bf4274fbc895.bundle/index.js

+30,674
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution-jsonata.js.snapshot/cdk.out

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution-jsonata.js.snapshot/integ-sfn-start-execution-jsonata.assets.json

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
{
2+
"Resources": {
3+
"ChildRole1E3E0EF5": {
4+
"Type": "AWS::IAM::Role",
5+
"Properties": {
6+
"AssumeRolePolicyDocument": {
7+
"Statement": [
8+
{
9+
"Action": "sts:AssumeRole",
10+
"Effect": "Allow",
11+
"Principal": {
12+
"Service": "states.amazonaws.com"
13+
}
14+
}
15+
],
16+
"Version": "2012-10-17"
17+
}
18+
}
19+
},
20+
"ChildDAB30558": {
21+
"Type": "AWS::StepFunctions::StateMachine",
22+
"Properties": {
23+
"DefinitionString": "{\"StartAt\":\"Pass\",\"States\":{\"Pass\":{\"Type\":\"Pass\",\"End\":true}}}",
24+
"RoleArn": {
25+
"Fn::GetAtt": [
26+
"ChildRole1E3E0EF5",
27+
"Arn"
28+
]
29+
}
30+
},
31+
"DependsOn": [
32+
"ChildRole1E3E0EF5"
33+
],
34+
"UpdateReplacePolicy": "Delete",
35+
"DeletionPolicy": "Delete"
36+
},
37+
"ParentRole5F0C366C": {
38+
"Type": "AWS::IAM::Role",
39+
"Properties": {
40+
"AssumeRolePolicyDocument": {
41+
"Statement": [
42+
{
43+
"Action": "sts:AssumeRole",
44+
"Effect": "Allow",
45+
"Principal": {
46+
"Service": "states.amazonaws.com"
47+
}
48+
}
49+
],
50+
"Version": "2012-10-17"
51+
}
52+
}
53+
},
54+
"ParentRoleDefaultPolicy9BDC56DC": {
55+
"Type": "AWS::IAM::Policy",
56+
"Properties": {
57+
"PolicyDocument": {
58+
"Statement": [
59+
{
60+
"Action": "states:StartExecution",
61+
"Effect": "Allow",
62+
"Resource": {
63+
"Ref": "ChildDAB30558"
64+
}
65+
},
66+
{
67+
"Action": [
68+
"states:DescribeExecution",
69+
"states:StopExecution"
70+
],
71+
"Effect": "Allow",
72+
"Resource": {
73+
"Fn::Join": [
74+
"",
75+
[
76+
"arn:",
77+
{
78+
"Ref": "AWS::Partition"
79+
},
80+
":states:",
81+
{
82+
"Ref": "AWS::Region"
83+
},
84+
":",
85+
{
86+
"Ref": "AWS::AccountId"
87+
},
88+
":execution:",
89+
{
90+
"Fn::Select": [
91+
6,
92+
{
93+
"Fn::Split": [
94+
":",
95+
{
96+
"Ref": "ChildDAB30558"
97+
}
98+
]
99+
}
100+
]
101+
},
102+
"*"
103+
]
104+
]
105+
}
106+
},
107+
{
108+
"Action": [
109+
"events:DescribeRule",
110+
"events:PutRule",
111+
"events:PutTargets"
112+
],
113+
"Effect": "Allow",
114+
"Resource": {
115+
"Fn::Join": [
116+
"",
117+
[
118+
"arn:",
119+
{
120+
"Ref": "AWS::Partition"
121+
},
122+
":events:",
123+
{
124+
"Ref": "AWS::Region"
125+
},
126+
":",
127+
{
128+
"Ref": "AWS::AccountId"
129+
},
130+
":rule/StepFunctionsGetEventsForStepFunctionsExecutionRule"
131+
]
132+
]
133+
}
134+
}
135+
],
136+
"Version": "2012-10-17"
137+
},
138+
"PolicyName": "ParentRoleDefaultPolicy9BDC56DC",
139+
"Roles": [
140+
{
141+
"Ref": "ParentRole5F0C366C"
142+
}
143+
]
144+
}
145+
},
146+
"Parent8B210403": {
147+
"Type": "AWS::StepFunctions::StateMachine",
148+
"Properties": {
149+
"DefinitionString": {
150+
"Fn::Join": [
151+
"",
152+
[
153+
"{\"StartAt\":\"Task\",\"States\":{\"Task\":{\"QueryLanguage\":\"JSONata\",\"End\":true,\"Type\":\"Task\",\"Arguments\":{\"Input\":{\"hello\":\"{% $states.input.hello %}\",\"AWS_STEP_FUNCTIONS_STARTED_BY_EXECUTION_ID\":\"{% $states.context.Execution.Id %}\"},\"StateMachineArn\":\"",
154+
{
155+
"Ref": "ChildDAB30558"
156+
},
157+
"\"},\"Resource\":\"arn:",
158+
{
159+
"Ref": "AWS::Partition"
160+
},
161+
":states:::states:startExecution.sync:2\"}}}"
162+
]
163+
]
164+
},
165+
"RoleArn": {
166+
"Fn::GetAtt": [
167+
"ParentRole5F0C366C",
168+
"Arn"
169+
]
170+
}
171+
},
172+
"DependsOn": [
173+
"ParentRoleDefaultPolicy9BDC56DC",
174+
"ParentRole5F0C366C"
175+
],
176+
"UpdateReplacePolicy": "Delete",
177+
"DeletionPolicy": "Delete"
178+
}
179+
},
180+
"Outputs": {
181+
"ExportsOutputRefParent8B210403B455DBC1": {
182+
"Value": {
183+
"Ref": "Parent8B210403"
184+
},
185+
"Export": {
186+
"Name": "integ-sfn-start-execution-jsonata:ExportsOutputRefParent8B210403B455DBC1"
187+
}
188+
}
189+
},
190+
"Parameters": {
191+
"BootstrapVersion": {
192+
"Type": "AWS::SSM::Parameter::Value<String>",
193+
"Default": "/cdk-bootstrap/hnb659fds/version",
194+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
195+
}
196+
},
197+
"Rules": {
198+
"CheckBootstrapVersion": {
199+
"Assertions": [
200+
{
201+
"Assert": {
202+
"Fn::Not": [
203+
{
204+
"Fn::Contains": [
205+
[
206+
"1",
207+
"2",
208+
"3",
209+
"4",
210+
"5"
211+
],
212+
{
213+
"Ref": "BootstrapVersion"
214+
}
215+
]
216+
}
217+
]
218+
},
219+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
220+
}
221+
]
222+
}
223+
}
224+
}

packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution-jsonata.js.snapshot/integ.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/stepfunctions/integ.start-execution-jsonata.js.snapshot/integsfnstartexecutionjsonataintegDefaultTestDeployAssert66319094.assets.json

+33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)