Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"external_public_nic" - additional output to the bigip-module #62

Open
dfs5 opened this issue Feb 27, 2024 · 2 comments
Open

"external_public_nic" - additional output to the bigip-module #62

dfs5 opened this issue Feb 27, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@dfs5
Copy link

dfs5 commented Feb 27, 2024

Can we have an additional output added to the bigip-module which would allow to assign the BIG-IP VE secondary IP as pool member to ALB.
I tried the workaround as mentioned here but it didn't work: #29

│ Error: Error: Network Interface (Subscription: "3ab97c04-ca68-41d4-8b83-2b9cf0723c23"
│ Resource Group Name: "dfsarag-rg-1b8b"
│ Network Interface Name: "dfsarag-16db-ext-nic-public-0") was not found

│   with data.azurerm_network_interface.bigip2-ext,
│   on bigip.tf line 196, in data "azurerm_network_interface" "bigip2-ext":
│  196: data "azurerm_network_interface" "bigip2-ext" {


What needs to be added:

To be added under .terraform/modules/bigip/outputs.tf

output "external_public_nic" {
value = azurerm_network_interface.external_public_nic[0].id
}

What the modification would allow:

Then if ALB should front-end the BIG-IP the "external_public_nic" could be associate to the ALB Pool under bigip.tf

Associate the BIG-IP NIC to the ALB backend pool

resource "azurerm_network_interface_backend_address_pool_association" "f5vm01" {
network_interface_id = module.bigip.external_public_nic
ip_configuration_name = format("%s-secondary-ext-public-ip-0", element(split("-mgmt-0", element(split(".", module.bigip.mgmtPublicDNS), 0)), 0))
backend_address_pool_id = azurerm_lb_backend_address_pool.backend_pool.id
}

@pgouband
Copy link
Collaborator

pgouband commented Mar 6, 2024

Hi @dfs5,

Did you test with the latest version?

@pgouband pgouband added the enhancement New feature or request label Mar 6, 2024
@dfs5
Copy link
Author

dfs5 commented Jun 5, 2024

I am using:

terraform version
Terraform v1.3.8
on darwin_amd64

  • provider registry.terraform.io/hashicorp/azurerm v3.91.0
  • provider registry.terraform.io/hashicorp/null v3.2.2
  • provider registry.terraform.io/hashicorp/random v3.6.0
  • provider registry.terraform.io/hashicorp/time v0.10.0

from the docs:

This module is supported from Terraform 0.13 version onwards.

Below templates are tested and worked in the following version

Terraform v0.14.0

provider registry.terraform.io/hashicorp/azurerm v2.28.0
provider registry.terraform.io/hashicorp/null v2.1.2
provider registry.terraform.io/hashicorp/random v2.3.0
provider registry.terraform.io/hashicorp/template v2.1.2
!> Note: bigip-module v1.2.0 Requires azurerm > 3.0 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants