This module creates a new Network Security Group with two predefined rules that blocks all traffic from Virtual Network and AzureLoadBalancer, forcing the user to add custom rules for all required traffic. The Module also supports attaching the Network Security Group to multiple Subnets and Network Interfaces if required.
Examples can be found here.
Name | Version |
---|---|
terraform | >=1.3 |
azurerm | >=3.10.0, < 4.0 |
Name | Version |
---|---|
azurerm | >=3.10.0, < 4.0 |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
custom_rules | list of maps for custom rules | list(object({ |
[] |
no |
location | [REQUIRED] - azure location to place network security group | string |
n/a | yes |
network_interface_ids | a map with network interface names (key) & ids (value) to attach to nsg, NOTE: the name is required due to the requirement of setting a known value for the resource key when using for_each hashicorp/terraform#29957 | map(string) |
{} |
no |
network_security_group_name | [REQUIRED] - name given to new network security group | string |
n/a | yes |
resource_group_name | [REQUIRED] - parent resource group of network security group inside | string |
n/a | yes |
subnet_ids | a map with subnet names (key) & ids (value) to attach to nsg, NOTE: the name is required due to the requirement of setting a known value for the resource key when using for_each hashicorp/terraform#29957 | map(string) |
{} |
no |
tags | tags | map(any) |
{} |
no |
Name | Description |
---|---|
custom_rules | a map of all custom rules created |
network_security_group_id | the id of the new network security group |
network_security_group_name | the name of the new network security group |