Skip to content

googleComputeRouterStatus

Get a Cloud Router's status within GCE from its name and region. This data source exposes the routes learned by a Cloud Router via BGP peers.

For more information see the official documentation and API.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.dataGoogleComputeRouterStatus.DataGoogleComputeRouterStatus(
  this,
  "my-router",
  {
    name: "myrouter",
  }
);

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the router.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

  • region - (Optional) The region this router has been created in. If unspecified, this defaults to the region configured in the provider.

Attributes Reference

In addition to the arguments listed above, the following attributes are exported:

  • network - The network name or resource link to the parent network of this subnetwork.

  • bestRoutes - List of best compute#routes configurations for this router's network. See google_compute_route resource for available attributes.

  • bestRoutesForRouter - List of best compute#routes for this specific router. See google_compute_route resource for available attributes.