Skip to content

googleComputeNetwork

Get a network within GCE from its name.

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.dataGoogleComputeNetwork.DataGoogleComputeNetwork(
  this,
  "my-network",
  {
    name: "default-us-east1",
  }
);

Argument Reference

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.

Attributes Reference

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

  • id - an identifier for the resource with format projects/{{project}}/global/networks/{{name}}

  • description - Description of this network.

  • gatewayIpv4 - The IP address of the gateway.

  • subnetworksSelfLinks - the list of subnetworks which belong to the network

  • selfLink - The URI of the resource.