Show / Hide Table of Contents

Class NetworkEndpointGroup

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.

To get more information about NetworkEndpointGroup, see:

  • API documentation
  • How-to Guides
  • Official Documentation

Example Usage - Network Endpoint Group

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var defaultNetwork = new Gcp.Compute.Network("defaultNetwork", new Gcp.Compute.NetworkArgs
    {
        AutoCreateSubnetworks = false,
    });
    var defaultSubnetwork = new Gcp.Compute.Subnetwork("defaultSubnetwork", new Gcp.Compute.SubnetworkArgs
    {
        IpCidrRange = "10.0.0.0/16",
        Region = "us-central1",
        Network = defaultNetwork.Id,
    });
    var neg = new Gcp.Compute.NetworkEndpointGroup("neg", new Gcp.Compute.NetworkEndpointGroupArgs
    {
        Network = defaultNetwork.Id,
        Subnetwork = defaultSubnetwork.Id,
        DefaultPort = "90",
        Zone = "us-central1-a",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
NetworkEndpointGroup
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Compute
Assembly: Pulumi.Gcp.dll
Syntax
public class NetworkEndpointGroup : CustomResource

Constructors

View Source

NetworkEndpointGroup(String, NetworkEndpointGroupArgs, CustomResourceOptions)

Create a NetworkEndpointGroup resource with the given unique name, arguments, and options.

Declaration
public NetworkEndpointGroup(string name, NetworkEndpointGroupArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

NetworkEndpointGroupArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

DefaultPort

The default port used if the port number is not specified in the network endpoint.

Declaration
public Output<int?> DefaultPort { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Description

An optional description of this resource. Provide this property when you create the resource.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

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.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Network

The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.

Declaration
public Output<string> Network { get; }
Property Value
Type Description
Output<System.String>
View Source

NetworkEndpointType

Type of network endpoints in this network endpoint group.

Declaration
public Output<string> NetworkEndpointType { get; }
Property Value
Type Description
Output<System.String>
View Source

Project

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Declaration
public Output<string> Project { get; }
Property Value
Type Description
Output<System.String>
View Source

SelfLink

The URI of the created resource.

Declaration
public Output<string> SelfLink { get; }
Property Value
Type Description
Output<System.String>
View Source

Size

Number of network endpoints in the network endpoint group.

Declaration
public Output<int> Size { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Subnetwork

Optional subnetwork to which all network endpoints in the NEG belong.

Declaration
public Output<string> Subnetwork { get; }
Property Value
Type Description
Output<System.String>
View Source

Zone

Zone where the network endpoint group is located.

Declaration
public Output<string> Zone { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, NetworkEndpointGroupState, CustomResourceOptions)

Get an existing NetworkEndpointGroup resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static NetworkEndpointGroup Get(string name, Input<string> id, NetworkEndpointGroupState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

NetworkEndpointGroupState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
NetworkEndpointGroup
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.