File tree Expand file tree Collapse file tree 1 file changed +31
-31
lines changed
internal/service/sfn/testdata/tmpl Expand file tree Collapse file tree 1 file changed +31
-31
lines changed Original file line number Diff line number Diff line change
1
+ resource " aws_sfn_state_machine" " test" {
2
+ {{- template " region" }}
3
+ name = var. rName
4
+ role_arn = aws_iam_role. for_sfn. arn
5
+
6
+ definition = << EOF
7
+ {
8
+ " Comment" : " A Hello World example of the Amazon States Language using an AWS Lambda Function" ,
9
+ " StartAt" : " HelloWorld" ,
10
+ " States" : {
11
+ " HelloWorld" : {
12
+ " Type" : " Task" ,
13
+ " Resource" : " ${ aws_lambda_function.test.arn} " ,
14
+ " Retry" : [
15
+ {
16
+ " ErrorEquals" : [
17
+ " States.ALL"
18
+ ],
19
+ " IntervalSeconds" : 5 ,
20
+ " MaxAttempts" : 5 ,
21
+ " BackoffRate" : 8
22
+ }
23
+ ],
24
+ " End" : true
25
+ }
26
+ }
27
+ }
28
+ EOF
29
+ {{- template " tags" }}
30
+ }
31
+
1
32
resource " aws_iam_role_policy" " for_lambda" {
2
33
name = " ${ var.rName} -lambda"
3
34
role = aws_iam_role. for_lambda. id
@@ -97,35 +128,4 @@ resource "aws_iam_role" "for_sfn" {
97
128
}]
98
129
}
99
130
EOF
100
- }
101
-
102
- resource " aws_sfn_state_machine" " test" {
103
- {{- template " region" }}
104
- name = var. rName
105
- role_arn = aws_iam_role. for_sfn. arn
106
-
107
- definition = << EOF
108
- {
109
- " Comment" : " A Hello World example of the Amazon States Language using an AWS Lambda Function" ,
110
- " StartAt" : " HelloWorld" ,
111
- " States" : {
112
- " HelloWorld" : {
113
- " Type" : " Task" ,
114
- " Resource" : " ${ aws_lambda_function.test.arn} " ,
115
- " Retry" : [
116
- {
117
- " ErrorEquals" : [
118
- " States.ALL"
119
- ],
120
- " IntervalSeconds" : 5 ,
121
- " MaxAttempts" : 5 ,
122
- " BackoffRate" : 8
123
- }
124
- ],
125
- " End" : true
126
- }
127
- }
128
- }
129
- EOF
130
- {{- template " tags" }}
131
131
}
You can’t perform that action at this time.
0 commit comments