» Data Source: azurerm_network_security_group

Use this data source to access information about an existing Network Security Group.

» Example Usage

data "azurerm_network_security_group" "example" {
  name                = azurerm_network_security_group.example.name
  resource_group_name = azurerm_resource_group.example.name
}

output "location" {
  value = data.azurerm_network_security_group.example.location
}

» Argument Reference

  • name - Specifies the Name of the Network Security Group.
  • resource_group_name - Specifies the Name of the Resource Group within which the Network Security Group exists

» Attributes Reference

  • id - The ID of the Network Security Group.

  • location - The supported Azure location where the resource exists.

  • security_rule - One or more security_rule blocks as defined below.

  • tags - A mapping of tags assigned to the resource.

The security_rule block supports:

» Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the Network Security Group.