@@ -46,8 +46,6 @@ output "broker" {
4646
4747 `public_access_enabled` - Whether public access to MSK brokers is enabled.
4848 `security_groups` - A list of the security groups associated with the MSK cluster.
49-
50- `volume` - A EBS volume information for MSK brokers.
5149 EOF
5250 value = {
5351 size = aws_msk_cluster.this.number_of_broker_nodes
@@ -56,19 +54,27 @@ output "broker" {
5654 subnets = aws_msk_cluster.this.broker_node_group_info[0 ].client_subnets
5755 public_access_enabled = var.broker_public_access_enabled
5856 security_groups = aws_msk_cluster.this.broker_node_group_info[0 ].security_groups
59- default_security_group_id = try (module. security_group [* ]. id [0 ], null )
57+ default_security_group_id = module.security_group.id
58+ }
59+ }
6060
61- volume = {
62- size = aws_msk_cluster.this.broker_node_group_info[0 ].storage_info[0 ].ebs_storage_info[0 ].volume_size
63- provisioned_throughput = {
64- enabled = try (aws_msk_cluster. this . broker_node_group_info [0 ]. storage_info [0 ]. ebs_storage_info [0 ]. provisioned_throughput [0 ]. enabled , false )
65- throughput = try (aws_msk_cluster. this . broker_node_group_info [0 ]. storage_info [0 ]. ebs_storage_info [0 ]. provisioned_throughput [0 ]. volume_throughput , null )
66- }
61+ output "broker_storage" {
62+ description = " The configuration for broker storage of the MSK cluster."
63+ value = {
64+ volume_size = aws_msk_cluster.this.broker_node_group_info[0 ].storage_info[0 ].ebs_storage_info[0 ].volume_size
65+ provisioned_throughput = {
66+ enabled = try (aws_msk_cluster. this . broker_node_group_info [0 ]. storage_info [0 ]. ebs_storage_info [0 ]. provisioned_throughput [0 ]. enabled , false )
67+ throughput = try (aws_msk_cluster. this . broker_node_group_info [0 ]. storage_info [0 ]. ebs_storage_info [0 ]. provisioned_throughput [0 ]. volume_throughput , null )
6768 }
6869 }
6970}
7071
71- output "auth" {
72+ output "cluster_storage_mode" {
73+ description = " The storage mode of the MSK cluster."
74+ value = aws_msk_cluster. this . storage_mode
75+ }
76+
77+ output "authentication" {
7278 description = " A configuration for authentication of the Kafka cluster."
7379 value = {
7480 unauthenticated_access = {
@@ -80,31 +86,33 @@ output "auth" {
8086 }
8187 scram = {
8288 enabled = aws_msk_cluster.this.client_authentication[0 ].sasl[0 ].scram
83- kms_key = var.auth_sasl_scram_kms_key
84- users = var.auth_sasl_scram_users
89+ kms_key = var.authentication.sasl_scram.kms_key
90+ users = var.authentication.sasl_scram.users
8591 }
8692 }
8793 tls = {
88- enabled = var.auth_tls_enabled
89- acm_ca_arns = try (aws_msk_cluster. this . client_authentication [0 ]. tls [0 ]. certificate_authority_arns , [])
94+ enabled = var.authentication.tls.enabled
95+ acm_private_certificate_authorities = try (aws_msk_cluster. this . client_authentication [0 ]. tls [0 ]. certificate_authority_arns , [])
9096 }
9197 }
9298}
9399
94- output "encryption " {
100+ output "encryption_at_rest " {
95101 description = << EOF
96- A configuration for encryption of the Kafka cluster.
97- `at_rest` - The configuration for encryption at rest.
98- `in_transit` - The configuration for encryption in transit.
102+ The configuration for encryption at rest of the Kafka cluster.
99103 EOF
100104 value = {
101- at_rest = {
102- kms_key = aws_msk_cluster.this.encryption_info[0 ].encryption_at_rest_kms_key_arn
103- }
104- in_transit = {
105- in_cluster_enabled = aws_msk_cluster.this.encryption_info[0 ].encryption_in_transit[0 ].in_cluster
106- client_mode = aws_msk_cluster.this.encryption_info[0 ].encryption_in_transit[0 ].client_broker
107- }
105+ kms_key = aws_msk_cluster.this.encryption_info[0 ].encryption_at_rest_kms_key_arn
106+ }
107+ }
108+
109+ output "encryption_in_transit" {
110+ description = << EOF
111+ The configuration for encryption in transit of the Kafka cluster.
112+ EOF
113+ value = {
114+ in_cluster_enabled = aws_msk_cluster.this.encryption_info[0 ].encryption_in_transit[0 ].in_cluster
115+ client_mode = aws_msk_cluster.this.encryption_info[0 ].encryption_in_transit[0 ].client_broker
108116 }
109117}
110118
@@ -125,22 +133,22 @@ output "logging" {
125133 delivery_stream = aws_msk_cluster.this.logging_info[0 ].broker_logs[0 ].firehose[0 ].delivery_stream
126134 }
127135 s3 = {
128- enabled = aws_msk_cluster.this.logging_info[0 ].broker_logs[0 ].s3[0 ].enabled
129- bucket = aws_msk_cluster.this.logging_info[0 ].broker_logs[0 ].s3[0 ].bucket
130- prefix = aws_msk_cluster.this.logging_info[0 ].broker_logs[0 ].s3[0 ].prefix
136+ enabled = aws_msk_cluster.this.logging_info[0 ].broker_logs[0 ].s3[0 ].enabled
137+ bucket = aws_msk_cluster.this.logging_info[0 ].broker_logs[0 ].s3[0 ].bucket
138+ key_prefix = aws_msk_cluster.this.logging_info[0 ].broker_logs[0 ].s3[0 ].prefix
131139 }
132140 }
133141}
134142
135143output "monitoring" {
136144 description = << EOF
137145 A configuration for monitoring of the Kafka cluster.
138- `cloudwatch ` - The configuration for MSK CloudWatch Metrics.
146+ `cloudwatch_metrics ` - The configuration for MSK CloudWatch Metrics.
139147 `prometheus` - The configuration for Prometheus open monitoring.
140148 EOF
141149 value = {
142- cloudwatch = {
143- level = aws_msk_cluster.this.enhanced_monitoring
150+ cloudwatch_metrics = {
151+ monitoring_level = aws_msk_cluster.this.enhanced_monitoring
144152 }
145153 prometheus = {
146154 jmx_exporter_enabled = aws_msk_cluster.this.open_monitoring[0 ].prometheus[0 ].jmx_exporter[0 ].enabled_in_broker
0 commit comments