class_docstr: Test class for the Terraform Cluster Generating
class_docstr_tok: ["Test","class","for","the","Terraform","Cluster","Generating"]
docstr: CLI - Terraform Generate Main with Firehose Enabled
docstr_tok: ["CLI","-","Terraform","Generate","Main","with","Firehose","Enabled"]
code: def test_generate_main_with_firehose(self):
      """CLI - Terraform Generate Main with Firehose Enabled"""
      self.config["global"]["infrastructure"]["firehose"] = {
          "enabled": True,
          "bucket_name": "my-data",
          "buffer_size": 10,
          "buffer_interval": 650,
          "enabled_logs": {"cloudwatch": {"enable_alarm": False}},
      }
      tf_main = generate.generate_main(config=self.config, init=False)
  
      generated_modules = tf_main["module"]
      expected_kinesis_modules = {
          "kinesis_firehose_setup",
          "kinesis_firehose_cloudwatch_test_match_types",
          "kinesis_firehose_cloudwatch_test_match_types_2",
      }
  
      assert_true(
          all(
              [
                  expected_module in generated_modules
                  for expected_module in expected_kinesis_modules
              ]
          )
      )
  
      assert_equal(
          generated_modules[
              "kinesis_firehose_cloudwatch_test_match_types"
          ]["s3_bucket_name"],
          "my-data",
      )
      assert_equal(
          generated_modules[
              "kinesis_firehose_cloudwatch_test_match_types"
          ]["buffer_size"],
          10,
      )
      assert_equal(
          generated_modules[
              "kinesis_firehose_cloudwatch_test_match_types"
          ]["buffer_interval"],
          650,
      )
  
imports: from mock import ANY, Mock, patch
  from nose.tools import assert_equal, assert_dict_equal, assert_false, assert_raises, assert_true
  from streamalert.shared.exceptions import ConfigError
  from streamalert_cli.config import CLIConfig
  from streamalert_cli.terraform import common, cloudtrail, cloudwatch_destinations, cloudwatch_events, flow_logs, generate
label_desc: Use image node_id 6 for calling the TestTerraformGenerate obj's underlying member method code with example usage: obj.test_generate_main_with_firehose() without return types