Azure has just announced support for Outbound Rules on Standard Sku Load Balancers. Outbound rules make it simple to configure public Standard Load Balancer's outbound network address translation. You have full declarative control over outbound connectivity to scale and tune this ability to your specific needs.
azurerm_lb_outbound_rule
resource "azurerm_public_ip" "test" {
  name                         = "PublicIPForLB"
  location                     = "West US"
  resource_group_name          = "${azurerm_resource_group.test.name}"
  public_ip_address_allocation = "static"
}
resource "azurerm_lb" "test" {
  name                = "TestLoadBalancer"
  location            = "West US"
  resource_group_name = "${azurerm_resource_group.test.name}"
  frontend_ip_configuration {
    name                 = "PublicIPAddress"
    public_ip_address_id = "${azurerm_public_ip.test.id}"
  }
}
resource "azurerm_lb_backend_address_pool" "test" {
  resource_group_name = "${azurerm_resource_group.test.name}"
  loadbalancer_id     = "${azurerm_lb.test.id}"
  name                = "BackEndAddressPool"
}
resource "azurerm_lb_outbound_rule" "test" {
  resource_group_name = "${azurerm_resource_group.test.name}"
  loadbalancer_id = "${azurerm_lb.test.id}"
  name = "outboundRule"
  frontend_ip_configurations = "PublicIPAddress"
  idleTimeoutInMinutes = 60
  enableTcpReset = $true 
  protocol = "All"
  backendAddressPool = ["${azurerm_lb_backend_address_pool.test.id}"]
}
https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-rules-overview
https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections#ilpip
@metacpp As I am not as familiar with the GO SDK, how can we confirm that support for Outbound Rules exists?
@PleaseStopAsking thanks for opening this request.
You can find all released packages for network at:
https://github.com/Azure/azure-sdk-for-go/blob/master/services/network/mgmt
For Outbound Rules, you can find it at 2018-08-01 API:
https://github.com/Azure/azure-sdk-for-go/blob/master/services/network/mgmt/2018-08-01/network/loadbalanceroutboundrules.go
@metacpp As Outbound Rules are supported in the SDK starting at 2018-08-01, would this require updating the SDK in /vendor to the new version for all network resources or is there a way to only use it for load balancer resources?
I tested simply adding the new version to the network dir but as expected there are other dependencies with the new version.
@metacpp As Outbound Rules are supported in the SDK starting at 2018-08-01, would this require updating the SDK in /vendor to the new version for all network resources or is there a way to only use it for load balancer resources?
We're using v21.3.0 for Azure Go SDK, which contains the 2018-08-01:
https://github.com/Azure/azure-sdk-for-go/tree/v21.3.0/services/network/mgmt
You can just use below command to fetch package for 2018-08-01:
govendor fetch "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network"@v21.3.0
Hi,
I could start working on this new resource now that it's using v24 for the SDK.
Is there anything that I should check before adding this feature?
@mcharriere Thanks for pointing it out.
Yes, you should use v24 now, and please also use the latest API version, 2018-10-01.
@mcharriere are you picking this up in the end?
@mcharriere are you picking this up in the end?
Yes, I'm about to finish it. just polishing it a bit. I hope I'll have it done by Mondey
Super! Good news.
On Feb 15, 2019, at 6:59 PM, mcharriere notifications@github.com wrote:
@mcharriere are you picking this up in the end?
Yes, I'm about to finish it. just polishing it a bit. I hope I'll have it done by Mondey
โ
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Hi. I think that this could be closed after merging the pull request. Did I miss something? Thanks
@mcharriere thanks for the ping - agreed this can now be closed since #2912 has shipped - thanks ๐
This has been released in version 1.23.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:
provider "azurerm" {
    version = "~> 1.23.0"
}
# ... other configuration ...
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!
Most helpful comment
Yes, I'm about to finish it. just polishing it a bit. I hope I'll have it done by Mondey