Skip to content

Commit d762e12

Browse files
committed
put subject of test at top of template
1 parent 61a6086 commit d762e12

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

internal/service/sfn/testdata/tmpl/state_machine_tags.gtpl

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
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+
132
resource "aws_iam_role_policy" "for_lambda" {
233
name = "${var.rName}-lambda"
334
role = aws_iam_role.for_lambda.id
@@ -97,35 +128,4 @@ resource "aws_iam_role" "for_sfn" {
97128
}]
98129
}
99130
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" }}
131131
}

0 commit comments

Comments
 (0)