Skip to content

googleComputeNetworkEndpointGroup

Use this data source to access a Network Endpoint Group's attributes.

The NEG may be found by providing either a selfLink, or a name and a zone.

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.dataGoogleComputeNetworkEndpointGroup.DataGoogleComputeNetworkEndpointGroup(
  this,
  "neg1",
  {
    name: "k8s1-abcdef01-myns-mysvc-8080-4b6bac43",
    zone: "us-central1-a",
  }
);
new google.dataGoogleComputeNetworkEndpointGroup.DataGoogleComputeNetworkEndpointGroup(
  this,
  "neg2",
  {
    self_link:
      "https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/networkEndpointGroups/k8s1-abcdef01-myns-mysvc-8080-4b6bac43",
  }
);

Argument Reference

The following arguments are supported:

  • project - (Optional) The ID of the project to list versions in. If it is not provided, the provider project is used.

  • name - (Optional) The Network Endpoint Group name. Provide either this or a selfLink.

  • zone - (Optional) The Network Endpoint Group availability zone.

  • selfLink - (Optional) The Network Endpoint Group self_link.

Attributes Reference

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

  • network - The network to which all network endpoints in the NEG belong.
  • subnetwork - subnetwork to which all network endpoints in the NEG belong.
  • description - The NEG description.
  • networkEndpointType - Type of network endpoints in this network endpoint group.
  • defaultPort - The NEG default port.
  • size - Number of network endpoints in the network endpoint group.