Terraform-provider-azurerm: Feature Request: Azure High Availability Ports

Created on 29 Sep 2017  ·  11Comments  ·  Source: terraform-providers/terraform-provider-azurerm

_This issue was originally opened by @robrankin as hashicorp/terraform#16215. It was migrated here as a result of the provider split. The original body of the issue is below._


Microsoft has just announced the Preview availability of a "High Availability Ports" for the Azure Load Balancer:

https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-ha-ports-overview

It's a pretty great addition to the LB, would be extremely useful to have it exposed in Terraform.

enhancement servicload-balancers upstream-microsoft

Most helpful comment

From our side, we have successfully deployed a Azure Load Balancer with HA Ports with the following configuration :

resource "azurerm_lb_rule" "lb_haports_rule" {
  backend_port = 0
  frontend_ip_configuration_name = "${azurerm_lb.private-lb-gateway.frontend_ip_configuration.0.name}"
  frontend_port = 0
  loadbalancer_id = "${azurerm_lb.private-lb-gateway.id}"
  name = "lb_haports_rule"
  protocol = "All"
  backend_address_pool_id = "${azurerm_lb_backend_address_pool.gateway_backend_pool.id}"
  probe_id = "${azurerm_lb_probe.lb_gateway_probe_fw.id}"
  resource_group_name          = "${var.resource_group_name}"
}

And it's working ! We simply add "All" in protocol.

All 11 comments

@metacpp pinging you on this one, as you assigned yourself to #579.

Is there any chance this feature is scoped for implementation? It's the last piece of my vDC Terraform implementation and saves me creating hundreds of rules on my load balancer in front of next-gen firewalls.

Hi @justaugustus,

Thanks for the issue, but we are unfortunately still waiting on the GO SDK for Azure to support this.

From our side, we have successfully deployed a Azure Load Balancer with HA Ports with the following configuration :

resource "azurerm_lb_rule" "lb_haports_rule" {
  backend_port = 0
  frontend_ip_configuration_name = "${azurerm_lb.private-lb-gateway.frontend_ip_configuration.0.name}"
  frontend_port = 0
  loadbalancer_id = "${azurerm_lb.private-lb-gateway.id}"
  name = "lb_haports_rule"
  protocol = "All"
  backend_address_pool_id = "${azurerm_lb_backend_address_pool.gateway_backend_pool.id}"
  probe_id = "${azurerm_lb_probe.lb_gateway_probe_fw.id}"
  resource_group_name          = "${var.resource_group_name}"
}

And it's working ! We simply add "All" in protocol.

@EtienneDeneuve .. Terraform 0.11.8 throws an error when I run the workaround config. The error is
"backend_port is not a valid port number: 'x00'
My config looks like:

resource "azurerm_lb_rule" "lb_haports_rule" {
  protocol = "All"
  backend_port = 0
  frontend_ip_configuration_name = "${azurerm_lb.ilbmain.frontend_ip_configuration.0.name}"
  frontend_port = 0
  loadbalancer_id = "${azurerm_lb.ilbmain.id}"
  name = "lb_haports_rule"  
  backend_address_pool_id = "${azurerm_lb_backend_address_pool.ILB2PaloAlto.id}"
  probe_id = "${azurerm_lb_probe.paloalto_probe.id}"
  resource_group_name  = "${data.azurerm_resource_group.pa-rg.name}"
}

Hi,
just bumped into the same issue and also for me the workaround is no longer working.

What surprises me is that the referenced issue for the go-sdk is also closed !
Can somebody please have a look to see how this can be done.

I'm also getting

"backend_port is not a valid port number: 'x00'

Yet if you leave it to "All" and put in a port it moans that it must be set to 0, which then errors.

Message="A rule that supports any port and protocol load balancing must have the following settings: FrontendPort: 0, BackendPort: 0, and Protocol: Protocol.All.

@DYNSOL, @LW81, @asubmani

Additional validation was added to this resource breaking the workaround. I have opened #1951 to allow 0 for the ports again.

Excellent ! Many thx for taking care !

kt notifications@github.com schrieb am Do., 20. Sep. 2018, 00:08:

@DYNSOL https://github.com/DYNSOL, @LW81 https://github.com/LW81,
@asubmani https://github.com/asubmani

Additional validation was added to this resource breaking the workaround.
I have opened #1951
https://github.com/terraform-providers/terraform-provider-azurerm/pull/1951
to allow 0 for the ports again.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/terraform-providers/terraform-provider-azurerm/issues/372#issuecomment-422975078,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATAFNGwAWpmFwBXq5vpgsigut4vSGvn-ks5ucsBXgaJpZM4Povgw
.

Fixed via #1951

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings