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

Port allocation does not set to use the default number of outbound ports #16343

Closed
1 task done
tanvp112 opened this issue Apr 12, 2022 · 4 comments · Fixed by #16369
Closed
1 task done

Port allocation does not set to use the default number of outbound ports #16343

tanvp112 opened this issue Apr 12, 2022 · 4 comments · Fixed by #16369
Labels
Milestone

Comments

@tanvp112
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.1.8

AzureRM Provider Version

3.1.0

Affected Resource(s)/Data Source(s)

azurerm_lb_outbound_rule

Terraform Configuration Files

// https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_outbound_rule#example-usage

resource "azurerm_lb_outbound_rule" "example" {
  loadbalancer_id         = azurerm_lb.example.id
  name                    = "OutboundRule"
  protocol                = "Tcp"
  backend_address_pool_id = azurerm_lb_backend_address_pool.example.id

  frontend_ip_configuration {
    name = "PublicIPAddress"
  }

  allocated_outbound_ports = 0
}

Debug Output/Panic Output

N/A

Expected Behaviour

An outbound rules of port allocation set to zero with Port allocation set to "Use the default number of outbound ports" should be created.

image

image

Actual Behaviour

An outbound rule of port allocation is set to 1024 despite allocated_outbound_ports = 0 was specified in the code, and Port allocation required manual intervention to set it to "Use the default number of outbound ports".

image

image

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@myc2h6o
Copy link
Contributor

myc2h6o commented Apr 13, 2022

Hi @tanvp112 this seems to be a bug in the provider that 0 is ignored. I've raised a pr #16369 to fix it. And for "Use the default number of outbound ports", unfortunately current Azure API doesn't allow us to do it, but I found an issue already tracking this #11862, would you mind subscribe to it for update

@tanvp112
Copy link
Author

I look forward to the fix in the provider soon, thanks for the prompt replied.

katbyte pushed a commit that referenced this issue Apr 14, 2022
Fix #16343

0 seems to be a valid input for allocated_outbound_ports, adding validation and use d.Get instead of d.GetOk to include it.
Adding the missing default value of 1024 in doc
There seems to be not test around allocated_outbound_ports, adding it as well.
@github-actions github-actions bot added this to the v3.2.0 milestone Apr 14, 2022
@github-actions
Copy link

This functionality has been released in v3.2.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants