title: AWS eventbridge rule doesn't trigger step function during terraform deployment
body: <p>I have some terraform code to deploy a cloudwatch/eventbridge rule that triggers a step function. I want the rule to trigger the step function after every 2 minutes as indicated in the code below:</p>
  <pre><code>resource &quot;aws_iam_role&quot; &quot;cw_sfn_role&quot; {
    name               = &quot;cw_sfn_role&quot;
    assume_role_policy = data.aws_iam_policy_document.sfn_trigger_policy.json
  }
  
  data &quot;aws_iam_policy_document&quot; &quot;sfn_trigger_policy&quot; {
    statement {
      actions = [
        &quot;sts:AssumeRole&quot;
      ]
  
      principals {
        type = &quot;Service&quot;
        identifiers = [&quot;states.amazonaws.com&quot;,
        &quot;events.amazonaws.com&quot;]
      }
  
  
    }
  }
  
  resource &quot;aws_cloudwatch_event_rule&quot; &quot;step_function_trigger_event_rule&quot; {
    name                = &quot;trigger-step-function&quot;
    description         = &quot;Trigger every 2 min&quot;
    schedule_expression = &quot;rate(2 minutes)&quot;
    is_enabled          = true
  }
  
  
  resource &quot;aws_cloudwatch_event_target&quot; &quot;step_function_target&quot; {
    arn      = aws_sfn_state_machine.sfn_state_machine.arn
    rule     = aws_cloudwatch_event_rule.step_function_trigger_event_rule.name
    role_arn = aws_iam_role.cw_sfn_role.arn
  }
  
  </code></pre>
  <p>From the aws console, the rule is attached correctly to the step function but it doesn't trigger it. Also, when i manually create a rule from the aws console, the step function is triggered without any issues. I suspect the problem is either from my assigned policies or <code>schedule_expression</code>. What am I missing here?</p>