class_docstr: CLI Terraform Generate, Rules Engine
class_docstr_tok: ["CLI","Terraform","Generate",",","Rules","Engine"]
docstr: CLI - Terraform Generate, Rules Engine
docstr_tok: ["CLI","-","Terraform","Generate",",","Rules","Engine"]
code: def test_generate_rules_engine(self):
      """CLI - Terraform Generate, Rules Engine"""
      result = rules_engine.generate_rules_engine(self.config)
  
      expected_result = {
          "module": {
              "rules_engine_iam": {
                  "source": "./modules/tf_rules_engine",
                  "account_id": "123456789012",
                  "region": "us-east-1",
                  "prefix": "unit-test",
                  "function_alias_arn": "${module.rules_engine_lambda.function_alias_arn}",
                  "function_name": "${module.rules_engine_lambda.function_name}",
                  "function_role_id": "${module.rules_engine_lambda.role_id}",
                  "threat_intel_enabled": self.config["threat_intel"][
                      "enabled"
                  ],
                  "dynamodb_table_name": self.config["threat_intel"][
                      "dynamodb_table_name"
                  ],
                  "rules_table_arn": "${module.globals.rules_table_arn}",
                  "enable_rule_staging": False,
                  "classifier_sqs_queue_arn": "${module.globals.classifier_sqs_queue_arn}",
                  "classifier_sqs_sse_kms_key_arn": (
                      "${module.globals.classifier_sqs_sse_kms_key_arn}"
                  ),
                  "sqs_record_batch_size": 10,
              },
              "rules_engine_lambda": {
                  "alarm_actions": [
                      "arn:aws:sns:us-east-1:123456789012:test_topic"
                  ],
                  "description": "Unit-Test Streamalert Rules Engine",
                  "environment_variables": {
                      "ALERTS_TABLE": "unit-test_streamalert_alerts",
                      "ENABLE_METRICS": "0",
                      "LOGGER_LEVEL": "info",
                      "STREAMALERT_PREFIX": "unit-test",
                  },
                  "tags": {},
                  "errors_alarm_enabled": True,
                  "errors_alarm_evaluation_periods": 1,
                  "errors_alarm_period_secs": 120,
                  "errors_alarm_threshold": 0,
                  "function_name": "unit-test_streamalert_rules_engine",
                  "handler": "streamalert.rules_engine.main.handler",
                  "log_retention_days": 14,
                  "memory_size_mb": 128,
                  "source": "./modules/tf_lambda",
                  "throttles_alarm_enabled": True,
                  "throttles_alarm_evaluation_periods": 1,
                  "throttles_alarm_period_secs": 120,
                  "throttles_alarm_threshold": 0,
                  "timeout_sec": 60,
                  "vpc_security_group_ids": [],
                  "vpc_subnet_ids": [],
              },
          }
      }
  
      assert_equal(result, expected_result)
  
imports: from nose.tools import assert_equal
  from streamalert_cli.terraform import rules_engine
label_desc: Use image node_id 2 for calling the TestTerraformGenerateRuleEngine obj's underlying member method code with example usage: obj.test_generate_rules_engine() without return types