gcp.compute.NetworkEndpointGroup
Explore with Pulumi AI
Network endpoint groups (NEGs) are zonal resources that represent collections of IP address and port combinations for GCP resources within a single subnet. Each IP address and port combination is called a network endpoint.
Network endpoint groups can be used as backends in backend services for HTTP(S), TCP proxy, and SSL proxy load balancers. You cannot use NEGs as a backend with internal load balancers. Because NEG backends allow you to specify IP addresses and ports, you can distribute traffic in a granular fashion among applications or containers running within VM instances.
Recreating a network endpoint group that’s in use by another resource will give a
resourceInUseByAnotherResource
error. Use lifecycle.create_before_destroy
to avoid this type of error.
To get more information about NetworkEndpointGroup, see:
- API documentation
- How-to Guides
Example Usage
Network Endpoint Group
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var defaultNetwork = new Gcp.Compute.Network("defaultNetwork", new()
{
AutoCreateSubnetworks = false,
});
var defaultSubnetwork = new Gcp.Compute.Subnetwork("defaultSubnetwork", new()
{
IpCidrRange = "10.0.0.0/16",
Region = "us-central1",
Network = defaultNetwork.Id,
});
var neg = new Gcp.Compute.NetworkEndpointGroup("neg", new()
{
Network = defaultNetwork.Id,
Subnetwork = defaultSubnetwork.Id,
DefaultPort = 90,
Zone = "us-central1-a",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
defaultNetwork, err := compute.NewNetwork(ctx, "defaultNetwork", &compute.NetworkArgs{
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
defaultSubnetwork, err := compute.NewSubnetwork(ctx, "defaultSubnetwork", &compute.SubnetworkArgs{
IpCidrRange: pulumi.String("10.0.0.0/16"),
Region: pulumi.String("us-central1"),
Network: defaultNetwork.ID(),
})
if err != nil {
return err
}
_, err = compute.NewNetworkEndpointGroup(ctx, "neg", &compute.NetworkEndpointGroupArgs{
Network: defaultNetwork.ID(),
Subnetwork: defaultSubnetwork.ID(),
DefaultPort: pulumi.Int(90),
Zone: pulumi.String("us-central1-a"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.compute.NetworkEndpointGroup;
import com.pulumi.gcp.compute.NetworkEndpointGroupArgs;
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) {
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.autoCreateSubnetworks(false)
.build());
var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()
.ipCidrRange("10.0.0.0/16")
.region("us-central1")
.network(defaultNetwork.id())
.build());
var neg = new NetworkEndpointGroup("neg", NetworkEndpointGroupArgs.builder()
.network(defaultNetwork.id())
.subnetwork(defaultSubnetwork.id())
.defaultPort("90")
.zone("us-central1-a")
.build());
}
}
import pulumi
import pulumi_gcp as gcp
default_network = gcp.compute.Network("defaultNetwork", auto_create_subnetworks=False)
default_subnetwork = gcp.compute.Subnetwork("defaultSubnetwork",
ip_cidr_range="10.0.0.0/16",
region="us-central1",
network=default_network.id)
neg = gcp.compute.NetworkEndpointGroup("neg",
network=default_network.id,
subnetwork=default_subnetwork.id,
default_port=90,
zone="us-central1-a")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const defaultNetwork = new gcp.compute.Network("defaultNetwork", {autoCreateSubnetworks: false});
const defaultSubnetwork = new gcp.compute.Subnetwork("defaultSubnetwork", {
ipCidrRange: "10.0.0.0/16",
region: "us-central1",
network: defaultNetwork.id,
});
const neg = new gcp.compute.NetworkEndpointGroup("neg", {
network: defaultNetwork.id,
subnetwork: defaultSubnetwork.id,
defaultPort: 90,
zone: "us-central1-a",
});
resources:
neg:
type: gcp:compute:NetworkEndpointGroup
properties:
network: ${defaultNetwork.id}
subnetwork: ${defaultSubnetwork.id}
defaultPort: '90'
zone: us-central1-a
defaultNetwork:
type: gcp:compute:Network
properties:
autoCreateSubnetworks: false
defaultSubnetwork:
type: gcp:compute:Subnetwork
properties:
ipCidrRange: 10.0.0.0/16
region: us-central1
network: ${defaultNetwork.id}
Network Endpoint Group Non Gcp
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.Compute.Network("default");
var neg = new Gcp.Compute.NetworkEndpointGroup("neg", new()
{
Network = @default.Id,
DefaultPort = 90,
Zone = "us-central1-a",
NetworkEndpointType = "NON_GCP_PRIVATE_IP_PORT",
});
var default_endpoint = new Gcp.Compute.NetworkEndpoint("default-endpoint", new()
{
NetworkEndpointGroup = neg.Name,
Port = neg.DefaultPort,
IpAddress = "127.0.0.1",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewNetwork(ctx, "default", nil)
if err != nil {
return err
}
neg, err := compute.NewNetworkEndpointGroup(ctx, "neg", &compute.NetworkEndpointGroupArgs{
Network: _default.ID(),
DefaultPort: pulumi.Int(90),
Zone: pulumi.String("us-central1-a"),
NetworkEndpointType: pulumi.String("NON_GCP_PRIVATE_IP_PORT"),
})
if err != nil {
return err
}
_, err = compute.NewNetworkEndpoint(ctx, "default-endpoint", &compute.NetworkEndpointArgs{
NetworkEndpointGroup: neg.Name,
Port: neg.DefaultPort,
IpAddress: pulumi.String("127.0.0.1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkEndpointGroup;
import com.pulumi.gcp.compute.NetworkEndpointGroupArgs;
import com.pulumi.gcp.compute.NetworkEndpoint;
import com.pulumi.gcp.compute.NetworkEndpointArgs;
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) {
var default_ = new Network("default");
var neg = new NetworkEndpointGroup("neg", NetworkEndpointGroupArgs.builder()
.network(default_.id())
.defaultPort("90")
.zone("us-central1-a")
.networkEndpointType("NON_GCP_PRIVATE_IP_PORT")
.build());
var default_endpoint = new NetworkEndpoint("default-endpoint", NetworkEndpointArgs.builder()
.networkEndpointGroup(neg.name())
.port(neg.defaultPort())
.ipAddress("127.0.0.1")
.build());
}
}
import pulumi
import pulumi_gcp as gcp
default = gcp.compute.Network("default")
neg = gcp.compute.NetworkEndpointGroup("neg",
network=default.id,
default_port=90,
zone="us-central1-a",
network_endpoint_type="NON_GCP_PRIVATE_IP_PORT")
default_endpoint = gcp.compute.NetworkEndpoint("default-endpoint",
network_endpoint_group=neg.name,
port=neg.default_port,
ip_address="127.0.0.1")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.compute.Network("default", {});
const neg = new gcp.compute.NetworkEndpointGroup("neg", {
network: _default.id,
defaultPort: 90,
zone: "us-central1-a",
networkEndpointType: "NON_GCP_PRIVATE_IP_PORT",
});
const default_endpoint = new gcp.compute.NetworkEndpoint("default-endpoint", {
networkEndpointGroup: neg.name,
port: neg.defaultPort,
ipAddress: "127.0.0.1",
});
resources:
neg:
type: gcp:compute:NetworkEndpointGroup
properties:
network: ${default.id}
defaultPort: '90'
zone: us-central1-a
networkEndpointType: NON_GCP_PRIVATE_IP_PORT
default-endpoint:
type: gcp:compute:NetworkEndpoint
properties:
networkEndpointGroup: ${neg.name}
port: ${neg.defaultPort}
ipAddress: 127.0.0.1
default:
type: gcp:compute:Network
Create NetworkEndpointGroup Resource
new NetworkEndpointGroup(name: string, args: NetworkEndpointGroupArgs, opts?: CustomResourceOptions);
@overload
def NetworkEndpointGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
default_port: Optional[int] = None,
description: Optional[str] = None,
name: Optional[str] = None,
network: Optional[str] = None,
network_endpoint_type: Optional[str] = None,
project: Optional[str] = None,
subnetwork: Optional[str] = None,
zone: Optional[str] = None)
@overload
def NetworkEndpointGroup(resource_name: str,
args: NetworkEndpointGroupArgs,
opts: Optional[ResourceOptions] = None)
func NewNetworkEndpointGroup(ctx *Context, name string, args NetworkEndpointGroupArgs, opts ...ResourceOption) (*NetworkEndpointGroup, error)
public NetworkEndpointGroup(string name, NetworkEndpointGroupArgs args, CustomResourceOptions? opts = null)
public NetworkEndpointGroup(String name, NetworkEndpointGroupArgs args)
public NetworkEndpointGroup(String name, NetworkEndpointGroupArgs args, CustomResourceOptions options)
type: gcp:compute:NetworkEndpointGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkEndpointGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NetworkEndpointGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NetworkEndpointGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkEndpointGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkEndpointGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
NetworkEndpointGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The NetworkEndpointGroup resource accepts the following input properties:
- Network string
The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- 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.
- 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
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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- Subnetwork string
Optional subnetwork to which all network endpoints in the NEG belong.
- Zone string
Zone where the network endpoint group is located.
- Network string
The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- 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.
- 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
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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- Subnetwork string
Optional subnetwork to which all network endpoints in the NEG belong.
- Zone string
Zone where the network endpoint group is located.
- network String
The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- 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.
- 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
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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- subnetwork String
Optional subnetwork to which all network endpoints in the NEG belong.
- zone String
Zone where the network endpoint group is located.
- network string
The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- 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.
- 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
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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- subnetwork string
Optional subnetwork to which all network endpoints in the NEG belong.
- zone string
Zone where the network endpoint group is located.
- network str
The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- 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.
- 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_
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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- subnetwork str
Optional subnetwork to which all network endpoints in the NEG belong.
- zone str
Zone where the network endpoint group is located.
- network String
The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
- 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.
- 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
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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- subnetwork String
Optional subnetwork to which all network endpoints in the NEG belong.
- zone String
Zone where the network endpoint group is located.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkEndpointGroup resource produces the following output properties:
Look up Existing NetworkEndpointGroup Resource
Get an existing NetworkEndpointGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NetworkEndpointGroupState, opts?: CustomResourceOptions): NetworkEndpointGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
default_port: Optional[int] = None,
description: Optional[str] = None,
name: Optional[str] = None,
network: Optional[str] = None,
network_endpoint_type: Optional[str] = None,
project: Optional[str] = None,
self_link: Optional[str] = None,
size: Optional[int] = None,
subnetwork: Optional[str] = None,
zone: Optional[str] = None) -> NetworkEndpointGroup
func GetNetworkEndpointGroup(ctx *Context, name string, id IDInput, state *NetworkEndpointGroupState, opts ...ResourceOption) (*NetworkEndpointGroup, error)
public static NetworkEndpointGroup Get(string name, Input<string> id, NetworkEndpointGroupState? state, CustomResourceOptions? opts = null)
public static NetworkEndpointGroup get(String name, Output<String> id, NetworkEndpointGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- 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.
- 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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- Self
Link string The URI of the created resource.
- 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
Zone where the network endpoint group is located.
- 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.
- 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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- Self
Link string The URI of the created resource.
- 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
Zone where the network endpoint group is located.
- 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.
- 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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- self
Link String The URI of the created resource.
- 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
Zone where the network endpoint group is located.
- 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.
- 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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- self
Link string The URI of the created resource.
- 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
Zone where the network endpoint group is located.
- 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.
- 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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- self_
link str The URI of the created resource.
- 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
Zone where the network endpoint group is located.
- 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.
- 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 is
GCE_VM_IP_PORT
. Possible values are: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 in which the resource belongs. If it is not provided, the provider project is used.
- self
Link String The URI of the created resource.
- 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
Zone where the network endpoint group is located.
Import
NetworkEndpointGroup can be imported using any of these accepted formats* projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{name}}
* {{project}}/{{zone}}/{{name}}
* {{zone}}/{{name}}
* {{name}}
In Terraform v1.5.0 and later, use an import
block to import NetworkEndpointGroup using one of the formats above. For exampletf import {
id = “projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{name}}”
to = google_compute_network_endpoint_group.default }
$ pulumi import gcp:compute/networkEndpointGroup:NetworkEndpointGroup When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), NetworkEndpointGroup can be imported using one of the formats above. For example
$ pulumi import gcp:compute/networkEndpointGroup:NetworkEndpointGroup default projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{name}}
$ pulumi import gcp:compute/networkEndpointGroup:NetworkEndpointGroup default {{project}}/{{zone}}/{{name}}
$ pulumi import gcp:compute/networkEndpointGroup:NetworkEndpointGroup default {{zone}}/{{name}}
$ pulumi import gcp:compute/networkEndpointGroup:NetworkEndpointGroup default {{name}}
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
google-beta
Terraform Provider.