Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.
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
7 changes: 4 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

#
Expand Down
15 changes: 15 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down