diff --git a/modules/aws/networking/nlb/main.tf b/modules/aws/networking/nlb/main.tf index 166bb3b..92573c2 100644 --- a/modules/aws/networking/nlb/main.tf +++ b/modules/aws/networking/nlb/main.tf @@ -63,18 +63,3 @@ resource "aws_lb_target_group_attachment" "instance_target_group_attachment" { } -# Data source to fetch the network interfaces for the NLB -data "aws_network_interfaces" "lb_enis" { - depends_on = [aws_lb.lb] - filter { - name = "description" - values = ["ELB ${aws_lb.lb.arn_suffix}"] - } -} -# Fetch the details of each network interface using its ID -data "aws_network_interface" "lb_interface" { - for_each = toset(data.aws_network_interfaces.lb_enis.ids) - - id = each.value -} - diff --git a/modules/aws/networking/nlb/outputs.tf b/modules/aws/networking/nlb/outputs.tf index ec773ed..c416d7c 100644 --- a/modules/aws/networking/nlb/outputs.tf +++ b/modules/aws/networking/nlb/outputs.tf @@ -5,18 +5,6 @@ output "nlb_dns_name" { value = aws_lb.lb.dns_name } -# Output the private IP addresses of NLB ENIs - -# output "nlb_private_ips_and_azs" { -# value = [ -# for eni in data.aws_network_interface.lb_interface : -# { -# private_ip = eni.private_ip, -# availability_zone = eni.availability_zone -# } -# ] -# } - output "nlb_security_group_id" { value = aws_security_group.sg.id } \ No newline at end of file