nsg
Network Security Group
NetworkingAzure
General
General information about the service.
Description
Filter network traffic to and from Azure resources.
Namespace and Entity
Microsoft.Network/networkSecurityGroupsReferences
Chat
Powered by AITalk to this service to learn more about it.
Suggested questions:
Naming
The conventions, rules, and restrictions for naming this service.
Naming Convention
nsg-Length
1-80
Valid Characters
Alphanumerics, hyphens, underscores.
Scope
resource group
Code
Deploy your infrastructure as code using your preferred tooling.
Official Documentation
terraform
1resource "azurerm_network_security_group" "main" {2 name = "nsg-${var.workload}-${var.environment}"3 location = azurerm_resource_group.main.location4 resource_group_name = azurerm_resource_group.main.name56 security_rule {7 name = "AllowHTTPS"8 priority = 1009 direction = "Inbound"10 access = "Allow"11 protocol = "Tcp"12 source_port_range = "*"13 destination_port_range = "443"14 source_address_prefix = "*"15 destination_address_prefix = "*"16 }1718 security_rule {19 name = "DenyAllInbound"20 priority = 409621 direction = "Inbound"22 access = "Deny"23 protocol = "*"24 source_port_range = "*"25 destination_port_range = "*"26 source_address_prefix = "*"27 destination_address_prefix = "*"28 }2930 tags = var.tags31}
Utilities
Utilities to support app deployment or configuration.