DEV Community

Cover image for IaC Security Scanner - Generative AI app with PartyRock
selvakumar palanisamy
selvakumar palanisamy

Posted on

IaC Security Scanner - Generative AI app with PartyRock

Infrastructure-as-code (IaC) release security is growing in importance because to the speed at which the digital world is developing. By meeting this important requirement, the AI-Powered IaC Security Scanner indicates a substantial advancement in the field of IaC security.

The IaC Security Scanner with AI Powered is not a simple tool to use. It has native support for numerous IaC systems, such as Kubernetes, Terraform, and AWS CloudFormation. As a result, your IaC installations are safe across all platforms and support a wide range of compatibilities.

Key Features of AI-Powered IaC Security Scanner

  1. In-Depth Vulnerability Assessment
  2. Compliance with Industry Standards
  3. User-Friendly Interface

All you need to do is visit the Party Rock Website to sign up, and the magic happens in mere seconds.

Step #1 : Sign In

Image description

Step #2 : Write your Prompt with your Idea

Image description

Generated App

Image description

Test the app with sample Terraform code

Image description

Published App : https://partyrock.aws/u/selvapal/UI-aMM_I3/IaC-Security-Scan-App

Sample code used for testing

resource "aws_cloudwatch_log_group" "cloudwatch_log_group" {
  name = "msk_cluster_cloudwatch_group-${random_uuid.randuuid.result}"
}

resource "aws_msk_configuration" "msk_cluster_config" {
  kafka_versions = [var.msk_cluster_version]
  name           = "msk-${lower(var.environment)}-cluster-cfg-${random_uuid.randuuid.result}"
  server_properties = <<PROPERTIES
auto.create.topics.enable = true
delete.topic.enable = true
PROPERTIES
}

resource "aws_msk_cluster" "msk_cluster" {
  count                  = length(var.private_subnet_cidrs)
  cluster_name           = "msk-${lower(var.environment)}-cluster-${random_uuid.randuuid.result}"
  kafka_version          = var.msk_cluster_version
  number_of_broker_nodes = var.broker_nodes

  broker_node_group_info {
    instance_type   = var.msk_cluster_instance_type
    ebs_volume_size = var.msk_ebs_volume_size
    client_subnets = [
      "${aws_subnet.private_subnet.0.id}",
      "${aws_subnet.private_subnet.1.id}",
      "${aws_subnet.private_subnet.2.id}"
    ]
    security_groups = [aws_security_group.KafkaClusterSG.id]
  }

  /*
  client_authentication {
    tls {
      certificate_authority_arns = [aws_acmpca_certificate_authority.pca.arn]
    }
  }
*/

configuration_info {
  arn = aws_msk_configuration.msk_cluster_config.arn
  revision = 1
}
  encryption_info {
    encryption_in_transit {
      client_broker = var.encryption_type
    }
  }

  enhanced_monitoring = var.monitoring_type

  logging_info {
    broker_logs {
      cloudwatch_logs {
        enabled   = true
        log_group = aws_cloudwatch_log_group.cloudwatch_log_group.name
      }
    }
  }

  tags = merge(
    local.common-tags,
    map(
      "Name", "msk-${lower(var.environment)}-cluster"
    )
  )
}

output "zookeeper_connect_string" {
  value = aws_msk_cluster.msk_cluster.*.zookeeper_connect_string
}

output "bootstrap_brokers" {
  description = "Plaintext connection host:port pairs"
  value       = aws_msk_cluster.msk_cluster.*.bootstrap_brokers
}

output "bootstrap_brokers_tls" {
  description = "TLS connection host:port pairs"
  value       = aws_msk_cluster.msk_cluster.*.bootstrap_brokers_tls
}

Enter fullscreen mode Exit fullscreen mode

Top comments (0)