Get a network within GCE from its name.
data "google_compute_network" "my-network" { name = "default-us-east1" }
The following arguments are supported:
name
- (Required) The name of the network. project
- (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used. 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 network.
description
- Description of this network.
gateway_ipv4
- The IP address of the gateway.
subnetworks_self_links
- the list of subnetworks which belong to the network
self_link
- The URI of the resource.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/google/d/datasource_compute_network.html