Resource: aws_msk_vpc_connection

Terraform resource for managing an AWS Managed Streaming for Kafka VPC Connection.

Example Usage

resource "aws_msk_vpc_connection" "test" {
  authentication     = "SASL_IAM"
  target_cluster_arn = "aws_msk_cluster.arn"
  vpc_id             = aws_vpc.test.id
  client_subnets     = aws_subnet.test[*].id
  security_groups    = [aws_security_group.test.id]
}

Argument Reference

The following arguments are required:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import MSK configurations using the configuration ARN. For example:

import {
  to = aws_msk_vpc_connection.example
  id = "arn:aws:kafka:eu-west-2:123456789012:vpc-connection/123456789012/example/38173259-79cd-4ee8-87f3-682ea6023f48-2"
}

Using terraform import, import MSK configurations using the configuration ARN. For example:

% terraform import aws_msk_vpc_connection.example arn:aws:kafka:eu-west-2:123456789012:vpc-connection/123456789012/example/38173259-79cd-4ee8-87f3-682ea6023f48-2