published on Wednesday, Apr 1, 2026 by Pulumi
published on Wednesday, Apr 1, 2026 by Pulumi
Use this data source to fetch a list of Network Endpoint Groups available in a project and zone.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const negs = gcp.compute.getNetworkEndpointGroups({
zone: "us-central1-a",
filter: "networkEdpointType=GCE_VM_IP_PORT",
});
import pulumi
import pulumi_gcp as gcp
negs = gcp.compute.get_network_endpoint_groups(zone="us-central1-a",
filter="networkEdpointType=GCE_VM_IP_PORT")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.GetNetworkEndpointGroups(ctx, &compute.GetNetworkEndpointGroupsArgs{
Zone: pulumi.StringRef("us-central1-a"),
Filter: pulumi.StringRef("networkEdpointType=GCE_VM_IP_PORT"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var negs = Gcp.Compute.GetNetworkEndpointGroups.Invoke(new()
{
Zone = "us-central1-a",
Filter = "networkEdpointType=GCE_VM_IP_PORT",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetNetworkEndpointGroupsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var negs = ComputeFunctions.getNetworkEndpointGroups(GetNetworkEndpointGroupsArgs.builder()
.zone("us-central1-a")
.filter("networkEdpointType=GCE_VM_IP_PORT")
.build());
}
}
variables:
negs:
fn::invoke:
function: gcp:compute:getNetworkEndpointGroups
arguments:
zone: us-central1-a
filter: networkEdpointType=GCE_VM_IP_PORT
Using getNetworkEndpointGroups
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getNetworkEndpointGroups(args: GetNetworkEndpointGroupsArgs, opts?: InvokeOptions): Promise<GetNetworkEndpointGroupsResult>
function getNetworkEndpointGroupsOutput(args: GetNetworkEndpointGroupsOutputArgs, opts?: InvokeOptions): Output<GetNetworkEndpointGroupsResult>def get_network_endpoint_groups(filter: Optional[str] = None,
project: Optional[str] = None,
zone: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNetworkEndpointGroupsResult
def get_network_endpoint_groups_output(filter: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
zone: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNetworkEndpointGroupsResult]func GetNetworkEndpointGroups(ctx *Context, args *GetNetworkEndpointGroupsArgs, opts ...InvokeOption) (*GetNetworkEndpointGroupsResult, error)
func GetNetworkEndpointGroupsOutput(ctx *Context, args *GetNetworkEndpointGroupsOutputArgs, opts ...InvokeOption) GetNetworkEndpointGroupsResultOutput> Note: This function is named GetNetworkEndpointGroups in the Go SDK.
public static class GetNetworkEndpointGroups
{
public static Task<GetNetworkEndpointGroupsResult> InvokeAsync(GetNetworkEndpointGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetNetworkEndpointGroupsResult> Invoke(GetNetworkEndpointGroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNetworkEndpointGroupsResult> getNetworkEndpointGroups(GetNetworkEndpointGroupsArgs args, InvokeOptions options)
public static Output<GetNetworkEndpointGroupsResult> getNetworkEndpointGroups(GetNetworkEndpointGroupsArgs args, InvokeOptions options)
fn::invoke:
function: gcp:compute/getNetworkEndpointGroups:getNetworkEndpointGroups
arguments:
# arguments dictionaryThe following arguments are supported:
- Filter string
- A filter expression that filters Network Endpoint Groups listed in the response.
- Project string
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- Zone string
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
- Filter string
- A filter expression that filters Network Endpoint Groups listed in the response.
- Project string
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- Zone string
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
- filter String
- A filter expression that filters Network Endpoint Groups listed in the response.
- project String
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- zone String
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
- filter string
- A filter expression that filters Network Endpoint Groups listed in the response.
- project string
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- zone string
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
- filter str
- A filter expression that filters Network Endpoint Groups listed in the response.
- project str
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- zone str
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
- filter String
- A filter expression that filters Network Endpoint Groups listed in the response.
- project String
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- zone String
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
getNetworkEndpointGroups Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Endpoint List<GetGroups Network Endpoint Groups Network Endpoint Group> - A list of all retrieved Network Endpoint Groups. For list of the attributes, see
the
gcp.compute.NetworkEndpointGroupdata source. - Filter string
- Project string
- Zone string
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Endpoint []GetGroups Network Endpoint Groups Network Endpoint Group - A list of all retrieved Network Endpoint Groups. For list of the attributes, see
the
gcp.compute.NetworkEndpointGroupdata source. - Filter string
- Project string
- Zone string
- id String
- The provider-assigned unique ID for this managed resource.
- network
Endpoint List<GetGroups Network Endpoint Groups Network Endpoint Group> - A list of all retrieved Network Endpoint Groups. For list of the attributes, see
the
gcp.compute.NetworkEndpointGroupdata source. - filter String
- project String
- zone String
- id string
- The provider-assigned unique ID for this managed resource.
- network
Endpoint GetGroups Network Endpoint Groups Network Endpoint Group[] - A list of all retrieved Network Endpoint Groups. For list of the attributes, see
the
gcp.compute.NetworkEndpointGroupdata source. - filter string
- project string
- zone string
- id str
- The provider-assigned unique ID for this managed resource.
- network_
endpoint_ Sequence[Getgroups Network Endpoint Groups Network Endpoint Group] - A list of all retrieved Network Endpoint Groups. For list of the attributes, see
the
gcp.compute.NetworkEndpointGroupdata source. - filter str
- project str
- zone str
- id String
- The provider-assigned unique ID for this managed resource.
- network
Endpoint List<Property Map>Groups - A list of all retrieved Network Endpoint Groups. For list of the attributes, see
the
gcp.compute.NetworkEndpointGroupdata source. - filter String
- project String
- zone String
Supporting Types
GetNetworkEndpointGroupsNetworkEndpointGroup
- Default
Port int - The default port used if the port number is not specified in the network endpoint.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Generated
Id int - The uniquely generated identifier for the resource. This identifier is defined by the server.
- Name string
- Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression 'a-z?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- Network string
- The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- Network
Endpoint stringType Type of network endpoints in this network endpoint group. NON_GCP_PRIVATE_IP_PORT is used for hybrid connectivity network endpoint groups (see https://cloud.google.com/load-balancing/docs/hybrid). Note that NON_GCP_PRIVATE_IP_PORT can only be used with Backend Services that 1) have the following load balancing schemes: EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED, and INTERNAL_SELF_MANAGED and 2) support the RATE or CONNECTION balancing modes.
Possible values include: GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_IP_PORT, INTERNET_FQDN_PORT, SERVERLESS, and PRIVATE_SERVICE_CONNECT. Default value: "GCE_VM_IP_PORT" Possible values: ["GCE_VM_IP", "GCE_VM_IP_PORT", "NON_GCP_PRIVATE_IP_PORT", "INTERNET_IP_PORT", "INTERNET_FQDN_PORT", "SERVERLESS", "PRIVATE_SERVICE_CONNECT"]
- Project string
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- Self
Link string - Size int
- Number of network endpoints in the network endpoint group.
- Subnetwork string
- Optional subnetwork to which all network endpoints in the NEG belong.
- Zone string
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
- Default
Port int - The default port used if the port number is not specified in the network endpoint.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Generated
Id int - The uniquely generated identifier for the resource. This identifier is defined by the server.
- Name string
- Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression 'a-z?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- Network string
- The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- Network
Endpoint stringType Type of network endpoints in this network endpoint group. NON_GCP_PRIVATE_IP_PORT is used for hybrid connectivity network endpoint groups (see https://cloud.google.com/load-balancing/docs/hybrid). Note that NON_GCP_PRIVATE_IP_PORT can only be used with Backend Services that 1) have the following load balancing schemes: EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED, and INTERNAL_SELF_MANAGED and 2) support the RATE or CONNECTION balancing modes.
Possible values include: GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_IP_PORT, INTERNET_FQDN_PORT, SERVERLESS, and PRIVATE_SERVICE_CONNECT. Default value: "GCE_VM_IP_PORT" Possible values: ["GCE_VM_IP", "GCE_VM_IP_PORT", "NON_GCP_PRIVATE_IP_PORT", "INTERNET_IP_PORT", "INTERNET_FQDN_PORT", "SERVERLESS", "PRIVATE_SERVICE_CONNECT"]
- Project string
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- Self
Link string - Size int
- Number of network endpoints in the network endpoint group.
- Subnetwork string
- Optional subnetwork to which all network endpoints in the NEG belong.
- Zone string
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
- default
Port Integer - The default port used if the port number is not specified in the network endpoint.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- generated
Id Integer - The uniquely generated identifier for the resource. This identifier is defined by the server.
- name String
- Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression 'a-z?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- network String
- The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- network
Endpoint StringType Type of network endpoints in this network endpoint group. NON_GCP_PRIVATE_IP_PORT is used for hybrid connectivity network endpoint groups (see https://cloud.google.com/load-balancing/docs/hybrid). Note that NON_GCP_PRIVATE_IP_PORT can only be used with Backend Services that 1) have the following load balancing schemes: EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED, and INTERNAL_SELF_MANAGED and 2) support the RATE or CONNECTION balancing modes.
Possible values include: GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_IP_PORT, INTERNET_FQDN_PORT, SERVERLESS, and PRIVATE_SERVICE_CONNECT. Default value: "GCE_VM_IP_PORT" Possible values: ["GCE_VM_IP", "GCE_VM_IP_PORT", "NON_GCP_PRIVATE_IP_PORT", "INTERNET_IP_PORT", "INTERNET_FQDN_PORT", "SERVERLESS", "PRIVATE_SERVICE_CONNECT"]
- project String
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- self
Link String - size Integer
- Number of network endpoints in the network endpoint group.
- subnetwork String
- Optional subnetwork to which all network endpoints in the NEG belong.
- zone String
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
- default
Port number - The default port used if the port number is not specified in the network endpoint.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- generated
Id number - The uniquely generated identifier for the resource. This identifier is defined by the server.
- name string
- Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression 'a-z?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- network string
- The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- network
Endpoint stringType Type of network endpoints in this network endpoint group. NON_GCP_PRIVATE_IP_PORT is used for hybrid connectivity network endpoint groups (see https://cloud.google.com/load-balancing/docs/hybrid). Note that NON_GCP_PRIVATE_IP_PORT can only be used with Backend Services that 1) have the following load balancing schemes: EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED, and INTERNAL_SELF_MANAGED and 2) support the RATE or CONNECTION balancing modes.
Possible values include: GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_IP_PORT, INTERNET_FQDN_PORT, SERVERLESS, and PRIVATE_SERVICE_CONNECT. Default value: "GCE_VM_IP_PORT" Possible values: ["GCE_VM_IP", "GCE_VM_IP_PORT", "NON_GCP_PRIVATE_IP_PORT", "INTERNET_IP_PORT", "INTERNET_FQDN_PORT", "SERVERLESS", "PRIVATE_SERVICE_CONNECT"]
- project string
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- self
Link string - size number
- Number of network endpoints in the network endpoint group.
- subnetwork string
- Optional subnetwork to which all network endpoints in the NEG belong.
- zone string
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
- default_
port int - The default port used if the port number is not specified in the network endpoint.
- description str
- An optional description of this resource. Provide this property when you create the resource.
- generated_
id int - The uniquely generated identifier for the resource. This identifier is defined by the server.
- name str
- Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression 'a-z?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- network str
- The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- network_
endpoint_ strtype Type of network endpoints in this network endpoint group. NON_GCP_PRIVATE_IP_PORT is used for hybrid connectivity network endpoint groups (see https://cloud.google.com/load-balancing/docs/hybrid). Note that NON_GCP_PRIVATE_IP_PORT can only be used with Backend Services that 1) have the following load balancing schemes: EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED, and INTERNAL_SELF_MANAGED and 2) support the RATE or CONNECTION balancing modes.
Possible values include: GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_IP_PORT, INTERNET_FQDN_PORT, SERVERLESS, and PRIVATE_SERVICE_CONNECT. Default value: "GCE_VM_IP_PORT" Possible values: ["GCE_VM_IP", "GCE_VM_IP_PORT", "NON_GCP_PRIVATE_IP_PORT", "INTERNET_IP_PORT", "INTERNET_FQDN_PORT", "SERVERLESS", "PRIVATE_SERVICE_CONNECT"]
- project str
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- self_
link str - size int
- Number of network endpoints in the network endpoint group.
- subnetwork str
- Optional subnetwork to which all network endpoints in the NEG belong.
- zone str
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
- default
Port Number - The default port used if the port number is not specified in the network endpoint.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- generated
Id Number - The uniquely generated identifier for the resource. This identifier is defined by the server.
- name String
- Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression 'a-z?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
- network String
- The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- network
Endpoint StringType Type of network endpoints in this network endpoint group. NON_GCP_PRIVATE_IP_PORT is used for hybrid connectivity network endpoint groups (see https://cloud.google.com/load-balancing/docs/hybrid). Note that NON_GCP_PRIVATE_IP_PORT can only be used with Backend Services that 1) have the following load balancing schemes: EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED, and INTERNAL_SELF_MANAGED and 2) support the RATE or CONNECTION balancing modes.
Possible values include: GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_IP_PORT, INTERNET_FQDN_PORT, SERVERLESS, and PRIVATE_SERVICE_CONNECT. Default value: "GCE_VM_IP_PORT" Possible values: ["GCE_VM_IP", "GCE_VM_IP_PORT", "NON_GCP_PRIVATE_IP_PORT", "INTERNET_IP_PORT", "INTERNET_FQDN_PORT", "SERVERLESS", "PRIVATE_SERVICE_CONNECT"]
- project String
- The ID of the project to list Network Endpoint Groups in. If it is not provided, the provider project is used.
- self
Link String - size Number
- Number of network endpoints in the network endpoint group.
- subnetwork String
- Optional subnetwork to which all network endpoints in the NEG belong.
- zone String
- The zone to list Network Endpoint Groups for. If
zoneis not specified, the provider-level zone must be set and is used instead.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Wednesday, Apr 1, 2026 by Pulumi
