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

azurerm_lb_rule set to backend_port set to zero #1811

Closed
jonathanlackey opened this issue Aug 22, 2018 · 4 comments
Closed

azurerm_lb_rule set to backend_port set to zero #1811

jonathanlackey opened this issue Aug 22, 2018 · 4 comments

Comments

@jonathanlackey
Copy link

Community Note

I am having issues with adding an HA load balancer rule to an azurerm_lb_rule resource. I am leveraging All as the Protocol with the back_end and front_end port set to zero. I had this issue after upgrading my azurerm provider to V1.13.0. This exact same snippet worked previously. It seems like the validator may have changed.

Downgrading to the following code allows the snippet to work as expected:
Terraform v0.11.8

  • provider.azurerm v1.10.0

Terraform Version

Terraform v0.11.8

  • provider.azurerm v1.13.0

Affected Resource(s)

azurerm_lb_rule

Terraform Configuration Files

resource "azurerm_lb_rule" "HUB-LB1HaRule" {
  name                           = "HUB-LB1HaRule"
  resource_group_name            = "${azurerm_resource_group.HUB-RG.name}"
  loadbalancer_id                = "${azurerm_lb.HUB-LB1.id}"
  protocol = "All"
  frontend_port = "0"
  backend_port = "0"
  frontend_ip_configuration_name = "${lookup(azurerm_lb.HUB-LB1.frontend_ip_configuration[0],"name")}"
  backend_address_pool_id        = "${azurerm_lb_backend_address_pool.HUB-LB1-IpPool.id}"
  probe_id                       = "${azurerm_lb_probe.HUB-LB1-Probe.id}"
}

Debug Output

Panic Output

Expected Behavior

  • azurerm_lb_rule.HUB-LB1HaRule
    id:
    backend_address_pool_id: "${azurerm_lb_backend_address_pool.HUB-LB1-IpPool.id}"
    backend_port: "0"
    enable_floating_ip: "false"
    frontend_ip_configuration_id:
    frontend_ip_configuration_name: "${lookup(azurerm_lb.HUB-LB1.frontend_ip_configuration[0],"name")}"
    frontend_port: "0"
    idle_timeout_in_minutes:
    load_distribution:
    loadbalancer_id: "${azurerm_lb.HUB-LB1.id}"
    name: "HUB-LB1HaRule"
    probe_id: "${azurerm_lb_probe.HUB-LB1-Probe.id}"
    protocol: "all"
    resource_group_name: "HUB-RG"

Actual Behavior

Error: azurerm_lb_rule.AZE1-HUB-LB1HaRule: "backend_port" is not a valid port number: '\x00'
Error: azurerm_lb_rule.AZE1-HUB-LB1HaRule: "frontend_port" is not a valid port number: '\x00'

Steps to Reproduce

  1. `terraform apply or terraform plan'

Important Factoids

Running in Azure East

References

  • #0000
@torstenstern
Copy link

torstenstern commented Aug 30, 2018

Hello, is there any workaround for that?
I have the same issue with
Terraform v0.11.7

  • provider.azurerm v1.13.0
  • provider.null v1.0.0
  • provider.random v2.0.0

@jonathanlackey
Copy link
Author

I hard coded the version that worked for me in the provider and that took care of it in mycase:

provider "azurerm"{
version="=v1.10.0"
...
}

@JunyiYi
Copy link

JunyiYi commented Nov 14, 2018

Hi @jonathanlackey @torstenstern , thanks for reporting the issue. It has been fixed in v1.16.0 (#1951), please update to the latest provider.

@JunyiYi JunyiYi closed this as completed Nov 14, 2018
@ghost
Copy link

ghost commented Mar 6, 2019

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!

@ghost ghost locked and limited conversation to collaborators Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants