1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. GlobalNetworkEndpointGroup
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.compute.GlobalNetworkEndpointGroup

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 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

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const neg = new gcp.compute.GlobalNetworkEndpointGroup("neg", {
        name: "my-lb-neg",
        defaultPort: 90,
        networkEndpointType: "INTERNET_FQDN_PORT",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    neg = gcp.compute.GlobalNetworkEndpointGroup("neg",
        name="my-lb-neg",
        default_port=90,
        network_endpoint_type="INTERNET_FQDN_PORT")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/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{
    			Name:                pulumi.String("my-lb-neg"),
    			DefaultPort:         pulumi.Int(90),
    			NetworkEndpointType: pulumi.String("INTERNET_FQDN_PORT"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()
        {
            Name = "my-lb-neg",
            DefaultPort = 90,
            NetworkEndpointType = "INTERNET_FQDN_PORT",
        });
    
    });
    
    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()
                .name("my-lb-neg")
                .defaultPort("90")
                .networkEndpointType("INTERNET_FQDN_PORT")
                .build());
    
        }
    }
    
    resources:
      neg:
        type: gcp:compute:GlobalNetworkEndpointGroup
        properties:
          name: my-lb-neg
          defaultPort: '90'
          networkEndpointType: INTERNET_FQDN_PORT
    

    Global Network Endpoint Group Ip Address

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const neg = new gcp.compute.GlobalNetworkEndpointGroup("neg", {
        name: "my-lb-neg",
        networkEndpointType: "INTERNET_IP_PORT",
        defaultPort: 90,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    neg = gcp.compute.GlobalNetworkEndpointGroup("neg",
        name="my-lb-neg",
        network_endpoint_type="INTERNET_IP_PORT",
        default_port=90)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/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{
    			Name:                pulumi.String("my-lb-neg"),
    			NetworkEndpointType: pulumi.String("INTERNET_IP_PORT"),
    			DefaultPort:         pulumi.Int(90),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()
        {
            Name = "my-lb-neg",
            NetworkEndpointType = "INTERNET_IP_PORT",
            DefaultPort = 90,
        });
    
    });
    
    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()
                .name("my-lb-neg")
                .networkEndpointType("INTERNET_IP_PORT")
                .defaultPort(90)
                .build());
    
        }
    }
    
    resources:
      neg:
        type: gcp:compute:GlobalNetworkEndpointGroup
        properties:
          name: my-lb-neg
          networkEndpointType: INTERNET_IP_PORT
          defaultPort: 90
    

    Create GlobalNetworkEndpointGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GlobalNetworkEndpointGroup(name: string, args: GlobalNetworkEndpointGroupArgs, opts?: CustomResourceOptions);
    @overload
    def GlobalNetworkEndpointGroup(resource_name: str,
                                   args: GlobalNetworkEndpointGroupArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def GlobalNetworkEndpointGroup(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   network_endpoint_type: Optional[str] = None,
                                   default_port: Optional[int] = None,
                                   description: Optional[str] = None,
                                   name: Optional[str] = None,
                                   project: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var globalNetworkEndpointGroupResource = new Gcp.Compute.GlobalNetworkEndpointGroup("globalNetworkEndpointGroupResource", new()
    {
        NetworkEndpointType = "string",
        DefaultPort = 0,
        Description = "string",
        Name = "string",
        Project = "string",
    });
    
    example, err := compute.NewGlobalNetworkEndpointGroup(ctx, "globalNetworkEndpointGroupResource", &compute.GlobalNetworkEndpointGroupArgs{
    	NetworkEndpointType: pulumi.String("string"),
    	DefaultPort:         pulumi.Int(0),
    	Description:         pulumi.String("string"),
    	Name:                pulumi.String("string"),
    	Project:             pulumi.String("string"),
    })
    
    var globalNetworkEndpointGroupResource = new GlobalNetworkEndpointGroup("globalNetworkEndpointGroupResource", GlobalNetworkEndpointGroupArgs.builder()
        .networkEndpointType("string")
        .defaultPort(0)
        .description("string")
        .name("string")
        .project("string")
        .build());
    
    global_network_endpoint_group_resource = gcp.compute.GlobalNetworkEndpointGroup("globalNetworkEndpointGroupResource",
        network_endpoint_type="string",
        default_port=0,
        description="string",
        name="string",
        project="string")
    
    const globalNetworkEndpointGroupResource = new gcp.compute.GlobalNetworkEndpointGroup("globalNetworkEndpointGroupResource", {
        networkEndpointType: "string",
        defaultPort: 0,
        description: "string",
        name: "string",
        project: "string",
    });
    
    type: gcp:compute:GlobalNetworkEndpointGroup
    properties:
        defaultPort: 0
        description: string
        name: string
        networkEndpointType: string
        project: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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}}

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

    To learn more about importing existing cloud resources, see Importing resources.

    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 v8.9.3 published on Monday, Nov 18, 2024 by Pulumi