Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/ingress/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ output "security_group" {
output "load_balancer" {
value = module.this.load_balancer
}
output "load_balancer_target_groups" {
value = module.this.load_balancer_target_groups
}
output "domain" {
value = module.this.domain
}
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions modules/network_load_balancer/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ output "public_ip" {
}
output "listeners" {
value = (local.create == 1 ? aws_lb_listener.created : {})
}
output "target_groups" {
value = aws_lb_target_group.created
}
28 changes: 28 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,34 @@ output "load_balancer" {
EOT
}

output "load_balancer_target_groups" {
value = (length(module.network_load_balancer) > 0 ? [
for k, v in module.network_load_balancer[0].target_groups :
{
id = v.id
arn = v.arn
name_prefix = v.name_prefix
port = v.port
protocol = v.protocol
tags_all = v.tags_all
}
] : [{
id = ""
arn = ""
name_prefix = ""
port = ""
protocol = ""
tags_all = tomap({ "" = "" })
}
]
)
description = <<-EOT
The load balancer target groups from AWS.
When generated, this can be helpful to set up indirect access to servers.
To attach servers, use the target_group_attachment resource.
EOT
}

output "domain" {
value = (length(module.domain) > 0 ? {
id = module.domain[0].domain.id
Expand Down