Skip to content

Commit 6cbcdef

Browse files
committed
Updated documentation
1 parent df05a43 commit 6cbcdef

File tree

2 files changed

+67
-47
lines changed

2 files changed

+67
-47
lines changed

website/docs/d/msk_cluster.html.markdown

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ data "aws_msk_cluster" "example" {
2323
The following arguments are supported:
2424

2525
* `cluster_name` - (Required) Name of the cluster.
26+
* `cluster_type` - (Required) Type of the MSK cluster. Valid values: PROVISIONED, SERVERLESS.
27+
* `provisioned` - (Optional) Configuration block for the provisioned type of the Kafka cluster.
28+
* `serverless` - (Optional) Configuration block for the serverless type of the Kafka cluster.
2629

2730
## Attribute Reference
2831

@@ -36,8 +39,6 @@ In addition to all arguments above, the following attributes are exported:
3639
* `bootstrap_brokers_sasl_iam` - One or more DNS names (or IP addresses) and SASL IAM port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9098`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.iam` is set to `true`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
3740
* `bootstrap_brokers_sasl_scram` - One or more DNS names (or IP addresses) and SASL SCRAM port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9096`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication.0.sasl.0.scram` is set to `true`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
3841
* `bootstrap_brokers_tls` - One or more DNS names (or IP addresses) and TLS port pairs. For example, `b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094`. This attribute will have a value if `encryption_info.0.encryption_in_transit.0.client_broker` is set to `TLS_PLAINTEXT` or `TLS`. The resource sorts the list alphabetically. AWS may not always return all endpoints so the values may not be stable across applies.
39-
* `kafka_version` - Apache Kafka version.
40-
* `number_of_broker_nodes` - Number of broker nodes in the cluster.
4142
* `tags` - Map of key-value pairs assigned to the cluster.
4243
* `zookeeper_connect_string` - A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster. The returned values are sorted alphbetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.
4344
* `zookeeper_connect_string_tls` - A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphabetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.

website/docs/r/msk_cluster.html.markdown

+64-45
Original file line numberDiff line numberDiff line change
@@ -104,64 +104,67 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream" {
104104
105105
resource "aws_msk_cluster" "example" {
106106
cluster_name = "example"
107-
kafka_version = "3.2.0"
108-
number_of_broker_nodes = 3
109-
110-
broker_node_group_info {
111-
instance_type = "kafka.m5.large"
112-
client_subnets = [
113-
aws_subnet.subnet_az1.id,
114-
aws_subnet.subnet_az2.id,
115-
aws_subnet.subnet_az3.id,
116-
]
117-
storage_info {
118-
ebs_storage_info {
119-
volume_size = 1000
107+
cluster_type = "PROVISIONED"
108+
109+
provisioned {
110+
kafka_version = "3.2.0"
111+
number_of_broker_nodes = 3
112+
broker_node_group_info {
113+
instance_type = "kafka.m5.large"
114+
client_subnets = [
115+
aws_subnet.subnet_az1.id,
116+
aws_subnet.subnet_az2.id,
117+
aws_subnet.subnet_az3.id,
118+
]
119+
storage_info {
120+
ebs_storage_info {
121+
volume_size = 1000
122+
}
120123
}
124+
security_groups = [aws_security_group.sg.id]
121125
}
122-
security_groups = [aws_security_group.sg.id]
123-
}
124126
125-
encryption_info {
126-
encryption_at_rest_kms_key_arn = aws_kms_key.kms.arn
127-
}
127+
encryption_info {
128+
encryption_at_rest_kms_key_arn = aws_kms_key.kms.arn
129+
}
128130
129-
open_monitoring {
130-
prometheus {
131-
jmx_exporter {
132-
enabled_in_broker = true
133-
}
134-
node_exporter {
135-
enabled_in_broker = true
131+
open_monitoring {
132+
prometheus {
133+
jmx_exporter {
134+
enabled_in_broker = true
135+
}
136+
node_exporter {
137+
enabled_in_broker = true
138+
}
136139
}
137140
}
138-
}
139141
140-
logging_info {
141-
broker_logs {
142-
cloudwatch_logs {
143-
enabled = true
144-
log_group = aws_cloudwatch_log_group.test.name
145-
}
146-
firehose {
147-
enabled = true
148-
delivery_stream = aws_kinesis_firehose_delivery_stream.test_stream.name
149-
}
150-
s3 {
151-
enabled = true
152-
bucket = aws_s3_bucket.bucket.id
153-
prefix = "logs/msk-"
142+
logging_info {
143+
broker_logs {
144+
cloudwatch_logs {
145+
enabled = true
146+
log_group = aws_cloudwatch_log_group.test.name
147+
}
148+
firehose {
149+
enabled = true
150+
delivery_stream = aws_kinesis_firehose_delivery_stream.test_stream.name
151+
}
152+
s3 {
153+
enabled = true
154+
bucket = aws_s3_bucket.bucket.id
155+
prefix = "logs/msk-"
156+
}
154157
}
155158
}
156-
}
159+
}
157160
158161
tags = {
159162
foo = "bar"
160163
}
161164
}
162165
163166
output "zookeeper_connect_string" {
164-
value = aws_msk_cluster.example.zookeeper_connect_string
167+
value = aws_msk_cluster.example.provisioned.zookeeper_connect_string
165168
}
166169
167170
output "bootstrap_brokers_tls" {
@@ -203,17 +206,33 @@ resource "aws_msk_cluster" "example" {
203206

204207
The following arguments are supported:
205208

206-
* `broker_node_group_info` - (Required) Configuration block for the broker nodes of the Kafka cluster.
207209
* `cluster_name` - (Required) Name of the MSK cluster.
210+
* `cluster_type` - (Required) Type of the MSK cluster. Valid values: PROVISIONED, SERVERLESS.
211+
* `provisioned` - (Optional) Configuration block for the provisioned type of the Kafka cluster.
212+
* `serverless` - (Optional) Configuration block for the serverless type of the Kafka cluster.
213+
* `tags` - (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
214+
215+
### provisioned Argument Reference
216+
208217
* `kafka_version` - (Required) Specify the desired Kafka software version.
209218
* `number_of_broker_nodes` - (Required) The desired total number of broker nodes in the kafka cluster. It must be a multiple of the number of specified client subnets.
219+
* `broker_node_group_info` - (Required) Configuration block for the broker nodes of the Kafka cluster.
210220
* `client_authentication` - (Optional) Configuration block for specifying a client authentication. See below.
211221
* `configuration_info` - (Optional) Configuration block for specifying a MSK Configuration to attach to Kafka brokers. See below.
212222
* `encryption_info` - (Optional) Configuration block for specifying encryption. See below.
213223
* `enhanced_monitoring` - (Optional) Specify the desired enhanced MSK CloudWatch monitoring level. See [Monitoring Amazon MSK with Amazon CloudWatch](https://docs.aws.amazon.com/msk/latest/developerguide/monitoring.html)
214224
* `open_monitoring` - (Optional) Configuration block for JMX and Node monitoring for the MSK cluster. See below.
215225
* `logging_info` - (Optional) Configuration block for streaming broker logs to Cloudwatch/S3/Kinesis Firehose. See below.
216-
* `tags` - (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` configuration block](/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
226+
227+
### serverless Argument Reference
228+
229+
* `client_authentication` - (Optional) Configuration block for specifying a client authentication. See below.
230+
* `vpc_configs` - (Required) Configuration block for specifying a vpc. See below.
231+
232+
### vpc_configs Argument Reference
233+
234+
* `security_group_ids` - (Optional) Identifiers of the security groups for the serverless cluster.
235+
* `subnet_ids` - (Required) A list of VPC subnet IDs.
217236

218237
### broker_node_group_info Argument Reference
219238

@@ -255,7 +274,7 @@ The following arguments are supported:
255274

256275
#### client_authentication sasl Argument Reference
257276

258-
* `iam` - (Optional) Enables IAM client authentication. Defaults to `false`.
277+
* `iam` - (Optional) Enables IAM client authentication. Defaults to `false` for provisioned types. Defaults to `true` for serverless types.
259278
* `scram` - (Optional) Enables SCRAM client authentication via AWS Secrets Manager. Defaults to `false`.
260279

261280
#### client_authentication tls Argument Reference

0 commit comments

Comments
 (0)