Skip to content

Instantly share code, notes, and snippets.

@taofeekaoyusuf
Last active August 9, 2022 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taofeekaoyusuf/b99fde2b5f856714ce94e4504ce19ade to your computer and use it in GitHub Desktop.
Save taofeekaoyusuf/b99fde2b5f856714ce94e4504ce19ade to your computer and use it in GitHub Desktop.
This snippet is an excerpt to creating multiple Network Security Group Rule
locals {
nsgrules = {
rdp = {
name = "DenyVNetInboundFromInternet"
priority = 101
direction = "Inbound"
access = "Deny"
protocol = "*"
source_port_range = "*"
destination_port_range = "*"
source_address_prefix = "Internet"
destination_address_prefix = "VirtualNetwork"
}
sql = {
name = "sql"
priority = 102
direction = "Inbound"
access = "Allow"
protocol = "Tcp"
source_port_range = "*"
destination_port_range = "1433"
source_address_prefix = "SqlManagement"
destination_address_prefix = "*"
}
http = {
name = "http"
priority = 201
direction = "Inbound"
access = "Allow"
protocol = "Tcp"
source_port_range = "*"
destination_port_range = "80"
source_address_prefix = "*"
destination_address_prefix = "*"
}
}
}
@taofeekaoyusuf
Copy link
Author

taofeekaoyusuf commented Aug 9, 2022

Multiple Network Security Group Rule declarations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment