The following arguments are supported:
NOTE
Since security_rule can be configured both inline and via the separate azurerm_network_security_rule resource, we have to explicitly set it to empty slice ([]) to remove it.
A security_rule block support:
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_network_security_group" "example" {
name = "acceptanceTestSecurityGroup1"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
security_rule {
name = "test123"
priority = 100
direction = "Inbound"
access = "Allow"
protocol = "Tcp"
source_port_range = "*"
destination_port_range = "*"
source_address_prefix = "*"
destination_address_prefix = "*"
}
tags = {
environment = "Production"
}
}
az network nsg create --name
--resource-group
[--location]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--tags]
az network nsg create -g MyResourceGroup -n MyNsg --tags foo=bar
Categorized by Availability, Security & Compliance and Cost