Module msk
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
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-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
Resources
Functions
Others
- ClusterArgs
- ClusterState
- ConfigurationArgs
- ConfigurationState
- GetClusterArgs
- GetClusterResult
- GetConfigurationArgs
- GetConfigurationResult
Resources
Resource Cluster
class Cluster extends CustomResourceManages AWS Managed Streaming for Kafka cluster
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const vpc = new aws.ec2.Vpc("vpc", {cidrBlock: "192.168.0.0/22"});
const azs = aws.getAvailabilityZones({
state: "available",
});
const subnetAz1 = new aws.ec2.Subnet("subnetAz1", {
availabilityZone: azs.then(azs => azs.names[0]),
cidrBlock: "192.168.0.0/24",
vpcId: vpc.id,
});
const subnetAz2 = new aws.ec2.Subnet("subnetAz2", {
availabilityZone: azs.then(azs => azs.names[1]),
cidrBlock: "192.168.1.0/24",
vpcId: vpc.id,
});
const subnetAz3 = new aws.ec2.Subnet("subnetAz3", {
availabilityZone: azs.then(azs => azs.names[2]),
cidrBlock: "192.168.2.0/24",
vpcId: vpc.id,
});
const sg = new aws.ec2.SecurityGroup("sg", {vpcId: vpc.id});
const kms = new aws.kms.Key("kms", {description: "example"});
const test = new aws.cloudwatch.LogGroup("test", {});
const bucket = new aws.s3.Bucket("bucket", {acl: "private"});
const firehoseRole = new aws.iam.Role("firehoseRole", {assumeRolePolicy: `{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "firehose.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
`});
const testStream = new aws.kinesis.FirehoseDeliveryStream("testStream", {
destination: "s3",
s3_configuration: {
roleArn: firehoseRole.arn,
bucketArn: bucket.arn,
},
tags: {
LogDeliveryEnabled: "placeholder",
},
});
const example = new aws.msk.Cluster("example", {
clusterName: "example",
kafkaVersion: "2.1.0",
numberOfBrokerNodes: 3,
broker_node_group_info: {
instanceType: "kafka.m5.large",
ebsVolumeSize: 1000,
clientSubnets: [
subnetAz1.id,
subnetAz2.id,
subnetAz3.id,
],
securityGroups: [sg.id],
},
encryption_info: {
encryptionAtRestKmsKeyArn: kms.arn,
},
open_monitoring: {
prometheus: {
jmx_exporter: {
enabledInBroker: true,
},
node_exporter: {
enabledInBroker: true,
},
},
},
logging_info: {
broker_logs: {
cloudwatch_logs: {
enabled: true,
logGroup: test.name,
},
firehose: {
enabled: true,
deliveryStream: testStream.name,
},
s3: {
enabled: true,
bucket: bucket.id,
prefix: "logs/msk-",
},
},
},
tags: {
foo: "bar",
},
});
export const zookeeperConnectString = example.zookeeperConnectString;
export const bootstrapBrokers = example.bootstrapBrokers;
export const bootstrapBrokersTls = example.bootstrapBrokersTls;constructor
new Cluster(name: string, args: ClusterArgs, opts?: pulumi.CustomResourceOptions)Create a Cluster resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): ClusterGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is ClusterReturns 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<ClusterBrokerNodeGroupInfo>;Configuration block for the broker nodes of the Kafka cluster.
property clientAuthentication
public clientAuthentication: pulumi.Output<ClusterClientAuthentication | 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<ClusterConfigurationInfo | 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<ClusterEncryptionInfo | 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 loggingInfo
public loggingInfo: pulumi.Output<ClusterLoggingInfo | undefined>;Configuration block for streaming broker logs to Cloudwatch/S3/Kinesis Firehose. See below.
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 openMonitoring
public openMonitoring: pulumi.Output<ClusterOpenMonitoring | undefined>;Configuration block for JMX and Node monitoring for the MSK cluster. See below.
property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A map 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 hostname:port pairs to use to connect to the Apache Zookeeper cluster.
Resource Configuration
class Configuration extends CustomResourceManages 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
`,
});constructor
new Configuration(name: string, args: ConfigurationArgs, opts?: pulumi.CustomResourceOptions)Create a Configuration resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): ConfigurationGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is ConfigurationReturns 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.
Functions
Function getCluster
getCluster(args: GetClusterArgs, opts?: pulumi.InvokeOptions): Promise<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",
}, { async: true }));Function getConfiguration
getConfiguration(args: GetConfigurationArgs, opts?: pulumi.InvokeOptions): Promise<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",
}, { async: true }));Others
interface ClusterArgs
interface ClusterArgsThe set of arguments for constructing a Cluster resource.
property brokerNodeGroupInfo
brokerNodeGroupInfo: pulumi.Input<ClusterBrokerNodeGroupInfo>;Configuration block for the broker nodes of the Kafka cluster.
property clientAuthentication
clientAuthentication?: pulumi.Input<ClusterClientAuthentication>;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<ClusterConfigurationInfo>;Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below.
property encryptionInfo
encryptionInfo?: pulumi.Input<ClusterEncryptionInfo>;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 loggingInfo
loggingInfo?: pulumi.Input<ClusterLoggingInfo>;Configuration block for streaming broker logs to Cloudwatch/S3/Kinesis Firehose. See below.
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 openMonitoring
openMonitoring?: pulumi.Input<ClusterOpenMonitoring>;Configuration block for JMX and Node monitoring for the MSK cluster. See below.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource
interface ClusterState
interface ClusterStateInput 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<ClusterBrokerNodeGroupInfo>;Configuration block for the broker nodes of the Kafka cluster.
property clientAuthentication
clientAuthentication?: pulumi.Input<ClusterClientAuthentication>;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<ClusterConfigurationInfo>;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<ClusterEncryptionInfo>;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 loggingInfo
loggingInfo?: pulumi.Input<ClusterLoggingInfo>;Configuration block for streaming broker logs to Cloudwatch/S3/Kinesis Firehose. See below.
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 openMonitoring
openMonitoring?: pulumi.Input<ClusterOpenMonitoring>;Configuration block for JMX and Node monitoring for the MSK cluster. See below.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource
property zookeeperConnectString
zookeeperConnectString?: pulumi.Input<string>;A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster.
interface ConfigurationArgs
interface ConfigurationArgsThe 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
interface ConfigurationStateInput 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
interface GetClusterArgsA collection of arguments for invoking getCluster.
property clusterName
clusterName: string;Name of the cluster.
property tags
tags?: undefined | {[key: string]: any};Map of key-value pairs assigned to the cluster.
interface GetClusterResult
interface GetClusterResultA 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;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 hostname:port pairs to use to connect to the Apache Zookeeper cluster.
interface GetConfigurationArgs
interface GetConfigurationArgsA collection of arguments for invoking getConfiguration.
property name
name: string;Name of the configuration.
interface GetConfigurationResult
interface GetConfigurationResultA 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;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.