Azure / terraform-azurerm-hubnetworking

Terraform verified module for deploying multi-hub & spoke architectures
https://registry.terraform.io/modules/Azure/hubnetworking/azurerm/latest
MIT License
22 stars 17 forks source link

Support multiple public ips for firewall #58

Open lonegunmanb opened 1 year ago

lonegunmanb commented 1 year ago

Describe your changes

Issue number

56

Checklist before requesting a review

Thanks for your cooperation!

matt-FFFFFF commented 1 year ago

@lonegunmanb

I think we should consider adding g a new map to the firewall block to account for multiple IP addresses.

We keep the default_ip_configuration block but deprecate it. Recommending that users use the new ip_configurations map.

Behind the scenes we move the public ip resource into a for_each loop. If customer uses only default_ip_configuration we can create a map with a single entry.

This way we ensure the module can create all the required resources and do not make any breaking changes.

We can use the moved block inside the module to cope with the change

This way we provide a consistent way to implement public IPs.