» Data Source: azurerm_network_security_group

Use this data source to access the properties of a Network Security Group.

» Example Usage

data "azurerm_network_security_group" "test" {
  name                = "${azurerm_network_security_group.test.name}"
  resource_group_name = "${azurerm_resource_group.test.name}"
}

output "location" {
  value = "${data.azurerm_network_security_group.test.location}"
}

» Argument Reference

  • name - (Required) Specifies the Name of the Network Security Group.
  • resource_group_name - (Required) 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: