Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial module setup #1

Merged
merged 4 commits into from
Sep 18, 2024
Merged

Initial module setup #1

merged 4 commits into from
Sep 18, 2024

Conversation

benjaminlukeclark
Copy link
Member

Initial setup of the module, see the README for more details.

@sudoblark-bot
Copy link
Member

Terraform plan in examples/step_function

Plan: 7 to add, 0 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+   create

Terraform will perform the following actions:

  # module.step_function.module.step_function_state_machine["hello-world"].aws_cloudwatch_log_group.sfn[0] will be created
+   resource "aws_cloudwatch_log_group" "sfn" {
+       arn               = (known after apply)
+       id                = (known after apply)
+       log_group_class   = (known after apply)
+       name              = "/aws/vendedlogs/states/prod-demo-app-hello-world-stepfunction"
+       name_prefix       = (known after apply)
+       retention_in_days = 90
+       skip_destroy      = false
+       tags_all          = (known after apply)
    }

  # module.step_function.module.step_function_state_machine["hello-world"].aws_iam_policy.logs[0] will be created
+   resource "aws_iam_policy" "logs" {
+       arn              = (known after apply)
+       attachment_count = (known after apply)
+       id               = (known after apply)
+       name             = "prod-demo-app-hello-world-stepfunction-logs"
+       name_prefix      = (known after apply)
+       path             = "/"
+       policy           = jsonencode(
            {
+               Statement = [
+                   {
+                       Action   = [
+                           "logs:UpdateLogDelivery",
+                           "logs:PutResourcePolicy",
+                           "logs:ListLogDeliveries",
+                           "logs:GetLogDelivery",
+                           "logs:DescribeResourcePolicies",
+                           "logs:DescribeLogGroups",
+                           "logs:DeleteLogDelivery",
+                           "logs:CreateLogDelivery",
                        ]
+                       Effect   = "Allow"
+                       Resource = "*"
                    },
                ]
+               Version   = "2012-10-17"
            }
        )
+       policy_id        = (known after apply)
+       tags_all         = (known after apply)
    }

  # module.step_function.module.step_function_state_machine["hello-world"].aws_iam_policy.service["stepfunction_Sync"] will be created
+   resource "aws_iam_policy" "service" {
+       arn              = (known after apply)
+       attachment_count = (known after apply)
+       id               = (known after apply)
+       name             = "prod-demo-app-hello-world-stepfunction-stepfunction_Sync"
+       name_prefix      = (known after apply)
+       path             = "/"
+       policy           = jsonencode(
            {
+               Statement = [
+                   {
+                       Action   = [
+                           "events:PutTargets",
+                           "events:PutRule",
+                           "events:DescribeRule",
                        ]
+                       Effect   = "Allow"
+                       Resource = "arn:aws:events:eu-west-2:741139166799:rule/StepFunctionsGetEventsForStepFunctionsExecutionRule"
+                       Sid      = "stepfunctionSyncEvents"
                    },
                ]
+               Version   = "2012-10-17"
            }
        )
+       policy_id        = (known after apply)
+       tags_all         = (known after apply)
    }

  # module.step_function.module.step_function_state_machine["hello-world"].aws_iam_policy_attachment.logs[0] will be created
+   resource "aws_iam_policy_attachment" "logs" {
+       id         = (known after apply)
+       name       = "prod-demo-app-hello-world-stepfunction-logs"
+       policy_arn = (known after apply)
+       roles      = [
+           "prod-demo-app-hello-world-stepfunction",
        ]
    }

  # module.step_function.module.step_function_state_machine["hello-world"].aws_iam_policy_attachment.service["stepfunction_Sync"] will be created
+   resource "aws_iam_policy_attachment" "service" {
+       id         = (known after apply)
+       name       = "prod-demo-app-hello-world-stepfunction-stepfunction_Sync"
+       policy_arn = (known after apply)
+       roles      = [
+           "prod-demo-app-hello-world-stepfunction",
        ]
    }

  # module.step_function.module.step_function_state_machine["hello-world"].aws_iam_role.this[0] will be created
+   resource "aws_iam_role" "this" {
+       arn                   = (known after apply)
+       assume_role_policy    = jsonencode(
            {
+               Statement = [
+                   {
+                       Action    = "sts:AssumeRole"
+                       Effect    = "Allow"
+                       Principal = {
+                           Service = "states.eu-west-2.amazonaws.com"
                        }
                    },
                ]
+               Version   = "2012-10-17"
            }
        )
+       create_date           = (known after apply)
+       force_detach_policies = true
+       id                    = (known after apply)
+       managed_policy_arns   = (known after apply)
+       max_session_duration  = 3600
+       name                  = "prod-demo-app-hello-world-stepfunction"
+       name_prefix           = (known after apply)
+       path                  = "/"
+       tags_all              = (known after apply)
+       unique_id             = (known after apply)
    }

  # module.step_function.module.step_function_state_machine["hello-world"].aws_sfn_state_machine.this[0] will be created
+   resource "aws_sfn_state_machine" "this" {
+       arn                       = (known after apply)
+       creation_date             = (known after apply)
+       definition                = jsonencode(
            {
+               Comment = "A Hello World example of the Amazon States Language using an AWS Lambda Function"
+               StartAt = "HelloWorld"
+               States  = {
+                   HelloWorld = {
+                       End      = true
+                       Resource = "arn:aws:lambda:eu-west-2:741139166799:function:hello-world-function"
+                       Type     = "Task"
                    }
                }
            }
        )
+       description               = (known after apply)
+       id                        = (known after apply)
+       name                      = "prod-demo-app-hello-world-stepfunction"
+       name_prefix               = (known after apply)
+       publish                   = false
+       revision_id               = (known after apply)
+       role_arn                  = (known after apply)
+       state_machine_version_arn = (known after apply)
+       status                    = (known after apply)
+       tags                      = {
+           "Name" = "prod-demo-app-hello-world-stepfunction"
        }
+       tags_all                  = {
+           "Name" = "prod-demo-app-hello-world-stepfunction"
        }
+       type                      = "STANDARD"
+       version_description       = (known after apply)

+       logging_configuration {
+           include_execution_data = true
+           level                  = "ALL"
+           log_destination        = (known after apply)
        }

+       timeouts {}
    }

Plan: 7 to add, 0 to change, 0 to destroy.

📝 Plan generated in Terraform checks on pull request #3

@benjaminlukeclark benjaminlukeclark merged commit f3f4d28 into main Sep 18, 2024
5 checks passed
@benjaminlukeclark benjaminlukeclark deleted the feature/initial-setup branch September 18, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants