pulumi_wasm_providers_gcp_mini::compute

Module network_endpoint_group

source
Expand description

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:

§Example Usage

§Network Endpoint Group

resources:
  neg:
    type: gcp:compute:NetworkEndpointGroup
    properties:
      name: my-lb-neg
      network: ${default.id}
      subnetwork: ${defaultSubnetwork.id}
      defaultPort: '90'
      zone: us-central1-a
  default:
    type: gcp:compute:Network
    properties:
      name: neg-network
      autoCreateSubnetworks: false
  defaultSubnetwork:
    type: gcp:compute:Subnetwork
    name: default
    properties:
      name: neg-subnetwork
      ipCidrRange: 10.0.0.0/16
      region: us-central1
      network: ${default.id}

§Network Endpoint Group Non Gcp

resources:
  neg:
    type: gcp:compute:NetworkEndpointGroup
    properties:
      name: my-lb-neg
      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
    properties:
      name: neg-network

§Import

NetworkEndpointGroup can be imported using any of these accepted formats:

  • projects/{{project}}/zones/{{zone}}/networkEndpointGroups/{{name}}

  • {{project}}/{{zone}}/{{name}}

  • {{zone}}/{{name}}

  • {{name}}

When using the pulumi import command, 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}}

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments