Skip to content

Commit 8c76cbd

Browse files
authored
docs: Add example of Step Functions target (#37)
1 parent 608fd50 commit 8c76cbd

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ module "eventbridge_with_permissions" {
173173
}
174174
```
175175

176-
### EventBridge with lambda rule schedule
176+
### EventBridge with schedule rule and Lambda target
177177

178178
```hcl
179179
module "eventbridge" {
@@ -200,6 +200,36 @@ module "eventbridge" {
200200
}
201201
```
202202

203+
### EventBridge with schedule rule and Step Functions target
204+
205+
```hcl
206+
module "eventbridge" {
207+
source = "terraform-aws-modules/eventbridge/aws"
208+
209+
create_bus = false
210+
211+
rules = {
212+
crons = {
213+
description = "Run state machine everyday 10:00 UTC"
214+
schedule_expression = "cron(0 10 * * ? *)"
215+
}
216+
}
217+
218+
targets = {
219+
crons = [
220+
{
221+
name = "your-awesome-state-machine"
222+
arn = "arn:aws:states:us-east-1:123456789012:stateMachine:your-awesome-state-machine"
223+
attach_role_arn = true
224+
}
225+
]
226+
}
227+
228+
sfn_target_arns = ["arn:aws:states:us-east-1:123456789012:stateMachine:your-awesome-state-machine"]
229+
attach_sfn_policy = true
230+
}
231+
```
232+
203233
### EventBridge API Destination
204234

205235
```hcl

0 commit comments

Comments
 (0)