{"id":15434995,"url":"https://github.com/tomoki171923/terraform-aws-step-functions","last_synced_at":"2026-01-04T16:54:11.863Z","repository":{"id":40411922,"uuid":"506603870","full_name":"tomoki171923/terraform-aws-step-functions","owner":"tomoki171923","description":"Terraform module, which creates step-functions resources.","archived":false,"fork":false,"pushed_at":"2023-12-15T11:50:12.000Z","size":78,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2024-10-18T09:13:51.793Z","etag":null,"topics":["state-machine","step-functions","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/tomoki171923/step-functions/aws/latest","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomoki171923.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-23T10:59:31.000Z","updated_at":"2023-04-19T13:22:24.000Z","dependencies_parsed_at":"2024-10-21T20:05:08.374Z","dependency_job_id":null,"html_url":"https://github.com/tomoki171923/terraform-aws-step-functions","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":"0.032258064516129004","last_synced_commit":"4fbe465f1acea97abd2f9fc4e8f801494125f13f"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":"tomoki171923/template-repository-terraform-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomoki171923%2Fterraform-aws-step-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomoki171923%2Fterraform-aws-step-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomoki171923%2Fterraform-aws-step-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomoki171923%2Fterraform-aws-step-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomoki171923","download_url":"https://codeload.github.com/tomoki171923/terraform-aws-step-functions/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244958761,"owners_count":20538619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["state-machine","step-functions","terraform","terraform-module"],"created_at":"2024-10-01T18:42:05.780Z","updated_at":"2026-01-04T16:54:11.822Z","avatar_url":"https://github.com/tomoki171923.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws-step-functions\n\nTerraform module, which creates step-functions resources.\n\n[Terraform Registry](https://registry.terraform.io/modules/tomoki171923/step-functions/aws/latest)\n\n## Usage\n\n```terraform\nlocals {\n  state_machine_name = \"example\"\n}\ndata \"aws_sns_topic\" \"this\" {\n  name = \"alarm_name\"\n}\ndata \"aws_lambda_alias\" \"this\" {\n  function_name = \"function_name\"\n  name          = \"prod\"\n}\n\nmodule \"state_machine\" {\n  source  = \"tomoki171923/step-functions/aws\"\n  version = \"0.1.1\"\n  state_machine_name    = local.state_machine_name\n  timedout_sns_topic_arn = data.aws_sns_topic.this.arn\n  failed_sns_topic_arn  = data.aws_sns_topic.this.arn\n  tags = {\n    Terraform   = true\n    Environment = \"dev\"\n  }\n  event_params = [\n    {\n      name                = \"${local.state_machine_name}_execution\"\n      description         = \"execute ${local.state_machine_name} state machine.\"\n      input               = \u003c\u003cEOF\n{\n  \"index\": 0\n}\nEOF\n      schedule_expression = \"rate(1 day)\"\n    }\n  ]\n  state_machine_definition = \u003c\u003cEOF\n{\n  \"Comment\": \"Example State Machine\",\n  \"TimeoutSeconds\": 60,\n  \"StartAt\": \"FunctionExample\",\n  \"States\": {\n    \"FunctionExample\": {\n      \"Type\": \"Task\",\n      \"Comment\": \"Lambda Function: Example\",\n      \"InputPath\": \"$\",\n      \"Resource\": \"${data.aws_lambda_alias.this.arn}\",\n      \"ResultPath\": \"$\",\n      \"Next\": \"CheckCompletion\",\n      \"Catch\": [\n        {\n          \"ErrorEquals\": [\"States.ALL\"],\n          \"Next\": \"Fail\"\n        }\n      ]\n    },\n    \"CheckCompletion\": {\n      \"Type\": \"Choice\",\n      \"Choices\": [\n        {\n          \"Variable\": \"$.isCompleted\",\n          \"BooleanEquals\": true,\n          \"Next\": \"Succeed\"\n        },\n        {\n          \"Variable\": \"$.isCompleted\",\n          \"BooleanEquals\": false,\n          \"Next\": \"Wait\"\n        }\n      ],\n      \"Default\": \"Fail\"\n    },\n    \"Wait\": {\n      \"Type\": \"Wait\",\n      \"Comment\": \"Waiting\",\n      \"Seconds\": 5,\n      \"Next\": \"FunctionExample\"\n    },\n    \"Succeed\": {\n      \"Type\": \"Succeed\",\n      \"Comment\": \"Succeed State.\"\n    },\n    \"Fail\": {\n      \"Type\": \"Fail\",\n      \"Comment\": \"Fail State.\",\n      \"Error\": \"STATE MACHINE ERROR: ${local.state_machine_name}\",\n      \"Cause\": \"Caused By Message.\"\n    }\n  }\n}\nEOF\n}\n\n```\n\n## Examples\n\n* [basic](https://github.com/tomoki171923/terraform-aws-step-functions/tree/main/examples/basic/)\n\n## Requirements\n\n| Name      | Version |\n| --------- | ------- |\n| terraform | \u003e= 1.0  |\n| aws       | ~\u003e 4.19 |\n\n## Providers\n\n| Name | Version |\n| ---- | ------- |\n| aws  | ~\u003e 4.19 |\n\n## Inputs\n\n| Name                                | Description                                                                                                                                                                                                                                                                                    | Type                                                                                                                           | Default      | Required |\n| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------ | :------: |\n| state_machine_name                  | state machine name                                                                                                                                                                                                                                                                             | `string` | ``           |   yes    |\n| state_machine_type                  | Determines whether a Standard or Express state machine is created. The default is STANDARD.                                                                                                                                                                                                    | `string` | `\"STANDARD\"` |   yes    |\n| state_machine_definition            | The Amazon States Language definition of the state machine. See [official](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html) for details.                                                                                                             | `string` | ``           |   yes    |\n| state_machine_additional_policies   | additional iam policies for state machine.                                                                                                                                                                                                                                                     | `list(string)` | `[]` |    no    |\n| state_machine_log_level             | Defines which category of execution history events are logged. Valid values: ALL, ERROR, FATAL, OFF.                                                                                                                                                                                           | `string` | `\"ALL\"` |    no    |\n| state_machine_log_retention_in_days | Specifies the number of days you want to retain state machine 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, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. | `number` | `120` |    no    |\n| timedout_sns_topic_arn              | SNS Topic ARN when state machine's state is timedout.                                                                                                                                                                                                                                          | `string` | null         |    no    |\n| failed_sns_topic_arn                | SNS Topic ARN when state machine's state is failed.                                                                                                                                                                                                                                            | `string` | null         |    no    |\n| succeeded_sns_topic_arn             | SNS Topic ARN when state machine's state is succeeded.                                                                                                                                                                                                                                         | `string` | null         |    no    |\n| event_params                        | event bridge parameters. name: event name, description: event description, input: input data to event, schedule_expression: schedule expression.                                                                                                                                               | \u003cpre\u003elist(object({\u003cbr\u003e name = string\u003cbr\u003e description = string\u003cbr\u003e input = string\u003cbr\u003e schedule_expression = string\u003cbr\u003e}))\u003c/pre\u003e | null         |    no    |\n| tags                                | A map of tags to assign to resources.                                                                                                                                                                                                                                                          | \u003cpre\u003emap(string)\u003c/pre\u003e                                                                                                         | {}           |    no    |\n\n## Outputs\n\n| Name                        | Description                                                                                                                                                                   |\n| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| aws_sfn_state_machine       | Provides a Step Function State Machine resource. See [official](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sfn_state_machine) for details.   |\n| aws_iam_policy              | Provides an IAM policy. See [official](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) for details.                                   |\n| aws_iam_role                | Provides an IAM Role. See [official](https://registry.terraform.io/modules/terraform-aws-modules/iam/aws/latest/submodules/iam-assumable-role) for details.                   |\n| aws_cloudwatch_metric_alarm | Provides a CloudWatch Metric Alarm resource. See [official](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm) for details. |\n| events                      | Provides an EventBridge Rule resource and others. See [the module](https://github.com/tomoki171923/terraform-aws-step-functions/tree/main/modules/events/) for details.       |\n\n## Authors\n\nModule managed by [tomoki171923](https://github.com/tomoki171923).\n\n## License\n\nMIT Licensed. See LICENSE for full details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomoki171923%2Fterraform-aws-step-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomoki171923%2Fterraform-aws-step-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomoki171923%2Fterraform-aws-step-functions/lists"}