@@ -46,8 +46,6 @@ output "broker" {
46
46
47
47
`public_access_enabled` - Whether public access to MSK brokers is enabled.
48
48
`security_groups` - A list of the security groups associated with the MSK cluster.
49
-
50
- `volume` - A EBS volume information for MSK brokers.
51
49
EOF
52
50
value = {
53
51
size = aws_msk_cluster.this.number_of_broker_nodes
@@ -56,19 +54,27 @@ output "broker" {
56
54
subnets = aws_msk_cluster.this.broker_node_group_info[0 ].client_subnets
57
55
public_access_enabled = var.broker_public_access_enabled
58
56
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
+ }
60
60
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 )
67
68
}
68
69
}
69
70
}
70
71
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" {
72
78
description = " A configuration for authentication of the Kafka cluster."
73
79
value = {
74
80
unauthenticated_access = {
@@ -80,31 +86,33 @@ output "auth" {
80
86
}
81
87
scram = {
82
88
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
85
91
}
86
92
}
87
93
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 , [])
90
96
}
91
97
}
92
98
}
93
99
94
- output "encryption " {
100
+ output "encryption_at_rest " {
95
101
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.
99
103
EOF
100
104
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
108
116
}
109
117
}
110
118
@@ -125,22 +133,22 @@ output "logging" {
125
133
delivery_stream = aws_msk_cluster.this.logging_info[0 ].broker_logs[0 ].firehose[0 ].delivery_stream
126
134
}
127
135
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
131
139
}
132
140
}
133
141
}
134
142
135
143
output "monitoring" {
136
144
description = << EOF
137
145
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.
139
147
`prometheus` - The configuration for Prometheus open monitoring.
140
148
EOF
141
149
value = {
142
- cloudwatch = {
143
- level = aws_msk_cluster.this.enhanced_monitoring
150
+ cloudwatch_metrics = {
151
+ monitoring_level = aws_msk_cluster.this.enhanced_monitoring
144
152
}
145
153
prometheus = {
146
154
jmx_exporter_enabled = aws_msk_cluster.this.open_monitoring[0 ].prometheus[0 ].jmx_exporter[0 ].enabled_in_broker
0 commit comments