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
Create a NetworkEndpointGroup Resource
new NetworkEndpointGroup(name: string, args: NetworkEndpointGroupArgs, opts?: CustomResourceOptions);def NetworkEndpointGroup(resource_name, opts=None, default_port=None, description=None, name=None, network=None, network_endpoint_type=None, project=None, subnetwork=None, zone=None, __props__=None);func NewNetworkEndpointGroup(ctx *Context, name string, args NetworkEndpointGroupArgs, opts ...ResourceOption) (*NetworkEndpointGroup, error)public NetworkEndpointGroup(string name, NetworkEndpointGroupArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
NetworkEndpointGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model 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.
- 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.
- 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.
- 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 float 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.
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkEndpointGroup resource produces the following output properties:
Look up an 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): NetworkEndpointGroupstatic get(resource_name, id, opts=None, default_port=None, description=None, name=None, network=None, network_endpoint_type=None, project=None, self_link=None, size=None, subnetwork=None, zone=None, __props__=None);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)- 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.
The following state arguments are supported:
- 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.
- 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.
- 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 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.
- 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 float 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.
- 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 float
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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.