You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-11Lines changed: 16 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,16 @@ Terraform module, which creates AWS Step Functions as well as required IAM role
4
4
5
5
This Terraform module is the part of [serverless.tf framework](https://github.com/antonbabenko/serverless.tf), which aims to simplify all operations when working with the serverless in Terraform.
6
6
7
-
8
7
## Features
9
8
10
9
-[x] Creates AWS Step Function
11
10
-[x] Conditional creation for many types of resources
12
11
-[x] Support IAM policy attachments for [Integrated Services (eg, Lambda, SQS, ECS, EKS, Batch, DynamoDB, etc)](https://docs.aws.amazon.com/step-functions/latest/dg/service-integration-iam-templates.html) and various ways to create and attach additional policies
sqs = "arn:aws:sqs:..." # sqs queue ARN is required because there is no default_resources key for such integration
81
79
}
82
-
80
+
83
81
# Special case to deny all actions for the step function (this will override all IAM policies allowed for the function)
84
82
no_tasks = {
85
83
deny_all = true
@@ -88,7 +86,6 @@ module "step_function" {
88
86
}
89
87
```
90
88
91
-
92
89
## Additional IAM policies for Step Function
93
90
94
91
In addition to all supported AWS service integrations you may want to create and attach additional policies.
@@ -101,7 +98,6 @@ There are 5 supported ways to attach additional IAM policies to IAM role used by
101
98
1.`policies` - List of ARNs of existing IAM policies, when `attach_policies = true` and `number_of_policies > 0`.
102
99
1.`policy_statements` - Map of maps to define IAM statements which will be generated as IAM policy. Requires `attach_policy_statements = true`. See `examples/complete` for more information.
103
100
104
-
105
101
## Conditional creation
106
102
107
103
Sometimes you need to have a way to create resources conditionally, so the solution is to specify `create` arguments.
@@ -117,11 +113,9 @@ module "step_function" {
117
113
}
118
114
```
119
115
120
-
121
116
## Examples
122
117
123
-
*[Complete](https://github.com/terraform-aws-modules/terraform-aws-step-functions/tree/master/examples/complete) - Create Step Function and required IAM resources in various combinations with all supported features.
124
-
118
+
-[Complete](https://github.com/terraform-aws-modules/terraform-aws-step-functions/tree/master/examples/complete) - Create Step Function and required IAM resources in various combinations with all supported features.
125
119
126
120
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
|[aws_cloudwatch_log_group.sfn](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/cloudwatch_log_group)| data source |
160
158
|[aws_iam_policy_document.additional_inline](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
161
159
|[aws_iam_policy_document.assume_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
160
+
|[aws_iam_policy_document.logs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
162
161
|[aws_iam_policy_document.service](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
163
162
|[aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region)| data source |
164
163
165
164
## Inputs
166
165
167
166
| Name | Description | Type | Default | Required |
| <aname="input_attach_cloudwatch_logs_policy"></a> [attach\_cloudwatch\_logs\_policy](#input\_attach\_cloudwatch\_logs\_policy)| Controls whether CloudWatch Logs policy should be added to IAM role for Lambda Function |`bool`|`true`| no |
169
169
| <aname="input_attach_policies"></a> [attach\_policies](#input\_attach\_policies)| Controls whether list of policies should be added to IAM role |`bool`|`false`| no |
170
170
| <aname="input_attach_policies_for_integrations"></a> [attach\_policies\_for\_integrations](#input\_attach\_policies\_for\_integrations)| Whether to attach AWS Service policies to IAM role |`bool`|`true`| no |
171
171
| <aname="input_attach_policy"></a> [attach\_policy](#input\_attach\_policy)| Controls whether policy should be added to IAM role |`bool`|`false`| no |
172
172
| <aname="input_attach_policy_json"></a> [attach\_policy\_json](#input\_attach\_policy\_json)| Controls whether policy\_json should be added to IAM role |`bool`|`false`| no |
173
173
| <aname="input_attach_policy_jsons"></a> [attach\_policy\_jsons](#input\_attach\_policy\_jsons)| Controls whether policy\_jsons should be added to IAM role |`bool`|`false`| no |
174
174
| <aname="input_attach_policy_statements"></a> [attach\_policy\_statements](#input\_attach\_policy\_statements)| Controls whether policy\_statements should be added to IAM role |`bool`|`false`| no |
175
175
| <aname="input_aws_region_assume_role"></a> [aws\_region\_assume\_role](#input\_aws\_region\_assume\_role)| Name of AWS regions where IAM role can be assumed by the Step Function |`string`|`""`| no |
176
+
| <aname="input_cloudwatch_log_group_kms_key_id"></a> [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id)| The ARN of the KMS Key to use when encrypting log data. |`string`|`null`| no |
177
+
| <aname="input_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#input\_cloudwatch\_log\_group\_name)| Name of Cloudwatch Logs group name to use. |`string`|`null`| no |
178
+
| <aname="input_cloudwatch_log_group_retention_in_days"></a> [cloudwatch\_log\_group\_retention\_in\_days](#input\_cloudwatch\_log\_group\_retention\_in\_days)| Specifies the number of days you want to retain log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. |`number`|`null`| no |
179
+
| <aname="input_cloudwatch_log_group_tags"></a> [cloudwatch\_log\_group\_tags](#input\_cloudwatch\_log\_group\_tags)| A map of tags to assign to the resource. |`map(string)`|`{}`| no |
176
180
| <aname="input_create"></a> [create](#input\_create)| Whether to create Step Function resource |`bool`|`true`| no |
177
181
| <aname="input_create_role"></a> [create\_role](#input\_create\_role)| Whether to create IAM role for the Step Function |`bool`|`true`| no |
178
182
| <aname="input_definition"></a> [definition](#input\_definition)| The Amazon States Language definition of the Step Function |`string`|`""`| no |
183
+
| <aname="input_logging_configuration"></a> [logging\_configuration](#input\_logging\_configuration)| Defines what execution history events are logged and where they are logged |`map(string)`|`{}`| no |
179
184
| <aname="input_name"></a> [name](#input\_name)| The name of the Step Function |`string`|`""`| no |
180
185
| <aname="input_number_of_policies"></a> [number\_of\_policies](#input\_number\_of\_policies)| Number of policies to attach to IAM role |`number`|`0`| no |
181
186
| <aname="input_number_of_policy_jsons"></a> [number\_of\_policy\_jsons](#input\_number\_of\_policy\_jsons)| Number of policies JSON to attach to IAM role |`number`|`0`| no |
@@ -195,6 +200,7 @@ No modules.
195
200
| <aname="input_tags"></a> [tags](#input\_tags)| Maps of tags to assign to the Step Function |`map(string)`|`{}`| no |
196
201
| <aname="input_trusted_entities"></a> [trusted\_entities](#input\_trusted\_entities)| Step Function additional trusted entities for assuming roles (trust relationship) |`list(string)`|`[]`| no |
197
202
| <aname="input_type"></a> [type](#input\_type)| Determines whether a Standard or Express state machine is created. The default is STANDARD. Valid Values: STANDARD \| EXPRESS |`string`|`"STANDARD"`| no |
203
+
| <aname="input_use_existing_cloudwatch_log_group"></a> [use\_existing\_cloudwatch\_log\_group](#input\_use\_existing\_cloudwatch\_log\_group)| Whether to use an existing CloudWatch log group or create new |`bool`|`false`| no |
198
204
| <aname="input_use_existing_role"></a> [use\_existing\_role](#input\_use\_existing\_role)| Whether to use an existing IAM role for this Step Function |`bool`|`false`| no |
199
205
200
206
## Outputs
@@ -215,7 +221,6 @@ Module managed by [Anton Babenko](https://github.com/antonbabenko). Check out [s
215
221
216
222
Please reach out to [Betajob](https://www.betajob.com/) if you are looking for commercial support for your Terraform, AWS, or serverless project.
description="Specifies the number of days you want to retain log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653."
82
+
type=number
83
+
default=null
84
+
}
85
+
86
+
variable"cloudwatch_log_group_kms_key_id" {
87
+
description="The ARN of the KMS Key to use when encrypting log data."
88
+
type=string
89
+
default=null
90
+
}
91
+
92
+
variable"cloudwatch_log_group_tags" {
93
+
description="A map of tags to assign to the resource."
94
+
type=map(string)
95
+
default={}
96
+
}
97
+
98
+
variable"attach_cloudwatch_logs_policy" {
99
+
description="Controls whether CloudWatch Logs policy should be added to IAM role for Lambda Function"
0 commit comments