pulumi_wasm_providers_gcp_mini::compute

Module region_network_endpoint

source
Expand description

A Region network endpoint represents a IP address/FQDN and port combination that is part of a specific network endpoint group (NEG).

NOTE: Network endpoints cannot be created outside of a network endpoint group.

To get more information about RegionNetworkEndpoint, see:

§Example Usage

§Region Network Endpoint Internet Ip Port

resources:
  region-internet-ip-port-endpoint:
    type: gcp:compute:RegionNetworkEndpoint
    properties:
      regionNetworkEndpointGroup: ${group.name}
      region: us-central1
      ipAddress: 8.8.8.8
      port: 443
  group:
    type: gcp:compute:RegionNetworkEndpointGroup
    properties:
      name: ip-port-neg
      network: ${default.id}
      region: us-central1
      networkEndpointType: INTERNET_IP_PORT
  default:
    type: gcp:compute:Network
    properties:
      name: network
      autoCreateSubnetworks: false

§Region Network Endpoint Internet Fqdn Port

resources:
  region-internet-fqdn-port-endpoint:
    type: gcp:compute:RegionNetworkEndpoint
    properties:
      regionNetworkEndpointGroup: ${group.name}
      region: us-central1
      fqdn: backend.example.com
      port: 443
  group:
    type: gcp:compute:RegionNetworkEndpointGroup
    properties:
      name: fqdn-port-neg
      network: ${default.id}
      region: us-central1
      networkEndpointType: INTERNET_FQDN_PORT
  default:
    type: gcp:compute:Network
    properties:
      name: network
      autoCreateSubnetworks: false

§Region Network Endpoint Portmap

resources:
  default:
    type: gcp:compute:Network
    properties:
      name: network
      autoCreateSubnetworks: false
  defaultSubnetwork:
    type: gcp:compute:Subnetwork
    name: default
    properties:
      name: subnetwork
      ipCidrRange: 10.0.0.0/16
      region: us-central1
      network: ${default.id}
  defaultRegionNetworkEndpointGroup:
    type: gcp:compute:RegionNetworkEndpointGroup
    name: default
    properties:
      name: portmap-neg
      region: us-central1
      network: ${default.id}
      subnetwork: ${defaultSubnetwork.id}
      networkEndpointType: GCE_VM_IP_PORTMAP
  regionNetworkEndpointPortmap:
    type: gcp:compute:RegionNetworkEndpoint
    name: region_network_endpoint_portmap
    properties:
      regionNetworkEndpointGroup: ${defaultRegionNetworkEndpointGroup.name}
      region: us-central1
      instance: ${defaultInstance.selfLink}
      port: 80
      ipAddress: ${defaultInstance.networkInterfaces[0].networkIp}
      clientDestinationPort: 8080
  defaultInstance:
    type: gcp:compute:Instance
    name: default
    properties:
      networkInterfaces:
        - accessConfigs:
            - {}
          subnetwork: ${defaultSubnetwork.id}
      name: instance
      machineType: e2-medium
      zone: us-central1-a
      bootDisk:
        initializeParams:
          image: ${myImage.selfLink}
variables:
  myImage:
    fn::invoke:
      function: gcp:compute:getImage
      arguments:
        family: debian-11
        project: debian-cloud

§Import

RegionNetworkEndpoint can be imported using any of these accepted formats:

  • projects/{{project}}/regions/{{region}}/networkEndpointGroups/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}

  • {{project}}/{{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}

  • {{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}

  • {{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}

When using the pulumi import command, RegionNetworkEndpoint can be imported using one of the formats above. For example:

$ pulumi import gcp:compute/regionNetworkEndpoint:RegionNetworkEndpoint default projects/{{project}}/regions/{{region}}/networkEndpointGroups/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
$ pulumi import gcp:compute/regionNetworkEndpoint:RegionNetworkEndpoint default {{project}}/{{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
$ pulumi import gcp:compute/regionNetworkEndpoint:RegionNetworkEndpoint default {{region}}/{{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
$ pulumi import gcp:compute/regionNetworkEndpoint:RegionNetworkEndpoint default {{region_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}

Structs§

Functions§

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