CompositionalIT / farmer

Repeatable Azure deployments with ARM templates - made easy!
https://compositionalit.github.io/farmer
MIT License
514 stars 156 forks source link

[Load Balancer] Using Subnets instead of VirtualNetworks to link per IP configured in the BackendAddressPool #1118

Closed memeghaj closed 1 week ago

memeghaj commented 2 weeks ago

This PR closes #1117

The changes in this PR are as follows:

I have read the contributing guidelines and have completed the following:

If I haven't completed any of the tasks above, I include the reasons why here:

Below is a minimal example configuration that includes the new features, which can be used to deploy to Azure:

backendAddressPool {
      name "lb-backend"
      vnet "my-vnet"
      subnet "my-subnet"
      add_ip_addresses [
          "10.0.1.4"
          "10.0.1.5"
      ]
 }
ninjarobot commented 2 weeks ago

The option of using a subnet doesn't have to replace the vnet - doing so is a breaking change. Can the builder just add the subnet name so the existing support for using only the vnet remains?

memeghaj commented 2 weeks ago

The resulting template JSON was tested on a Azure Sub and checked the deployment which was successful.