1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. GlobalNetworkEndpoint
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

gcp.compute.GlobalNetworkEndpoint

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

    A Global Network endpoint represents a IP address and port combination that exists outside of GCP. NOTE: Global network endpoints cannot be created outside of a global network endpoint group.

    To get more information about GlobalNetworkEndpoint, see:

    Example Usage

    Global Network Endpoint

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var neg = new Gcp.Compute.GlobalNetworkEndpointGroup("neg", new()
        {
            DefaultPort = 90,
            NetworkEndpointType = "INTERNET_FQDN_PORT",
        });
    
        var default_endpoint = new Gcp.Compute.GlobalNetworkEndpoint("default-endpoint", new()
        {
            GlobalNetworkEndpointGroup = neg.Name,
            Fqdn = "www.example.com",
            Port = 90,
        });
    
    });
    
    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 {
    		neg, err := compute.NewGlobalNetworkEndpointGroup(ctx, "neg", &compute.GlobalNetworkEndpointGroupArgs{
    			DefaultPort:         pulumi.Int(90),
    			NetworkEndpointType: pulumi.String("INTERNET_FQDN_PORT"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewGlobalNetworkEndpoint(ctx, "default-endpoint", &compute.GlobalNetworkEndpointArgs{
    			GlobalNetworkEndpointGroup: neg.Name,
    			Fqdn:                       pulumi.String("www.example.com"),
    			Port:                       pulumi.Int(90),
    		})
    		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.GlobalNetworkEndpointGroup;
    import com.pulumi.gcp.compute.GlobalNetworkEndpointGroupArgs;
    import com.pulumi.gcp.compute.GlobalNetworkEndpoint;
    import com.pulumi.gcp.compute.GlobalNetworkEndpointArgs;
    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 neg = new GlobalNetworkEndpointGroup("neg", GlobalNetworkEndpointGroupArgs.builder()        
                .defaultPort("90")
                .networkEndpointType("INTERNET_FQDN_PORT")
                .build());
    
            var default_endpoint = new GlobalNetworkEndpoint("default-endpoint", GlobalNetworkEndpointArgs.builder()        
                .globalNetworkEndpointGroup(neg.name())
                .fqdn("www.example.com")
                .port(90)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    neg = gcp.compute.GlobalNetworkEndpointGroup("neg",
        default_port=90,
        network_endpoint_type="INTERNET_FQDN_PORT")
    default_endpoint = gcp.compute.GlobalNetworkEndpoint("default-endpoint",
        global_network_endpoint_group=neg.name,
        fqdn="www.example.com",
        port=90)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const neg = new gcp.compute.GlobalNetworkEndpointGroup("neg", {
        defaultPort: 90,
        networkEndpointType: "INTERNET_FQDN_PORT",
    });
    const default_endpoint = new gcp.compute.GlobalNetworkEndpoint("default-endpoint", {
        globalNetworkEndpointGroup: neg.name,
        fqdn: "www.example.com",
        port: 90,
    });
    
    resources:
      default-endpoint:
        type: gcp:compute:GlobalNetworkEndpoint
        properties:
          globalNetworkEndpointGroup: ${neg.name}
          fqdn: www.example.com
          port: 90
      neg:
        type: gcp:compute:GlobalNetworkEndpointGroup
        properties:
          defaultPort: '90'
          networkEndpointType: INTERNET_FQDN_PORT
    

    Create GlobalNetworkEndpoint Resource

    new GlobalNetworkEndpoint(name: string, args: GlobalNetworkEndpointArgs, opts?: CustomResourceOptions);
    @overload
    def GlobalNetworkEndpoint(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              fqdn: Optional[str] = None,
                              global_network_endpoint_group: Optional[str] = None,
                              ip_address: Optional[str] = None,
                              port: Optional[int] = None,
                              project: Optional[str] = None)
    @overload
    def GlobalNetworkEndpoint(resource_name: str,
                              args: GlobalNetworkEndpointArgs,
                              opts: Optional[ResourceOptions] = None)
    func NewGlobalNetworkEndpoint(ctx *Context, name string, args GlobalNetworkEndpointArgs, opts ...ResourceOption) (*GlobalNetworkEndpoint, error)
    public GlobalNetworkEndpoint(string name, GlobalNetworkEndpointArgs args, CustomResourceOptions? opts = null)
    public GlobalNetworkEndpoint(String name, GlobalNetworkEndpointArgs args)
    public GlobalNetworkEndpoint(String name, GlobalNetworkEndpointArgs args, CustomResourceOptions options)
    
    type: gcp:compute:GlobalNetworkEndpoint
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args GlobalNetworkEndpointArgs
    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 GlobalNetworkEndpointArgs
    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 GlobalNetworkEndpointArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GlobalNetworkEndpointArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GlobalNetworkEndpointArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    GlobalNetworkEndpoint 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 GlobalNetworkEndpoint resource accepts the following input properties:

    GlobalNetworkEndpointGroup string

    The global network endpoint group this endpoint is part of.


    Port int

    Port number of the external endpoint.

    Fqdn string

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    IpAddress string

    IPv4 address external endpoint.

    Project string

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

    GlobalNetworkEndpointGroup string

    The global network endpoint group this endpoint is part of.


    Port int

    Port number of the external endpoint.

    Fqdn string

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    IpAddress string

    IPv4 address external endpoint.

    Project string

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

    globalNetworkEndpointGroup String

    The global network endpoint group this endpoint is part of.


    port Integer

    Port number of the external endpoint.

    fqdn String

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    ipAddress String

    IPv4 address external endpoint.

    project String

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

    globalNetworkEndpointGroup string

    The global network endpoint group this endpoint is part of.


    port number

    Port number of the external endpoint.

    fqdn string

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    ipAddress string

    IPv4 address external endpoint.

    project string

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

    global_network_endpoint_group str

    The global network endpoint group this endpoint is part of.


    port int

    Port number of the external endpoint.

    fqdn str

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    ip_address str

    IPv4 address external endpoint.

    project str

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

    globalNetworkEndpointGroup String

    The global network endpoint group this endpoint is part of.


    port Number

    Port number of the external endpoint.

    fqdn String

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    ipAddress String

    IPv4 address external endpoint.

    project String

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

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GlobalNetworkEndpoint resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing GlobalNetworkEndpoint Resource

    Get an existing GlobalNetworkEndpoint 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?: GlobalNetworkEndpointState, opts?: CustomResourceOptions): GlobalNetworkEndpoint
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            fqdn: Optional[str] = None,
            global_network_endpoint_group: Optional[str] = None,
            ip_address: Optional[str] = None,
            port: Optional[int] = None,
            project: Optional[str] = None) -> GlobalNetworkEndpoint
    func GetGlobalNetworkEndpoint(ctx *Context, name string, id IDInput, state *GlobalNetworkEndpointState, opts ...ResourceOption) (*GlobalNetworkEndpoint, error)
    public static GlobalNetworkEndpoint Get(string name, Input<string> id, GlobalNetworkEndpointState? state, CustomResourceOptions? opts = null)
    public static GlobalNetworkEndpoint get(String name, Output<String> id, GlobalNetworkEndpointState 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.
    The following state arguments are supported:
    Fqdn string

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    GlobalNetworkEndpointGroup string

    The global network endpoint group this endpoint is part of.


    IpAddress string

    IPv4 address external endpoint.

    Port int

    Port number of the external endpoint.

    Project string

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

    Fqdn string

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    GlobalNetworkEndpointGroup string

    The global network endpoint group this endpoint is part of.


    IpAddress string

    IPv4 address external endpoint.

    Port int

    Port number of the external endpoint.

    Project string

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

    fqdn String

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    globalNetworkEndpointGroup String

    The global network endpoint group this endpoint is part of.


    ipAddress String

    IPv4 address external endpoint.

    port Integer

    Port number of the external endpoint.

    project String

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

    fqdn string

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    globalNetworkEndpointGroup string

    The global network endpoint group this endpoint is part of.


    ipAddress string

    IPv4 address external endpoint.

    port number

    Port number of the external endpoint.

    project string

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

    fqdn str

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    global_network_endpoint_group str

    The global network endpoint group this endpoint is part of.


    ip_address str

    IPv4 address external endpoint.

    port int

    Port number of the external endpoint.

    project str

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

    fqdn String

    Fully qualified domain name of network endpoint. This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.

    globalNetworkEndpointGroup String

    The global network endpoint group this endpoint is part of.


    ipAddress String

    IPv4 address external endpoint.

    port Number

    Port number of the external endpoint.

    project String

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

    Import

    GlobalNetworkEndpoint can be imported using any of these accepted formats* projects/{{project}}/global/networkEndpointGroups/{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}} * {{project}}/{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}} * {{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}} In Terraform v1.5.0 and later, use an import block to import GlobalNetworkEndpoint using one of the formats above. For exampletf import {

    id = “projects/{{project}}/global/networkEndpointGroups/{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}”

    to = google_compute_global_network_endpoint.default }

     $ pulumi import gcp:compute/globalNetworkEndpoint:GlobalNetworkEndpoint When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), GlobalNetworkEndpoint can be imported using one of the formats above. For example
    
     $ pulumi import gcp:compute/globalNetworkEndpoint:GlobalNetworkEndpoint default projects/{{project}}/global/networkEndpointGroups/{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
    
     $ pulumi import gcp:compute/globalNetworkEndpoint:GlobalNetworkEndpoint default {{project}}/{{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
    
     $ pulumi import gcp:compute/globalNetworkEndpoint:GlobalNetworkEndpoint default {{global_network_endpoint_group}}/{{ip_address}}/{{fqdn}}/{{port}}
    

    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.

    gcp logo
    Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi