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

gcp.compute.GlobalNetworkEndpointGroup

Explore with Pulumi AI

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

    A global network endpoint group contains endpoints that reside outside of Google Cloud. Currently a global network endpoint group can only support a single endpoint.

    Recreating a global 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 GlobalNetworkEndpointGroup, see:

    Example Usage

    Global Network Endpoint Group

    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",
        });
    
    });
    
    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 {
    		_, err := compute.NewGlobalNetworkEndpointGroup(ctx, "neg", &compute.GlobalNetworkEndpointGroupArgs{
    			DefaultPort:         pulumi.Int(90),
    			NetworkEndpointType: pulumi.String("INTERNET_FQDN_PORT"),
    		})
    		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 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());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    neg = gcp.compute.GlobalNetworkEndpointGroup("neg",
        default_port=90,
        network_endpoint_type="INTERNET_FQDN_PORT")
    
    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",
    });
    
    resources:
      neg:
        type: gcp:compute:GlobalNetworkEndpointGroup
        properties:
          defaultPort: '90'
          networkEndpointType: INTERNET_FQDN_PORT
    

    Global Network Endpoint Group Ip Address

    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_IP_PORT",
        });
    
    });
    
    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 {
    		_, err := compute.NewGlobalNetworkEndpointGroup(ctx, "neg", &compute.GlobalNetworkEndpointGroupArgs{
    			DefaultPort:         pulumi.Int(90),
    			NetworkEndpointType: pulumi.String("INTERNET_IP_PORT"),
    		})
    		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 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_IP_PORT")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    neg = gcp.compute.GlobalNetworkEndpointGroup("neg",
        default_port=90,
        network_endpoint_type="INTERNET_IP_PORT")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const neg = new gcp.compute.GlobalNetworkEndpointGroup("neg", {
        defaultPort: 90,
        networkEndpointType: "INTERNET_IP_PORT",
    });
    
    resources:
      neg:
        type: gcp:compute:GlobalNetworkEndpointGroup
        properties:
          defaultPort: 90
          networkEndpointType: INTERNET_IP_PORT
    

    Create GlobalNetworkEndpointGroup Resource

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

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

    NetworkEndpointType string

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    DefaultPort 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.

    Project string

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

    NetworkEndpointType string

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    DefaultPort 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.

    Project string

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

    networkEndpointType String

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    defaultPort Integer

    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.

    project String

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

    networkEndpointType string

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    defaultPort 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.

    project string

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

    network_endpoint_type str

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    default_port int

    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.

    project str

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

    networkEndpointType String

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    defaultPort 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.

    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 GlobalNetworkEndpointGroup resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    SelfLink string

    The URI of the created resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    SelfLink string

    The URI of the created resource.

    id String

    The provider-assigned unique ID for this managed resource.

    selfLink String

    The URI of the created resource.

    id string

    The provider-assigned unique ID for this managed resource.

    selfLink string

    The URI of the created resource.

    id str

    The provider-assigned unique ID for this managed resource.

    self_link str

    The URI of the created resource.

    id String

    The provider-assigned unique ID for this managed resource.

    selfLink String

    The URI of the created resource.

    Look up Existing GlobalNetworkEndpointGroup Resource

    Get an existing GlobalNetworkEndpointGroup 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?: GlobalNetworkEndpointGroupState, opts?: CustomResourceOptions): GlobalNetworkEndpointGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            default_port: Optional[int] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            network_endpoint_type: Optional[str] = None,
            project: Optional[str] = None,
            self_link: Optional[str] = None) -> GlobalNetworkEndpointGroup
    func GetGlobalNetworkEndpointGroup(ctx *Context, name string, id IDInput, state *GlobalNetworkEndpointGroupState, opts ...ResourceOption) (*GlobalNetworkEndpointGroup, error)
    public static GlobalNetworkEndpointGroup Get(string name, Input<string> id, GlobalNetworkEndpointGroupState? state, CustomResourceOptions? opts = null)
    public static GlobalNetworkEndpointGroup get(String name, Output<String> id, GlobalNetworkEndpointGroupState 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:
    DefaultPort 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.

    NetworkEndpointType string

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    Project string

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

    SelfLink string

    The URI of the created resource.

    DefaultPort 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.

    NetworkEndpointType string

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    Project string

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

    SelfLink string

    The URI of the created resource.

    defaultPort Integer

    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.

    networkEndpointType String

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    project String

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

    selfLink String

    The URI of the created resource.

    defaultPort 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.

    networkEndpointType string

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    project string

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

    selfLink string

    The URI of the created resource.

    default_port int

    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_type str

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    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.

    defaultPort 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.

    networkEndpointType String

    Type of network endpoints in this network endpoint group. Possible values are: INTERNET_IP_PORT, INTERNET_FQDN_PORT.


    project String

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

    selfLink String

    The URI of the created resource.

    Import

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

    id = “projects/{{project}}/global/networkEndpointGroups/{{name}}”

    to = google_compute_global_network_endpoint_group.default }

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

    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