Module msk

@pulumi/aws > msk

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.

class Cluster

extends CustomResource

Manages AWS Managed Streaming for Kafka cluster

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const kms = new aws.kms.Key("kms", {
    description: "example",
});
const vpc = new aws.ec2.Vpc("vpc", {
    cidrBlock: "192.168.0.0/22",
});
const azs = pulumi.output(aws.getAvailabilityZones({
    state: "available",
}));
const sg = new aws.ec2.SecurityGroup("sg", {
    vpcId: vpc.id,
});
const subnetAz1 = new aws.ec2.Subnet("subnetAz1", {
    availabilityZone: azs.apply(azs => azs.names[0]),
    cidrBlock: "192.168.0.0/24",
    vpcId: vpc.id,
});
const subnetAz2 = new aws.ec2.Subnet("subnetAz2", {
    availabilityZone: azs.apply(azs => azs.names[1]),
    cidrBlock: "192.168.1.0/24",
    vpcId: vpc.id,
});
const subnetAz3 = new aws.ec2.Subnet("subnetAz3", {
    availabilityZone: azs.apply(azs => azs.names[2]),
    cidrBlock: "192.168.2.0/24",
    vpcId: vpc.id,
});
const example = new aws.msk.Cluster("example", {
    brokerNodeGroupInfo: {
        clientSubnets: [
            subnetAz1.id,
            subnetAz2.id,
            subnetAz3.id,
        ],
        ebsVolumeSize: 1000,
        instanceType: "kafka.m5.large",
        securityGroups: [sg.id],
    },
    clusterName: "example",
    encryptionInfo: {
        encryptionAtRestKmsKeyArn: kms.arn,
    },
    kafkaVersion: "2.1.0",
    numberOfBrokerNodes: 3,
    tags: {
        foo: "bar",
    },
});

export const bootstrapBrokers = example.bootstrapBrokers;
export const bootstrapBrokersTls = example.bootstrapBrokersTls;
export const zookeeperConnectString = example.zookeeperConnectString;

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/msk_cluster.html.markdown.

constructor

new Cluster(name: string, args: ClusterArgs, opts?: pulumi.CustomResourceOptions)

Create a Cluster resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ClusterState, opts?: pulumi.CustomResourceOptions): Cluster

Get an existing Cluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Cluster. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

Amazon Resource Name (ARN) of the MSK Configuration to use in the cluster.

property bootstrapBrokers

public bootstrapBrokers: pulumi.Output<string>;

A comma separated list of one or more hostname:port pairs of kafka brokers suitable to boostrap connectivity to the kafka cluster. Only contains value if clientBroker encryption in transit is set to PLAINTEXT or TLS_PLAINTEXT.

property bootstrapBrokersTls

public bootstrapBrokersTls: pulumi.Output<string>;

A comma separated list of one or more DNS names (or IPs) and TLS port pairs kafka brokers suitable to boostrap connectivity to the kafka cluster. Only contains value if clientBroker encryption in transit is set to TLS_PLAINTEXT or TLS.

property brokerNodeGroupInfo

public brokerNodeGroupInfo: pulumi.Output<{
    azDistribution: undefined | string;
    clientSubnets: string[];
    ebsVolumeSize: number;
    instanceType: string;
    securityGroups: string[];
}>;

Configuration block for the broker nodes of the Kafka cluster.

property clientAuthentication

public clientAuthentication: pulumi.Output<{
    tls: undefined | {
        certificateAuthorityArns: string[];
    };
} | undefined>;

Configuration block for specifying a client authentication. See below.

property clusterName

public clusterName: pulumi.Output<string>;

Name of the MSK cluster.

property configurationInfo

public configurationInfo: pulumi.Output<{
    arn: string;
    revision: number;
} | undefined>;

Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below.

property currentVersion

public currentVersion: pulumi.Output<string>;

Current version of the MSK Cluster used for updates, e.g. K13V1IB3VIYZZH * encryption_info.0.encryption_at_rest_kms_key_arn - The ARN of the KMS key used for encryption at rest of the broker data volumes.

property encryptionInfo

public encryptionInfo: pulumi.Output<{
    encryptionAtRestKmsKeyArn: string;
    encryptionInTransit: undefined | {
        clientBroker: undefined | string;
        inCluster: undefined | false | true;
    };
} | undefined>;

Configuration block for specifying encryption. See below.

property enhancedMonitoring

public enhancedMonitoring: pulumi.Output<string | undefined>;

Specify the desired enhanced MSK CloudWatch monitoring level. See Monitoring Amazon MSK with Amazon CloudWatch

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property kafkaVersion

public kafkaVersion: pulumi.Output<string>;

Specify the desired Kafka software version.

property numberOfBrokerNodes

public numberOfBrokerNodes: pulumi.Output<number>;

The desired total number of broker nodes in the kafka cluster. It must be a multiple of the number of specified client subnets.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A mapping of tags to assign to the resource

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property zookeeperConnectString

public zookeeperConnectString: pulumi.Output<string>;

