diff --git a/main.tf b/main.tf index 0a25a44..75d3306 100644 --- a/main.tf +++ b/main.tf @@ -40,9 +40,10 @@ resource "aws_eip" "mgmt" { # Create Public Network Interfaces # resource "aws_network_interface" "public" { - count = length(var.vpc_public_subnet_ids) - subnet_id = var.vpc_public_subnet_ids[count.index] - security_groups = var.public_subnet_security_group_ids + count = length(var.vpc_public_subnet_ids) + subnet_id = var.vpc_public_subnet_ids[count.index] + security_groups = var.public_subnet_security_group_ids + private_ips_count = var.application_endpoint_count } # diff --git a/outputs.tf b/outputs.tf index b5cbb9a..a6d4818 100644 --- a/outputs.tf +++ b/outputs.tf @@ -21,3 +21,18 @@ output "public_nic_ids" { description = "List of BIG-IP public network interface ids" value = aws_network_interface.public[*].id } + +output "mgmt_addresses" { + description = "List of BIG-IP management addresses" + value = aws_network_interface.mgmt[*].private_ips +} + +output "public_addresses" { + description = "List of BIG-IP public addresses" + value = aws_network_interface.public[*].private_ips +} + +output "private_addresses" { + description = "List of BIG-IP private addresses" + value = aws_network_interface.private[*].private_ips +} \ No newline at end of file diff --git a/variables.tf b/variables.tf index 4b7e2d3..7797575 100644 --- a/variables.tf +++ b/variables.tf @@ -16,6 +16,12 @@ variable "f5_instance_count" { default = 1 } +variable "application_endpoint_count" { + description = "number of public application addresses to assign" + type = number + default = 2 +} + variable "ec2_instance_type" { description = "AWS EC2 instance type" type = string