From 1aef23244636dd585a7bf91dee0643c05ebdf7ac Mon Sep 17 00:00:00 2001 From: Efe Hakan Gencoglu Date: Tue, 20 Aug 2024 10:31:20 +0300 Subject: [PATCH] add password to output --- .../outputs.tf | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/modules/aws-msk-apache-kafka-cluster-master/outputs.tf b/modules/aws-msk-apache-kafka-cluster-master/outputs.tf index 55342a7..0e7e927 100644 --- a/modules/aws-msk-apache-kafka-cluster-master/outputs.tf +++ b/modules/aws-msk-apache-kafka-cluster-master/outputs.tf @@ -1,26 +1,26 @@ output "cluster_arn" { description = "Amazon Resource Name (ARN) of the MSK cluster" - value = join("", aws_msk_cluster.default.*.arn) + value = join("", aws_msk_cluster.default[*].arn) } output "bootstrap_brokers" { description = "A comma separated list of one or more hostname:port pairs of kafka brokers suitable to boostrap connectivity to the kafka cluster" - value = join(",", aws_msk_cluster.default.*.bootstrap_brokers) + value = join(",", aws_msk_cluster.default[*].bootstrap_brokers) } output "bootstrap_brokers_tls" { 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" - value = join(",", aws_msk_cluster.default.*.bootstrap_brokers_tls) + value = join(",", aws_msk_cluster.default[*].bootstrap_brokers_tls) } output "bootstrap_brokers_scram" { description = "A comma separated list of one or more DNS names (or IPs) and TLS port pairs kafka brokers suitable to boostrap connectivity using SASL/SCRAM to the kafka cluster." - value = join(",", aws_msk_cluster.default.*.bootstrap_brokers_sasl_scram) + value = join(",", aws_msk_cluster.default[*].bootstrap_brokers_sasl_scram) } output "bootstrap_brokers_iam" { description = "A comma separated list of one or more DNS names (or IPs) and TLS port pairs kafka brokers suitable to boostrap connectivity using SASL/IAM to the kafka cluster." - value = join(",", aws_msk_cluster.default.*.bootstrap_brokers_sasl_iam) + value = join(",", aws_msk_cluster.default[*].bootstrap_brokers_sasl_iam) } output "all_brokers" { @@ -30,30 +30,42 @@ output "all_brokers" { output "current_version" { description = "Current version of the MSK Cluster used for updates" - value = join("", aws_msk_cluster.default.*.current_version) + value = join("", aws_msk_cluster.default[*].current_version) } output "zookeeper_connect_string" { description = "A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster" - value = join(",", aws_msk_cluster.default.*.zookeeper_connect_string) + value = join(",", aws_msk_cluster.default[*].zookeeper_connect_string) } output "config_arn" { description = "Amazon Resource Name (ARN) of the configuration" - value = join("", aws_msk_configuration.config.*.arn) + value = join("", aws_msk_configuration.config[*].arn) } output "latest_revision" { description = "Latest revision of the configuration" - value = join("", aws_msk_configuration.config.*.latest_revision) + value = join("", aws_msk_configuration.config[*].latest_revision) } output "cluster_name" { description = "MSK Cluster name" - value = join("", aws_msk_cluster.default.*.cluster_name) + value = join("", aws_msk_cluster.default[*].cluster_name) } output "bootstrap_brokers_public_sasl_scram" { value = one(aws_msk_cluster.default[*].bootstrap_brokers_public_sasl_scram) description = "Comma separated list of one or more DNS names (or IP addresses) and SASL SCRAM port pairs for public access to the Kafka cluster using SASL/SCRAM" -} \ No newline at end of file +} + +output "username" { + # this might need to change later on, currently hardcoded in the module + value = "msk" + description = "" +} + +output "password" { + value = random_password.password[0].result + description = "" +} +