Get information of a specified compute network peering. For more information see the official documentation and API.
resource "google_compute_network_peering" "peering1" {
name = "peering1"
network = google_compute_network.default.self_link
peer_network = google_compute_network.other.self_link
}
resource "google_compute_network_peering" "peering2" {
name = "peering2"
network = google_compute_network.other.self_link
peer_network = google_compute_network.default.self_link
}
resource "google_compute_network" "default" {
name = "foobar"
auto_create_subnetworks = "false"
}
resource "google_compute_network" "other" {
name = "other"
auto_create_subnetworks = "false"
}
data "google_compute_network_peering" "peering1_ds" {
name = google_compute_network_peering.peering1.name
network = google_compute_network_peering.peering1.network
}
The following arguments are supported:
name
- (Required) Name of the peering.
network
- (Required) The primary network of the peering.
See google_compute_network_peering resource for details of the available attributes.
This datasource provides the following Timeouts configuration options: configuration options:
read
- Default is 4 minutes.