Skip to content

Commit 9ae1aec

Browse files
committed
Merge branch 'main' into allen/aws-lambda-secrets-manager
2 parents a067ec6 + 78e8fdd commit 9ae1aec

22 files changed

+459
-297
lines changed

Diff for: source/patterns/@aws-solutions-constructs/aws-events-rule-step-function/test/__snapshots__/events-rule-step-function.test.js.snap

+3
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ Object {
174174
],
175175
},
176176
},
177+
"Properties": Object {
178+
"LogGroupName": "/aws/vendedlogs/states/defaulttesteventsrulestepfunctionstatemachinelog5bd198c8f277",
179+
},
177180
"Type": "AWS::Logs::LogGroup",
178181
"UpdateReplacePolicy": "Retain",
179182
},

Diff for: source/patterns/@aws-solutions-constructs/aws-events-rule-step-function/test/integ.events-rule-step-function-no-argument.expected.json

+29-26
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
22
"Resources": {
3-
"testeventsrulestepfunctionstackStateMachineLogGroupC3B398D4": {
3+
"testeventsrulestepfunctionconstructStateMachineLogGroup9F23A0FB": {
44
"Type": "AWS::Logs::LogGroup",
5-
"UpdateReplacePolicy": "Retain",
6-
"DeletionPolicy": "Retain",
5+
"Properties": {
6+
"LogGroupName": "/aws/vendedlogs/states/testeventsrulestepfunctionstacktesteventsrulestepfunctionconstructstatemachinelogdd33737e030e"
7+
},
8+
"UpdateReplacePolicy": "Delete",
9+
"DeletionPolicy": "Delete",
710
"Metadata": {
811
"cfn_nag": {
912
"rules_to_suppress": [
@@ -19,7 +22,7 @@
1922
}
2023
}
2124
},
22-
"testeventsrulestepfunctionstackStateMachineRoleA5C98F35": {
25+
"testeventsrulestepfunctionconstructStateMachineRoleBC40499F": {
2326
"Type": "AWS::IAM::Role",
2427
"Properties": {
2528
"AssumeRolePolicyDocument": {
@@ -47,7 +50,7 @@
4750
}
4851
}
4952
},
50-
"testeventsrulestepfunctionstackStateMachineRoleDefaultPolicyC51897AF": {
53+
"testeventsrulestepfunctionconstructStateMachineRoleDefaultPolicy121FE5E3": {
5154
"Type": "AWS::IAM::Policy",
5255
"Properties": {
5356
"PolicyDocument": {
@@ -94,10 +97,10 @@
9497
],
9598
"Version": "2012-10-17"
9699
},
97-
"PolicyName": "testeventsrulestepfunctionstackStateMachineRoleDefaultPolicyC51897AF",
100+
"PolicyName": "testeventsrulestepfunctionconstructStateMachineRoleDefaultPolicy121FE5E3",
98101
"Roles": [
99102
{
100-
"Ref": "testeventsrulestepfunctionstackStateMachineRoleA5C98F35"
103+
"Ref": "testeventsrulestepfunctionconstructStateMachineRoleBC40499F"
101104
}
102105
]
103106
},
@@ -112,12 +115,12 @@
112115
}
113116
}
114117
},
115-
"testeventsrulestepfunctionstackStateMachine48534048": {
118+
"testeventsrulestepfunctionconstructStateMachineEC649FB0": {
116119
"Type": "AWS::StepFunctions::StateMachine",
117120
"Properties": {
118121
"RoleArn": {
119122
"Fn::GetAtt": [
120-
"testeventsrulestepfunctionstackStateMachineRoleA5C98F35",
123+
"testeventsrulestepfunctionconstructStateMachineRoleBC40499F",
121124
"Arn"
122125
]
123126
},
@@ -128,7 +131,7 @@
128131
"CloudWatchLogsLogGroup": {
129132
"LogGroupArn": {
130133
"Fn::GetAtt": [
131-
"testeventsrulestepfunctionstackStateMachineLogGroupC3B398D4",
134+
"testeventsrulestepfunctionconstructStateMachineLogGroup9F23A0FB",
132135
"Arn"
133136
]
134137
}
@@ -139,11 +142,11 @@
139142
}
140143
},
141144
"DependsOn": [
142-
"testeventsrulestepfunctionstackStateMachineRoleDefaultPolicyC51897AF",
143-
"testeventsrulestepfunctionstackStateMachineRoleA5C98F35"
145+
"testeventsrulestepfunctionconstructStateMachineRoleDefaultPolicy121FE5E3",
146+
"testeventsrulestepfunctionconstructStateMachineRoleBC40499F"
144147
]
145148
},
146-
"testeventsrulestepfunctionstackEventsRuleRole6AD4C16A": {
149+
"testeventsrulestepfunctionconstructEventsRuleRole17E8002D": {
147150
"Type": "AWS::IAM::Role",
148151
"Properties": {
149152
"AssumeRolePolicyDocument": {
@@ -160,7 +163,7 @@
160163
}
161164
}
162165
},
163-
"testeventsrulestepfunctionstackEventsRuleRoleDefaultPolicy9F3CC359": {
166+
"testeventsrulestepfunctionconstructEventsRuleRoleDefaultPolicy0E65F6F0": {
164167
"Type": "AWS::IAM::Policy",
165168
"Properties": {
166169
"PolicyDocument": {
@@ -169,42 +172,42 @@
169172
"Action": "states:StartExecution",
170173
"Effect": "Allow",
171174
"Resource": {
172-
"Ref": "testeventsrulestepfunctionstackStateMachine48534048"
175+
"Ref": "testeventsrulestepfunctionconstructStateMachineEC649FB0"
173176
}
174177
}
175178
],
176179
"Version": "2012-10-17"
177180
},
178-
"PolicyName": "testeventsrulestepfunctionstackEventsRuleRoleDefaultPolicy9F3CC359",
181+
"PolicyName": "testeventsrulestepfunctionconstructEventsRuleRoleDefaultPolicy0E65F6F0",
179182
"Roles": [
180183
{
181-
"Ref": "testeventsrulestepfunctionstackEventsRuleRole6AD4C16A"
184+
"Ref": "testeventsrulestepfunctionconstructEventsRuleRole17E8002D"
182185
}
183186
]
184187
}
185188
},
186-
"testeventsrulestepfunctionstackEventsRuleF510C733": {
189+
"testeventsrulestepfunctionconstructEventsRule4ACA1995": {
187190
"Type": "AWS::Events::Rule",
188191
"Properties": {
189192
"ScheduleExpression": "rate(5 minutes)",
190193
"State": "ENABLED",
191194
"Targets": [
192195
{
193196
"Arn": {
194-
"Ref": "testeventsrulestepfunctionstackStateMachine48534048"
197+
"Ref": "testeventsrulestepfunctionconstructStateMachineEC649FB0"
195198
},
196199
"Id": "Target0",
197200
"RoleArn": {
198201
"Fn::GetAtt": [
199-
"testeventsrulestepfunctionstackEventsRuleRole6AD4C16A",
202+
"testeventsrulestepfunctionconstructEventsRuleRole17E8002D",
200203
"Arn"
201204
]
202205
}
203206
}
204207
]
205208
}
206209
},
207-
"testeventsrulestepfunctionstackExecutionFailedAlarm865F1B9B": {
210+
"testeventsrulestepfunctionconstructExecutionFailedAlarm9BA37D4B": {
208211
"Type": "AWS::CloudWatch::Alarm",
209212
"Properties": {
210213
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
@@ -214,7 +217,7 @@
214217
{
215218
"Name": "StateMachineArn",
216219
"Value": {
217-
"Ref": "testeventsrulestepfunctionstackStateMachine48534048"
220+
"Ref": "testeventsrulestepfunctionconstructStateMachineEC649FB0"
218221
}
219222
}
220223
],
@@ -225,7 +228,7 @@
225228
"Threshold": 1
226229
}
227230
},
228-
"testeventsrulestepfunctionstackExecutionThrottledAlarm25CE7A69": {
231+
"testeventsrulestepfunctionconstructExecutionThrottledAlarmF36B7E20": {
229232
"Type": "AWS::CloudWatch::Alarm",
230233
"Properties": {
231234
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
@@ -235,7 +238,7 @@
235238
{
236239
"Name": "StateMachineArn",
237240
"Value": {
238-
"Ref": "testeventsrulestepfunctionstackStateMachine48534048"
241+
"Ref": "testeventsrulestepfunctionconstructStateMachineEC649FB0"
239242
}
240243
}
241244
],
@@ -246,7 +249,7 @@
246249
"Threshold": 1
247250
}
248251
},
249-
"testeventsrulestepfunctionstackExecutionAbortedAlarmADD2893F": {
252+
"testeventsrulestepfunctionconstructExecutionAbortedAlarm4EC52091": {
250253
"Type": "AWS::CloudWatch::Alarm",
251254
"Properties": {
252255
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
@@ -256,7 +259,7 @@
256259
{
257260
"Name": "StateMachineArn",
258261
"Value": {
259-
"Ref": "testeventsrulestepfunctionstackStateMachine48534048"
262+
"Ref": "testeventsrulestepfunctionconstructStateMachineEC649FB0"
260263
}
261264
}
262265
],

Diff for: source/patterns/@aws-solutions-constructs/aws-events-rule-step-function/test/integ.events-rule-step-function-no-argument.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/// !cdk-integ *
15-
import { App, Stack } from "@aws-cdk/core";
15+
import { App, Stack, RemovalPolicy } from "@aws-cdk/core";
1616
import { EventsRuleToStepFunction, EventsRuleToStepFunctionProps } from "../lib";
1717
import { Duration } from '@aws-cdk/core';
1818
import * as stepfunctions from '@aws-cdk/aws-stepfunctions';
@@ -29,8 +29,11 @@ const props: EventsRuleToStepFunctionProps = {
2929
},
3030
eventRuleProps: {
3131
schedule: events.Schedule.rate(Duration.minutes(5))
32-
}
32+
},
33+
logGroupProps: {
34+
removalPolicy: RemovalPolicy.DESTROY
35+
},
3336
};
3437

35-
new EventsRuleToStepFunction(stack, 'test-events-rule-step-function-stack', props);
38+
new EventsRuleToStepFunction(stack, 'test-events-rule-step-function-construct', props);
3639
app.synth();

0 commit comments

Comments
 (0)