From b4e66a5b57ff94a235e536d933f4820f8f282a57 Mon Sep 17 00:00:00 2001 From: Montek Singh Date: Thu, 1 Jun 2023 13:15:02 +0100 Subject: [PATCH] add output (#7) --- README.md | 2 ++ main.tf | 2 +- outputs.tf | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 935aab6..3469e09 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,8 @@ No modules. | [broker\_arn](#output\_broker\_arn) | AmazonMQ broker ARN. | | [broker\_id](#output\_broker\_id) | AmazonMQ broker ID. | | [broker\_instances](#output\_broker\_instances) | AmazonMQ broker instances details. | +| [nlb\_dns\_name](#output\_nlb\_dns\_name) | NLB DNS Name. | +| [nlb\_zone\_id](#output\_nlb\_zone\_id) | NLB Zone Id. | ## License diff --git a/main.tf b/main.tf index 0b8f166..92ea4cf 100644 --- a/main.tf +++ b/main.tf @@ -27,7 +27,7 @@ resource "aws_mq_broker" "main" { authentication_strategy = var.authentication_strategy - security_groups = var.create_security_group ? [aws_security_group.main.id] : var.security_groups + security_groups = var.create_security_group ? [aws_security_group.main[0].id] : var.security_groups dynamic "configuration" { for_each = var.configuration_enabled ? ["true"] : [] diff --git a/outputs.tf b/outputs.tf index 9dd1a18..5ee4239 100644 --- a/outputs.tf +++ b/outputs.tf @@ -12,3 +12,13 @@ output "broker_instances" { value = aws_mq_broker.main.instances description = "AmazonMQ broker instances details." } + +output "nlb_dns_name" { + value = aws_lb.main.dns_name + description = "NLB DNS Name." +} + +output "nlb_zone_id" { + value = aws_lb.main.zone_id + description = "NLB Zone Id." +}