Skip to content

Commit

Permalink
Merge pull request #4 from schubergphilis/remove-sfn-logging
Browse files Browse the repository at this point in the history
fix: remove SFN logging
  • Loading branch information
wvanheerde authored Sep 11, 2024
2 parents 068441f + 03728a2 commit b77141d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ This module uses the integrated Lambda to abstract some of the more complex func
| [aws_api_gateway_stage.webhooks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_stage) | resource |
| [aws_api_gateway_usage_plan.webhooks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_usage_plan) | resource |
| [aws_api_gateway_usage_plan_key.webhooks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_usage_plan_key) | resource |
| [aws_cloudwatch_log_group.composition_start](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_cloudwatch_log_group.composition_stop](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_cloudwatch_log_group.webhooks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_scheduler_schedule.rds_cluster_backup_start](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/scheduler_schedule) | resource |
| [aws_scheduler_schedule.rds_cluster_backup_stop](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/scheduler_schedule) | resource |
Expand Down
28 changes: 2 additions & 26 deletions step_functions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,9 @@ data "aws_caller_identity" "current" {}

data "aws_region" "current" {}

resource "aws_cloudwatch_log_group" "composition_start" {
name = "sfn-composition-scheduler-start-${var.composition_name}"
kms_key_id = var.kms_key_arn
retention_in_days = 365
tags = var.tags
}

resource "aws_sfn_state_machine" "composition_start" {
#checkov:skip=CKV_AWS_284
#checkov:skip=CKV_AWS_285:Logging is only valid for express workflows
name = "composition-scheduler-start-${var.composition_name}"
role_arn = module.step_functions_role.arn
tags = var.tags
Expand All @@ -61,23 +55,11 @@ resource "aws_sfn_state_machine" "composition_start" {
composition_name = var.composition_name
states = jsonencode(local.start_composition_states)
})

logging_configuration {
include_execution_data = true
level = "ALL"
log_destination = "${aws_cloudwatch_log_group.composition_start.arn}:*"
}
}

resource "aws_cloudwatch_log_group" "composition_stop" {
name = "sfn-composition-scheduler-stop-${var.composition_name}"
kms_key_id = var.kms_key_arn
retention_in_days = 365
tags = var.tags
}

resource "aws_sfn_state_machine" "composition_stop" {
#checkov:skip=CKV_AWS_284
#checkov:skip=CKV_AWS_285:Logging is only valid for express workflows
name = "composition-scheduler-stop-${var.composition_name}"
role_arn = module.step_functions_role.arn
tags = var.tags
Expand All @@ -86,10 +68,4 @@ resource "aws_sfn_state_machine" "composition_stop" {
composition_name = var.composition_name
states = jsonencode(local.stop_composition_states)
})

logging_configuration {
include_execution_data = true
level = "ALL"
log_destination = "${aws_cloudwatch_log_group.composition_stop.arn}:*"
}
}

0 comments on commit b77141d

Please sign in to comment.