github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/aws/mq/enable_general_logging.tf.go (about)

     1  package mq
     2  
     3  var terraformEnableGeneralLoggingGoodExamples = []string{
     4  	`
     5   resource "aws_mq_broker" "good_example" {
     6     broker_name = "example"
     7   
     8     configuration {
     9       id       = aws_mq_configuration.test.id
    10       revision = aws_mq_configuration.test.latest_revision
    11     }
    12   
    13     engine_type        = "ActiveMQ"
    14     engine_version     = "5.15.0"
    15     host_instance_type = "mq.t2.micro"
    16     security_groups    = [aws_security_group.test.id]
    17   
    18     user {
    19       username = "ExampleUser"
    20       password = "MindTheGap"
    21     }
    22     logs {
    23       general = true
    24     }
    25   }
    26   `,
    27  }
    28  
    29  var terraformEnableGeneralLoggingBadExamples = []string{
    30  	`
    31   resource "aws_mq_broker" "bad_example" {
    32     broker_name = "example"
    33   
    34     configuration {
    35       id       = aws_mq_configuration.test.id
    36       revision = aws_mq_configuration.test.latest_revision
    37     }
    38   
    39     engine_type        = "ActiveMQ"
    40     engine_version     = "5.15.0"
    41     host_instance_type = "mq.t2.micro"
    42     security_groups    = [aws_security_group.test.id]
    43   
    44     user {
    45       username = "ExampleUser"
    46       password = "MindTheGap"
    47     }
    48     logs {
    49       general = false
    50     }
    51   }
    52   `,
    53  }
    54  
    55  var terraformEnableGeneralLoggingLinks = []string{
    56  	`https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/mq_broker#general`,
    57  }
    58  
    59  var terraformEnableGeneralLoggingRemediationMarkdown = ``