Azure/terraform-azurerm-network-security-group

allow list of 'source_address_prefix'

ksista-ahc opened this issue · 3 comments

Does the module support list of allowed IP's addresses for a specific network rule?
I have a "list" variable source_address_prefix with list of IP addresses to whitelist, but this module doesn't seem to support it.

Have you tried using the variable source_address_prefixs (note the ending)
This worked for me.

Hi @kalyanrajsista ,Thanks for opening this issue. As the readme exmple shows, the predefined_rule should be allowed to specific the source_address_prefix. PR fixing this problem has been merged. But still, the source_address_prefix can assign only one address prefix, as defined in https://www.terraform.io/docs/providers/azurerm/d/network_security_group.html

@yupwei68 I think this is an underlying issue
The fact is that most of the time you don't know if you will have a single IP or a range of IPs or at some point during your infrastructures life that may change between the two.
Therefore you can not state you must use one statement for one type and one for another otherwise you will be constantly changing your code when all you want to do is change a variable. That's not the terraform way.
This should be reopened and looked at properly