---
title: "openstack_networking_router_v2"
description: ""
sidebar_position: 11
---

# openstack\_networking\_router\_v2

:::info

This instruction is a copy of the official OpenStack Terraform provider documentation at [Terraform Registry](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs).

:::

Use this data source to retrieve the ID of an available OpenStack router.

## Example Usage \{#example-usage}

```hcl
data "openstack_networking_router_v2" "router" {
  name = "router_1"
}
```

## Argument Reference \{#argument-reference}

* `region` - (optional) the region in which to obtain the V2 Neutron client. a Neutron client is needed to retrieve router ids. if omitted, the `region` argument of the provider is used.

* `router_id` - (Optional) The UUID of the router resource.

* `name` - (Optional) The name of the router.

* `description` - (Optional) A human-readable description of the router.

* `admin_state_up` - (Optional) The administrative up/down status of the router (must be "true" or "false" if provided).

* `distributed` - (Optional) Indicates whether to retrieve a distributed router.

* `status` - (Optional) The status of the router (ACTIVE/DOWN).

* `tags` - (Optional) A list of router tags to filter by.

* `tenant_id` - (Optional) The owner of the router.

## Attributes Reference \{#attributes-reference}

`id` is set to the ID of the found router. In addition, the following attributes are exported:

* `enable_snat` - A value indicating whether Source NAT is enabled on the router.

* `external_network_id` - The network UUID of the external gateway for the router.

* `availability_zone_hints` - The availability zone used to make router resources highly available.

* `external_fixed_ip` - The external fixed IPs of the router.

The `external_fixed_ip` block supports:

* `subnet_id` - Subnet in which the fixed IP belongs to.

* `ip_address` - The IP address to set for the router.

* `all_tags` - The set of string tags applied to the router.
