From 6271a31850deb5cc38c32231daa242c87f0b9d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82adys=C5=82aw=20Czy=C5=BCewski?= Date: Thu, 28 Nov 2024 22:38:03 +0100 Subject: [PATCH] add cluster name to outputs sometimes it's usefull to have this value as output, for instance, when using terragrunt and use this module as dependency of another module --- README.md | 1 + outputs.tf | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 2a448ee..15780d5 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,7 @@ No modules. | [bootstrap\_brokers\_sasl\_iam](#output\_bootstrap\_brokers\_sasl\_iam) | One or more DNS names (or IP addresses) and SASL IAM port pairs. This attribute will have a value if `encryption_in_transit_client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication_sasl_iam` is set to `true` | | [bootstrap\_brokers\_sasl\_scram](#output\_bootstrap\_brokers\_sasl\_scram) | One or more DNS names (or IP addresses) and SASL SCRAM port pairs. This attribute will have a value if `encryption_in_transit_client_broker` is set to `TLS_PLAINTEXT` or `TLS` and `client_authentication_sasl_scram` is set to `true` | | [bootstrap\_brokers\_tls](#output\_bootstrap\_brokers\_tls) | One or more DNS names (or IP addresses) and TLS port pairs. This attribute will have a value if `encryption_in_transit_client_broker` is set to `TLS_PLAINTEXT` or `TLS` | +| [cluster\_name](#output\_cluster\_name) | Name of the MSK cluster | | [cluster\_uuid](#output\_cluster\_uuid) | UUID of the MSK cluster, for use in IAM policies | | [configuration\_arn](#output\_configuration\_arn) | Amazon Resource Name (ARN) of the configuration | | [configuration\_latest\_revision](#output\_configuration\_latest\_revision) | Latest revision of the configuration | diff --git a/outputs.tf b/outputs.tf index c1f0bc2..3aca45b 100644 --- a/outputs.tf +++ b/outputs.tf @@ -37,6 +37,11 @@ output "bootstrap_brokers_tls" { value = try(aws_msk_cluster.this[0].bootstrap_brokers_tls, null) } +output "cluster_name" { + description = "Name of the MSK cluster" + value = var.name +} + output "cluster_uuid" { description = "UUID of the MSK cluster, for use in IAM policies" value = try(aws_msk_cluster.this[0].cluster_uuid, null)