AWS Amazon MSK Configuration
This page shows how to write Terraform and CloudFormation for Amazon MSK Configuration and write them securely.
aws_msk_configuration (Terraform)
The Configuration in Amazon MSK can be configured in Terraform with the resource name aws_msk_configuration
. The following sections describe 4 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_msk_configuration" "vf-msk-config" {
kafka_versions = ["2.2.1"]
name = format("vf-%s-%s-kafka-configuration", var.account_environment, var.vf_region)
server_properties = <<PROPERTIES
auto.create.topics.enable=true
resource "aws_msk_configuration" "main_config" {
kafka_versions = ["2.6.1"]
name = "main-config"
server_properties = <<PROP
auto.create.topics.enable = true
resource "aws_msk_configuration" "main_config" {
kafka_versions = ["2.6.1"]
name = "main-config"
server_properties = <<PROP
auto.create.topics.enable = true
resource "aws_msk_configuration" "msk_gg_demo_conf" {
kafka_versions = ["2.6.1"]
name = "msk-ggdemo-conf"
server_properties = <<PROPERTIES
auto.create.topics.enable=true
Parameters
-
arn
optional computed - string -
description
optional - string -
id
optional computed - string -
kafka_versions
required - set of string -
latest_revision
optional computed - number -
name
required - string -
server_properties
required - string
Explanation in Terraform Registry
Manages an Amazon Managed Streaming for Kafka configuration. More information can be found on the MSK Developer Guide.
AWS::MSK::Cluster ConfigurationInfo (CloudFormation)
The Cluster ConfigurationInfo in MSK can be configured in CloudFormation with the resource name AWS::MSK::Cluster ConfigurationInfo
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
Arn
The Amazon Resource Name (ARN) of the MSK configuration to use. For example, arn:aws:kafka:us-east-1:123456789012:configuration/example-configuration-name/abcdabcd-1234-abcd-1234-abcd123e8e8e-1
.
Required: Yes
Type: String
Update requires: No interruption
Revision
The revision of the Amazon MSK configuration to use.
Required: Yes
Type: Integer
Update requires: No interruption
Explanation in CloudFormation Registry
Specifies the Amazon MSK configuration to use for the brokers.
Frequently asked questions
What is AWS Amazon MSK Configuration?
AWS Amazon MSK Configuration 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 Configuration?
For Terraform, the shubhamnegi1/test-jenky, zerosoftwere/terraform-ecs-msk-ssm-demo and zerosoftwere/aws-msk-demo source code examples are useful. See the Terraform Example section for further details.