Skip to content

Commit

Permalink
fix: Add outputs for bootstrap brokers if SASL access is used
Browse files Browse the repository at this point in the history
* feat: Add outputs for bootstrap brokers if SASL access is used
* fix: Show outputs only if not empty

---------

Co-authored-by: Roger Fava (Group) <[email protected]>
Co-authored-by: Francesc Arbona <[email protected]>
  • Loading branch information
3 people authored May 20, 2023
1 parent 2290258 commit 9d2729c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,13 @@ No modules.
|------|-------------|
| <a name="output_arn"></a> [arn](#output\_arn) | Amazon Resource Name (ARN) of the MSK cluster. |
| <a name="output_bootstrap_brokers"></a> [bootstrap\_brokers](#output\_bootstrap\_brokers) | 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 client\_broker encryption in transit is set o PLAINTEXT or TLS\_PLAINTEXT. |
| <a name="output_bootstrap_brokers_sasl_iam"></a> [bootstrap\_brokers\_sasl\_iam](#output\_bootstrap\_brokers\_sasl\_iam) | 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 client\_broker encryption in transit is set to SASL IAM. |
| <a name="output_bootstrap_brokers_sasl_scram"></a> [bootstrap\_brokers\_sasl\_scram](#output\_bootstrap\_brokers\_sasl\_scram) | 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 client\_broker encryption in transit is set to SASL SCRAM. |
| <a name="output_bootstrap_brokers_tls"></a> [bootstrap\_brokers\_tls](#output\_bootstrap\_brokers\_tls) | 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 client\_broker encryption in transit is set to TLS\_PLAINTEXT or TLS. |
| <a name="output_current_version"></a> [current\_version](#output\_current\_version) | Current version of the MSK Cluster used for updates, e.g. K13V1IB3VIYZZH |
| <a name="output_default_security_group"></a> [default\_security\_group](#output\_default\_security\_group) | Msk cluster default security group id. |
| <a name="output_encryption_at_rest_kms_key_arn"></a> [encryption\_at\_rest\_kms\_key\_arn](#output\_encryption\_at\_rest\_kms\_key\_arn) | The ARN of the KMS key used for encryption at rest of the broker data volumes. |
| <a name="output_extra_security_groups"></a> [extra\_security\_groups](#output\_extra\_security\_groups) | Msk cluster extra security group ids. |
| <a name="output_zookeeper_connect_string"></a> [zookeeper\_connect\_string](#output\_zookeeper\_connect\_string) | A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster. |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

Expand Down
15 changes: 15 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ output "default_security_group" {
value = aws_security_group.this.id
}

output "extra_security_groups" {
description = "Msk cluster extra security group ids."
value = var.extra_security_groups
}

output "arn" {
description = "Amazon Resource Name (ARN) of the MSK cluster."
value = aws_msk_cluster.this.arn
Expand All @@ -18,6 +23,16 @@ output "bootstrap_brokers_tls" {
value = aws_msk_cluster.this.bootstrap_brokers_tls
}

output "bootstrap_brokers_sasl_scram" {
description = "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 client_broker encryption in transit is set to SASL SCRAM."
value = aws_msk_cluster.this.bootstrap_brokers_sasl_scram != "" ? aws_msk_cluster.this.bootstrap_brokers_sasl_scram : null
}

output "bootstrap_brokers_sasl_iam" {
description = "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 client_broker encryption in transit is set to SASL IAM."
value = aws_msk_cluster.this.bootstrap_brokers_sasl_iam != "" ? aws_msk_cluster.this.bootstrap_brokers_sasl_iam : null
}

output "current_version" {
description = "Current version of the MSK Cluster used for updates, e.g. K13V1IB3VIYZZH"
value = aws_msk_cluster.this.current_version
Expand Down

0 comments on commit 9d2729c

Please sign in to comment.