Skip to content

Commit

Permalink
counts
Browse files Browse the repository at this point in the history
  • Loading branch information
timburke-hackit committed Nov 6, 2023
1 parent edb04f6 commit a7f728c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion terraform/core/13-mssql-ingestion.tf
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ data "aws_iam_policy_document" "step_functions_assume_role_policy" {
}

data "aws_iam_policy_document" "academy_step_functions_policy" {
count = local.academy_state_machine_count
statement {
actions = [
"logs:CreateLogDelivery",
Expand Down Expand Up @@ -384,7 +385,7 @@ resource "aws_cloudwatch_event_rule" "academy_state_machine_trigger" {
tags = module.tags.values
description = "Trigger the Academy State Machine every weekday at 1am"
schedule_expression = "cron(0 1 ? * MON-FRI *)"
is_enabled = true
is_enabled = local.is_production_environment ? true : false
role_arn = aws_iam_role.academy_cloudwatch_execution_role[0].arn
}

Expand Down Expand Up @@ -418,6 +419,7 @@ data "aws_iam_policy_document" "cloudwatch_assume_role_policy" {
}

data "aws_iam_policy_document" "cloudwatch_execution_policy" {
count = local.academy_state_machine_count
statement {
actions = [
"states:StartExecution"
Expand Down

0 comments on commit a7f728c

Please sign in to comment.