Skip to main content

openstack_networking_router_v2

Last update:
For your information

This instruction is a copy of the official OpenStack Terraform provider documentation at Terraform Registry.

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

Example Usage

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

Argument Reference

  • region - (Optional) The region from which to obtain the V2 Neutron client. A Neutron client is required 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

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.