Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.

Commit 869cdb3

Browse files
authored
Merge pull request #41 from f5devcentral/multiple-public-ips
Multiple public ips closes #46
2 parents a531445 + 06cb574 commit 869cdb3

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ resource "aws_eip" "mgmt" {
4040
# Create Public Network Interfaces
4141
#
4242
resource "aws_network_interface" "public" {
43-
count = length(var.vpc_public_subnet_ids)
44-
subnet_id = var.vpc_public_subnet_ids[count.index]
45-
security_groups = var.public_subnet_security_group_ids
43+
count = length(var.vpc_public_subnet_ids)
44+
subnet_id = var.vpc_public_subnet_ids[count.index]
45+
security_groups = var.public_subnet_security_group_ids
46+
private_ips_count = var.application_endpoint_count
4647
}
4748

4849
#

outputs.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,18 @@ output "public_nic_ids" {
2121
description = "List of BIG-IP public network interface ids"
2222
value = aws_network_interface.public[*].id
2323
}
24+
25+
output "mgmt_addresses" {
26+
description = "List of BIG-IP management addresses"
27+
value = aws_network_interface.mgmt[*].private_ips
28+
}
29+
30+
output "public_addresses" {
31+
description = "List of BIG-IP public addresses"
32+
value = aws_network_interface.public[*].private_ips
33+
}
34+
35+
output "private_addresses" {
36+
description = "List of BIG-IP private addresses"
37+
value = aws_network_interface.private[*].private_ips
38+
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ variable "f5_instance_count" {
1616
default = 1
1717
}
1818

19+
variable "application_endpoint_count" {
20+
description = "number of public application addresses to assign"
21+
type = number
22+
default = 2
23+
}
24+
1925
variable "ec2_instance_type" {
2026
description = "AWS EC2 instance type"
2127
type = string

0 commit comments

Comments
 (0)