I want to define multiple address prefixes in the source or destination prefixes when adding a rule in a NSG. When I try to apply this, I get an Azure API error. What is the correct syntax to use ?
resource “azurerm_network_security_group” “nsg-test” {
name = “nsg-test”
location = var.region
resource_group_name = azurerm_resource_group.rg-test.name
security_rule {
name = "AllowSSHIn"
priority = 100
direction = "Inbound"
access = "Allow"
protocol = "Tcp"
source_port_range = "*"
destination_port_range = "22"
source_address_prefix = "10.100.0.0/16,10.79.0.0/16"
destination_address_prefix = "*"
}
}
Error I get when applying :
AllowSSHIn has invalid Address prefix. Value provided: 10.100.0.0/16,10.79.0.0/16"