AWS Amazon MSK Cluster

This page shows how to write Terraform and CloudFormation for Amazon MSK Cluster and write them securely.

code-icon

Fix issues in your cloud & app configurations

Test for misconfigurations of this resource in your cloud.

get-started-button

Terraform Example (aws_msk_cluster)

Manages AWS Managed Streaming for Kafka cluster

Parameters

Example Usage (from GitHub)

github-iconsnyk-labs/infrastructure-as-code-goof
resource "aws_msk_cluster" "allowed" {
  logging_info {
    broker_logs {
      cloudwatch_logs {
        enabled = true
      }
github-iconleonidweinbergcx/mykics
resource "aws_msk_cluster" "positive1" {
  cluster_name           = "example"
  kafka_version          = "2.4.1"
  number_of_broker_nodes = 3
}

github-iconleonidweinbergcx/mykics
resource "aws_msk_cluster" "negative1" {
  encryption_info {
    encryption_at_rest_kms_key_arn = aws_kms_key.kms.arn
  }
}

github-iconSonarSource/sonar-iac
resource "aws_msk_cluster" "sensitive_data_cluster_1" {
  encryption_info {
    encryption_in_transit {
      client_broker = "PLAINTEXT" # Noncompliant
    }
  }
github-iconSonarSource/sonar-iac
resource "aws_msk_cluster" "sensitive_msk" {
  cluster_name = "sensitive_msk"
}

resource "aws_msk_cluster" "sensitive_msk" {
  cluster_name = "sensitive_msk"

CloudFormation Example (AWS::MSK::Cluster)

The AWS::MSK::Cluster resource creates an Amazon MSK cluster. For more information, see What Is Amazon MSK? in the Amazon MSK Developer Guide.

Parameters

Frequently asked questions

What is AWS Amazon MSK Cluster?

AWS Amazon MSK Cluster is a resource for Amazon MSK of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon MSK Cluster?

For Terraform, the snyk-labs/infrastructure-as-code-goof, leonidweinbergcx/mykics and leonidweinbergcx/mykics source code examples are useful. See the Terraform Example section for further details.