Skip to content

googleComputeNetworkPeering

Get information of a specified compute network peering. 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.*/
const googleComputeNetworkDefault = new google.computeNetwork.ComputeNetwork(
  this,
  "default",
  {
    auto_create_subnetworks: "false",
    name: "foobar",
  }
);
const googleComputeNetworkOther = new google.computeNetwork.ComputeNetwork(
  this,
  "other",
  {
    auto_create_subnetworks: "false",
    name: "other",
  }
);
const googleComputeNetworkPeeringPeering1 =
  new google.computeNetworkPeering.ComputeNetworkPeering(this, "peering1", {
    name: "peering1",
    network: googleComputeNetworkDefault.selfLink,
    peer_network: googleComputeNetworkOther.selfLink,
  });
new google.computeNetworkPeering.ComputeNetworkPeering(this, "peering2", {
  name: "peering2",
  network: googleComputeNetworkOther.selfLink,
  peer_network: googleComputeNetworkDefault.selfLink,
});
new google.dataGoogleComputeNetworkPeering.DataGoogleComputeNetworkPeering(
  this,
  "peering1_ds",
  {
    name: googleComputeNetworkPeeringPeering1.name,
    network: googleComputeNetworkPeeringPeering1.network,
  }
);

Argument Reference

The following arguments are supported:

  • name - (Required) Name of the peering.

  • network - (Required) The primary network of the peering.

Attributes Reference

See google_compute_network_peering resource for details of the available attributes.

Timeouts

This datasource provides the following Timeouts configuration options: configuration options:

  • read - Default is 4 minutes.