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 moresecurity_rule
blocks as defined below. -
tags
- A mapping of tags assigned to the resource.
The security_rule
block supports:
-
name
- The name of the security rule. -
description
- The description for this rule. -
protocol
- The network protocol this rule applies to. -
source_port_range
- The Source Port or Range. -
destination_port_range
- The Destination Port or Range. -
source_address_prefix
- CIDR or source IP range or * to match any IP. -
destination_address_prefix
- CIDR or destination IP range or * to match any IP. -
source_application_security_group_ids
- A List of source Application Security Group ID's -
destination_application_security_group_ids
- A List of destination Application Security Group ID's -
access
- Is network traffic is allowed or denied? -
priority
- The priority of the rule -
direction
- The direction specifies if rule will be evaluated on incoming or outgoing traffic.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/azurerm/d/network_security_group.html