A comma separated list of one or more IP:port pairs to use to connect to the Apache Zookeeper cluster.

class Configuration

extends CustomResource

Manages an Amazon Managed Streaming for Kafka configuration. More information can be found on the MSK Developer Guide.

NOTE: The API does not support deleting MSK configurations. Removing this resource will only remove the this provider state for it.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.msk.Configuration("example", {
    kafkaVersions: ["2.1.0"],
    serverProperties: `auto.create.topics.enable = true
delete.topic.enable = true
`,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/msk_configuration.html.markdown.

constructor

new Configuration(name: string, args: ConfigurationArgs, opts?: pulumi.CustomResourceOptions)

Create a Configuration resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ConfigurationState, opts?: pulumi.CustomResourceOptions): Configuration

Get an existing Configuration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Configuration. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

Amazon Resource Name (ARN) of the configuration.

property description

public description: pulumi.Output<string | undefined>;

Description of the configuration.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property kafkaVersions

public kafkaVersions: pulumi.Output<string[]>;

List of Apache Kafka versions which can use this configuration.

property latestRevision

public latestRevision: pulumi.Output<number>;

Latest revision of the configuration.

property name

public name: pulumi.Output<string>;

Name of the configuration.

property serverProperties

public serverProperties: pulumi.Output<string>;

Contents of the server.properties file. Supported properties are documented in the MSK Developer Guide.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

function getCluster

getCluster(args: GetClusterArgs, opts?: pulumi.InvokeOptions): Promise<GetClusterResult> & GetClusterResult

Get information on an Amazon MSK Cluster.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.msk.getCluster({
    clusterName: "example",
}));

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/d/msk_cluster.html.markdown.

function getConfiguration

getConfiguration(args: GetConfigurationArgs, opts?: pulumi.InvokeOptions): Promise<GetConfigurationResult> & GetConfigurationResult

Get information on an Amazon MSK Configuration.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.msk.getConfiguration({
    name: "example",
}));

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/d/msk_configuration.html.markdown.

interface ClusterArgs

The set of arguments for constructing a Cluster resource.

property brokerNodeGroupInfo

brokerNodeGroupInfo: pulumi.Input<{
    azDistribution: pulumi.Input<string>;
    clientSubnets: pulumi.Input<pulumi.Input<string>[]>;
    ebsVolumeSize: pulumi.Input<number>;
    instanceType: pulumi.Input<string>;
    securityGroups: pulumi.Input<pulumi.Input<string>[]>;
}>;

Configuration block for the broker nodes of the Kafka cluster.

property clientAuthentication

clientAuthentication?: pulumi.Input<{
    tls: pulumi.Input<{
        certificateAuthorityArns: pulumi.Input<pulumi.Input<string>[]>;
    }>;
}>;

Configuration block for specifying a client authentication. See below.

property clusterName

clusterName: pulumi.Input<string>;

Name of the MSK cluster.

property configurationInfo

configurationInfo?: pulumi.Input<{
    arn: pulumi.Input<string>;
    revision: pulumi.Input<number>;
}>;

Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below.

property encryptionInfo

encryptionInfo?: pulumi.Input<{
    encryptionAtRestKmsKeyArn: pulumi.Input<string>;
    encryptionInTransit: pulumi.Input<{
        clientBroker: pulumi.Input<string>;
        inCluster: pulumi.Input<boolean>;
    }>;
}>;

Configuration block for specifying encryption. See below.

property enhancedMonitoring

enhancedMonitoring?: pulumi.Input<string>;

Specify the desired enhanced MSK CloudWatch monitoring level. See Monitoring Amazon MSK with Amazon CloudWatch

property kafkaVersion

kafkaVersion: pulumi.Input<string>;

Specify the desired Kafka software version.

property numberOfBrokerNodes

numberOfBrokerNodes: pulumi.Input<number>;

The desired total number of broker nodes in the kafka cluster. It must be a multiple of the number of specified client subnets.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource

interface ClusterState

Input properties used for looking up and filtering Cluster resources.

property arn

arn?: pulumi.Input<string>;

Amazon Resource Name (ARN) of the MSK Configuration to use in the cluster.

property bootstrapBrokers

bootstrapBrokers?: pulumi.Input<string>;

A comma separated list of one or more hostname:port pairs of kafka brokers suitable to boostrap connectivity to the kafka cluster. Only contains value if clientBroker encryption in transit is set to PLAINTEXT or TLS_PLAINTEXT.

property bootstrapBrokersTls

bootstrapBrokersTls?: pulumi.Input<string>;

A comma separated list of one or more DNS names (or IPs) and TLS port pairs kafka brokers suitable to boostrap connectivity to the kafka cluster. Only contains value if clientBroker encryption in transit is set to TLS_PLAINTEXT or TLS.

property brokerNodeGroupInfo

brokerNodeGroupInfo?: pulumi.Input<{
    azDistribution: pulumi.Input<string>;
    clientSubnets: pulumi.Input<pulumi.Input<string>[]>;
    ebsVolumeSize: pulumi.Input<number>;
    instanceType: pulumi.Input<string>;
    securityGroups: pulumi.Input<pulumi.Input<string>[]>;
}>;

Configuration block for the broker nodes of the Kafka cluster.

property clientAuthentication

clientAuthentication?: pulumi.Input<{
    tls: pulumi.Input<{
        certificateAuthorityArns: pulumi.Input<pulumi.Input<string>[]>;
    }>;
}>;

Configuration block for specifying a client authentication. See below.

property clusterName

clusterName?: pulumi.Input<string>;

Name of the MSK cluster.

property configurationInfo

configurationInfo?: pulumi.Input<{
    arn: pulumi.Input<string>;
    revision: pulumi.Input<number>;
}>;

Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below.

property currentVersion

currentVersion?: pulumi.Input<string>;

Current version of the MSK Cluster used for updates, e.g. K13V1IB3VIYZZH * encryption_info.0.encryption_at_rest_kms_key_arn - The ARN of the KMS key used for encryption at rest of the broker data volumes.

property encryptionInfo

encryptionInfo?: pulumi.Input<{
    encryptionAtRestKmsKeyArn: pulumi.Input<string>;
    encryptionInTransit: pulumi.Input<{
        clientBroker: pulumi.Input<string>;
        inCluster: pulumi.Input<boolean>;
    }>;
}>;

Configuration block for specifying encryption. See below.

property enhancedMonitoring

enhancedMonitoring?: pulumi.Input<string>;

Specify the desired enhanced MSK CloudWatch monitoring level. See Monitoring Amazon MSK with Amazon CloudWatch

property kafkaVersion

kafkaVersion?: pulumi.Input<string>;

Specify the desired Kafka software version.

property numberOfBrokerNodes

numberOfBrokerNodes?: pulumi.Input<number>;

The desired total number of broker nodes in the kafka cluster. It must be a multiple of the number of specified client subnets.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource

property zookeeperConnectString

zookeeperConnectString?: pulumi.Input<string>;

A comma separated list of one or more IP:port pairs to use to connect to the Apache Zookeeper cluster.

interface ConfigurationArgs

The set of arguments for constructing a Configuration resource.

property description

description?: pulumi.Input<string>;

Description of the configuration.

property kafkaVersions

kafkaVersions: pulumi.Input<pulumi.Input<string>[]>;

List of Apache Kafka versions which can use this configuration.

property name

name?: pulumi.Input<string>;

Name of the configuration.

property serverProperties

serverProperties: pulumi.Input<string>;

Contents of the server.properties file. Supported properties are documented in the MSK Developer Guide.

interface ConfigurationState

Input properties used for looking up and filtering Configuration resources.

property arn

arn?: pulumi.Input<string>;

Amazon Resource Name (ARN) of the configuration.

property description

description?: pulumi.Input<string>;

Description of the configuration.

property kafkaVersions

kafkaVersions?: pulumi.Input<pulumi.Input<string>[]>;

List of Apache Kafka versions which can use this configuration.

property latestRevision

latestRevision?: pulumi.Input<number>;

Latest revision of the configuration.

property name

name?: pulumi.Input<string>;

Name of the configuration.

property serverProperties

serverProperties?: pulumi.Input<string>;

Contents of the server.properties file. Supported properties are documented in the MSK Developer Guide.

interface GetClusterArgs

A collection of arguments for invoking getCluster.

property clusterName

clusterName: string;

Name of the cluster.

property tags

tags?: undefined | {[key: string]: any};

interface GetClusterResult

A collection of values returned by getCluster.

property arn

arn: string;

Amazon Resource Name (ARN) of the MSK cluster.

property bootstrapBrokers

bootstrapBrokers: string;

A comma separated list of one or more hostname:port pairs of Kafka brokers suitable to boostrap connectivity to the Kafka cluster.

property bootstrapBrokersTls

bootstrapBrokersTls: string;

A comma separated list of one or more DNS names (or IPs) and TLS port pairs kafka brokers suitable to boostrap connectivity to the kafka cluster.

property clusterName

clusterName: string;

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property kafkaVersion

kafkaVersion: string;

Apache Kafka version.

property numberOfBrokerNodes

numberOfBrokerNodes: number;

Number of broker nodes in the cluster.

property tags

tags: {[key: string]: any};

Map of key-value pairs assigned to the cluster.

property zookeeperConnectString

zookeeperConnectString: string;

A comma separated list of one or more IP:port pairs to use to connect to the Apache Zookeeper cluster.

interface GetConfigurationArgs

A collection of arguments for invoking getConfiguration.

property name

name: string;

Name of the configuration.

interface GetConfigurationResult

A collection of values returned by getConfiguration.

property arn

arn: string;

Amazon Resource Name (ARN) of the configuration.

property description

description: string;

Description of the configuration.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property kafkaVersions

kafkaVersions: string[];

List of Apache Kafka versions which can use this configuration.

property latestRevision

latestRevision: number;

Latest revision of the configuration.

property name

name: string;

property serverProperties

serverProperties: string;

Contents of the server.properties file.