Use this data source to access the properties of an Azure Subnet located within a Virtual Network.
data "azurestack_subnet" "test" {
name = "backend"
virtual_network_name = "production"
resource_group_name = "networking"
}
output "subnet_id" {
value = data.azurestack_subnet.test.id
}
name
- (Required) Specifies the name of the Subnet.virtual_network_name
- (Required) Specifies the name of the Virtual Network this Subnet is located within.resource_group_name
- (Required) Specifies the name of the resource group the Virtual Network is located in.id
- The ID of the Subnet.address_prefix
- The address prefix used for the subnet.network_security_group_id
- The ID of the Network Security Group associated with the subnet.route_table_id
- The ID of the Route Table associated with this subnet.