From e7f06798381812ae9f2486d3f4eb5e80cf42d2b1 Mon Sep 17 00:00:00 2001 From: Mark Menger Date: Tue, 29 Oct 2019 11:36:02 -0700 Subject: [PATCH 1/5] add explicit ip address outputs for all interfaces --- outputs.tf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 From 7874af5e3ee7db0690fa1739fc9d7285d88ac461 Mon Sep 17 00:00:00 2001 From: Mark Menger Date: Thu, 31 Oct 2019 21:58:24 -0700 Subject: [PATCH 2/5] additional ips on the public nic for apps --- main.tf | 7 ++++--- variables.tf | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) 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/variables.tf b/variables.tf index 4b7e2d3..e521015 100644 --- a/variables.tf +++ b/variables.tf @@ -10,6 +10,12 @@ variable "f5_ami_search_name" { default = "F5 Networks BIGIP-14.* PAYG - Best 200Mbps*" } +variable "application_endpoint_count" { + description = "number of public application addresses to assign" + type = number + default = 5 +} + variable "f5_instance_count" { description = "Number of BIG-IPs to deploy" type = number From 24a62879a3f2395d56873ae8f110147252c76035 Mon Sep 17 00:00:00 2001 From: Mark Menger Date: Thu, 31 Oct 2019 22:07:06 -0700 Subject: [PATCH 3/5] revert to previous state --- main.tf | 1 - variables.tf | 6 ------ 2 files changed, 7 deletions(-) diff --git a/main.tf b/main.tf index 75d3306..afe325f 100644 --- a/main.tf +++ b/main.tf @@ -43,7 +43,6 @@ 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 - private_ips_count = var.application_endpoint_count } # diff --git a/variables.tf b/variables.tf index e521015..4b7e2d3 100644 --- a/variables.tf +++ b/variables.tf @@ -10,12 +10,6 @@ variable "f5_ami_search_name" { default = "F5 Networks BIGIP-14.* PAYG - Best 200Mbps*" } -variable "application_endpoint_count" { - description = "number of public application addresses to assign" - type = number - default = 5 -} - variable "f5_instance_count" { description = "Number of BIG-IPs to deploy" type = number From 41cb4eae2997d2ba29a7c796c693f8647808df8c Mon Sep 17 00:00:00 2001 From: Mark Menger Date: Thu, 31 Oct 2019 22:10:25 -0700 Subject: [PATCH 4/5] multiple ips for the public nic --- main.tf | 1 + variables.tf | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/main.tf b/main.tf index afe325f..75d3306 100644 --- a/main.tf +++ b/main.tf @@ -43,6 +43,7 @@ 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 + private_ips_count = var.application_endpoint_count } # diff --git a/variables.tf b/variables.tf index 4b7e2d3..0995097 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 = 5 +} + variable "ec2_instance_type" { description = "AWS EC2 instance type" type = string From 06cb5740f85f3a8752469c750a09a58786711720 Mon Sep 17 00:00:00 2001 From: Mark Menger Date: Wed, 20 Nov 2019 11:25:12 -0800 Subject: [PATCH 5/5] reduce default application ips to 2 from 5 --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index 0995097..7797575 100644 --- a/variables.tf +++ b/variables.tf @@ -19,7 +19,7 @@ variable "f5_instance_count" { variable "application_endpoint_count" { description = "number of public application addresses to assign" type = number - default = 5 + default = 2 } variable "ec2_instance_type" {