F5Networks / terraform-azure-bigip-module

Terraform module for Deploying BIG-IP in azure
Apache License 2.0
9 stars 24 forks source link

Feature: add enable_ip_forwarding to network interface creation variables #35

Closed JeffGiroux closed 2 years ago

JeffGiroux commented 2 years ago

User would like to pass traffic through the BIG-IP device in which the source and destination does not below to the BIG-IP. To make this happen on an NIC, the enable_ip_forwarding must be set to 'true'. The default value is 'false'.

Current behavior

The current BIG-IP module code creates all network interfaces without using this parameter. As a result, all NICs are created with enable_ip_forwarding set to 'false'.

Expected behavior

User can supply value to parameter to choose to enable or disable forwarding.

resource "azurerm_network_interface" "external_nic" {
  count               = length(local.external_private_subnet_id)
  name                = "${local.instance_prefix}-ext-nic-${count.index}"
  location            = data.azurerm_resource_group.bigiprg.location
  resource_group_name = data.azurerm_resource_group.bigiprg.name
  enable_ip_forwarding = var.external_enable_ip_forwarding

Then make a new variables.tf variable

variable "external_enable_ip_forwarding" {
  description = "Enable IP forwarding on the External interfaces. To allow inline routing for backends, this must be set to true"
  default     = true
}

You have this logic in the terraform-aws-bigip-module so please reference examples there on that repo. Both external and internal NICs should have user supplied variable inputs for enabling or disabling IP forwarding

RavinderReddyF5 commented 2 years ago

fixed in v1.2.4